]> git.sven.stormbind.net Git - sven/vym.git/blob - slidecontrolwidget.cpp
0f03599aed19315b33c4eea63b408d525ec1e15e
[sven/vym.git] / slidecontrolwidget.cpp
1 #include <QAction>
2 #include <QDebug>
3 #include <QLineEdit>
4 #include <QVBoxLayout>
5
6 #include <QPushButton>
7 #include <QLabel>
8
9
10 #include "slidecontrolwidget.h"
11 #include "mainwindow.h"
12
13
14 extern Main *mainWindow;
15
16 SlideControlWidget::SlideControlWidget(QWidget *)
17 {
18     QVBoxLayout* mainLayout = new QVBoxLayout;  
19     QHBoxLayout *row2Layout = new QHBoxLayout;
20     
21     previousButton = new QPushButton;
22     previousButton->setIcon ( QPixmap( ":/slideprevious.png") );
23     connect ( previousButton, SIGNAL( clicked() ), this, SLOT( previousPressed() ) );
24
25     nextButton = new QPushButton;
26     nextButton->setIcon ( QPixmap( ":/slidenext.png") );
27     connect ( nextButton, SIGNAL( clicked() ), this, SLOT( nextPressed() ) );
28
29     upButton = new QPushButton;
30     upButton->setIcon ( QPixmap( ":/up.png") );
31     connect ( upButton, SIGNAL( clicked() ), this, SLOT( upPressed() ) );
32
33     downButton = new QPushButton;
34     downButton->setIcon ( QPixmap( ":/down.png") );
35     connect ( downButton, SIGNAL( clicked() ), this, SLOT( downPressed() ) );
36
37     snapshotButton = new QPushButton;
38     //snapshotButton->setIcon (QPixmap ( ":/sliderecord.png" ));
39     // Original: /usr/share/icons/oxygen/32x32/devices/camera-photo.png
40     snapshotButton->setIcon (QPixmap ( ":/slide-camera.png" ));
41     connect ( snapshotButton, SIGNAL( clicked() ), this, SLOT( snapshotPressed() ) );
42
43     editButton = new QPushButton;
44     editButton->setIcon (QPixmap ( ":/scripteditor.png" ));   
45     connect ( editButton, SIGNAL( clicked() ), this, SLOT( editPressed() ) );
46
47     deleteButton = new QPushButton;
48     deleteButton->setIcon (QPixmap ( ":/edittrash.png" ));
49     connect ( deleteButton, SIGNAL( clicked() ), this, SLOT( deletePressed() ) );
50
51     row2Layout->addWidget(previousButton);
52     row2Layout->addWidget(nextButton);
53     row2Layout->addWidget(snapshotButton);
54     row2Layout->addWidget(editButton);
55     row2Layout->addWidget(deleteButton);
56     row2Layout->addWidget(upButton);
57     row2Layout->addWidget(downButton);
58
59     mainLayout->addLayout (row2Layout);
60
61     setLayout (mainLayout);
62 }
63
64 void SlideControlWidget::snapshotPressed()
65 {
66     emit (takeSnapshot() );
67 }
68
69 void SlideControlWidget::editPressed()
70 {
71     emit (editButtonPressed() );
72 }
73
74 void SlideControlWidget::deletePressed()
75 {
76     emit (deleteButtonPressed() );
77 }
78
79 void SlideControlWidget::previousPressed()
80 {
81     emit (previousButtonPressed() );
82 }
83
84 void SlideControlWidget::nextPressed()
85 {
86     emit (nextButtonPressed() );
87 }
88
89 void SlideControlWidget::upPressed()
90 {
91     emit (upButtonPressed() );
92 }
93
94 void SlideControlWidget::downPressed()
95 {
96     emit (downButtonPressed() );
97 }
98
99