10 #include "slidecontrolwidget.h"
11 #include "mainwindow.h"
14 extern Main *mainWindow;
16 SlideControlWidget::SlideControlWidget(QWidget *)
18 QVBoxLayout* mainLayout = new QVBoxLayout;
19 QHBoxLayout *row2Layout = new QHBoxLayout;
21 previousButton = new QPushButton;
22 previousButton->setIcon ( QPixmap( ":/slideprevious.png") );
23 connect ( previousButton, SIGNAL( clicked() ), this, SLOT( previousPressed() ) );
25 nextButton = new QPushButton;
26 nextButton->setIcon ( QPixmap( ":/slidenext.png") );
27 connect ( nextButton, SIGNAL( clicked() ), this, SLOT( nextPressed() ) );
29 upButton = new QPushButton;
30 upButton->setIcon ( QPixmap( ":/up.png") );
31 connect ( upButton, SIGNAL( clicked() ), this, SLOT( upPressed() ) );
33 downButton = new QPushButton;
34 downButton->setIcon ( QPixmap( ":/down.png") );
35 connect ( downButton, SIGNAL( clicked() ), this, SLOT( downPressed() ) );
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() ) );
43 editButton = new QPushButton;
44 editButton->setIcon (QPixmap ( ":/scripteditor.png" ));
45 connect ( editButton, SIGNAL( clicked() ), this, SLOT( editPressed() ) );
47 deleteButton = new QPushButton;
48 deleteButton->setIcon (QPixmap ( ":/edittrash.png" ));
49 connect ( deleteButton, SIGNAL( clicked() ), this, SLOT( deletePressed() ) );
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);
59 mainLayout->addLayout (row2Layout);
61 setLayout (mainLayout);
64 void SlideControlWidget::snapshotPressed()
66 emit (takeSnapshot() );
69 void SlideControlWidget::editPressed()
71 emit (editButtonPressed() );
74 void SlideControlWidget::deletePressed()
76 emit (deleteButtonPressed() );
79 void SlideControlWidget::previousPressed()
81 emit (previousButtonPressed() );
84 void SlideControlWidget::nextPressed()
86 emit (nextButtonPressed() );
89 void SlideControlWidget::upPressed()
91 emit (upButtonPressed() );
94 void SlideControlWidget::downPressed()
96 emit (downButtonPressed() );