68 : QDialog( parentw ),
69 fParentViewer(parentViewer)
70{
71 setModal(false);
72 setWindowTitle( tr( " Save as movie" ));
73
74
75
76 QVBoxLayout* globalVLayout = new QVBoxLayout(this);
77 globalVLayout->setMargin(10);
78 globalVLayout->setSpacing(10);
79
80
81 QGroupBox *encoderGroupBox = new QGroupBox(tr("Encoder path"),this);
82 QVBoxLayout *encoderVGroupBoxLayout = new QVBoxLayout(encoderGroupBox);
83
84
85 QWidget *encoderHBox = new QWidget(encoderGroupBox);
86 QHBoxLayout *encoderHBoxLayout = new QHBoxLayout(encoderHBox);
87 fEncoderPath = new QLineEdit("",encoderHBox);
88
89 QPushButton *encoderButton = new QPushButton(tr("..."),encoderHBox);
90 encoderButton->setMaximumWidth (30);
91
92 fEncoderStatus = new QLabel(encoderGroupBox);
93
94 fEncoderStatus->setWordWrap(true);
95 encoderVGroupBoxLayout->setMargin(15);
96
97 fEncoderStatus->setText("");
98
99 encoderHBoxLayout->addWidget(fEncoderPath);
100 encoderHBoxLayout->addWidget(encoderButton);
101 encoderVGroupBoxLayout->addWidget(encoderHBox);
102 encoderVGroupBoxLayout->addWidget(fEncoderStatus);
103
104 encoderGroupBox->setLayout(encoderVGroupBoxLayout);
105 globalVLayout->addWidget(encoderGroupBox);
106
107 connect( encoderButton, SIGNAL( clicked( ) ), this, SLOT(selectEncoderPathAction() ) );
108
109
110
111 QGroupBox *tempFolderGroupBox = new QGroupBox(tr("Temporary folder path"),this);
112 QVBoxLayout *tempFolderVGroupBoxLayout = new QVBoxLayout(tempFolderGroupBox);
113
114
115 QWidget *tempFolderHBox = new QWidget(tempFolderGroupBox);
116 QHBoxLayout *tempFolderHBoxLayout = new QHBoxLayout(tempFolderHBox);
117
118 fTempFolderPath = new QLineEdit("",tempFolderHBox);
119
120 QPushButton *tempButton = new QPushButton(tr("..."),tempFolderHBox);
121 tempButton->setMaximumWidth (30);
122
123 fTempFolderStatus = new QLabel(tempFolderGroupBox);
124 fTempFolderStatus->setWordWrap(true);
125 tempFolderVGroupBoxLayout->setMargin(15);
126 fTempFolderStatus->setText("");
127
128 tempFolderHBoxLayout->addWidget(fTempFolderPath);
129 tempFolderHBoxLayout->addWidget(tempButton);
130 tempFolderVGroupBoxLayout->addWidget(tempFolderHBox);
131 tempFolderVGroupBoxLayout->addWidget(fTempFolderStatus);
132
133 tempFolderGroupBox->setLayout(tempFolderVGroupBoxLayout);
134 globalVLayout->addWidget(tempFolderGroupBox);
135
136 connect( tempButton, SIGNAL( clicked( ) ), this, SLOT(selectTempPathAction() ) );
137
138
139
140
141
142 QGroupBox *saveFileGroupBox = new QGroupBox(tr("Save as"),this);
143 QVBoxLayout *saveFileVGroupBoxLayout = new QVBoxLayout(saveFileGroupBox);
144
145
146 QWidget *saveFileHBox = new QWidget(saveFileGroupBox);
147 QHBoxLayout *saveFileHBoxLayout = new QHBoxLayout(saveFileHBox);
148
149 fSaveFileName = new QLineEdit("G4Movie.mpeg",saveFileHBox);
150
151 QPushButton *saveButton = new QPushButton(tr("..."),saveFileHBox);
152 saveButton->setMaximumWidth (30);
153
154 fSaveFileStatus = new QLabel(saveFileGroupBox);
155 fSaveFileStatus->setWordWrap(true);
156 saveFileVGroupBoxLayout->setMargin(15);
157 fSaveFileStatus->setText("");
158
159 saveFileHBoxLayout->addWidget(fSaveFileName);
160 saveFileHBoxLayout->addWidget(saveButton);
161 saveFileVGroupBoxLayout->addWidget(saveFileHBox);
162 saveFileVGroupBoxLayout->addWidget(fSaveFileStatus);
163
164 saveFileGroupBox->setLayout(saveFileVGroupBoxLayout);
165 globalVLayout->addWidget(saveFileGroupBox);
166
167 connect( saveButton, SIGNAL( clicked( ) ), this, SLOT(selectSaveFileNameAction() ) );
168
169
170
171
172
173 QLabel *infoLabel = new QLabel(" Press SPACE to Start/Pause video recording \n Press RETURN to Stop video recording",this);
174
175
176 QGroupBox *statusGroupBox = new QGroupBox(tr("Status"),this);
177 QVBoxLayout *statusVGroupBoxLayout = new QVBoxLayout(statusGroupBox);
178
179 fRecordingStatus = new QLabel(statusGroupBox);
180 statusVGroupBoxLayout->setMargin(15);
181 fRecordingStatus->setWordWrap(true);
182 QPalette mypalette( fRecordingStatus->palette() );
183 mypalette.setColor( QPalette::Text, Qt::green);
184 fRecordingStatus->setPalette(mypalette);
185
186 fRecordingInfos = new QLabel(statusGroupBox);
187 fRecordingInfos->setWordWrap(true);
189
190 statusVGroupBoxLayout->addWidget(fRecordingStatus);
191 statusVGroupBoxLayout->addWidget(fRecordingInfos);
192
193 statusGroupBox->setLayout(statusVGroupBoxLayout);
194 globalVLayout->addWidget(infoLabel);
195 globalVLayout->addWidget(statusGroupBox);
196
197
198 QWidget *buttonBox = new QWidget(this);
199
200 QHBoxLayout *buttonBoxLayout = new QHBoxLayout(buttonBox);
201
202 QPushButton *buttonReset = new QPushButton( tr( "&Reset" ),buttonBox );
203 buttonReset->setAutoDefault(
TRUE );
204 buttonBoxLayout->addWidget(buttonReset);
205
206 fButtonStartPause = new QPushButton( tr( " &Start " ),buttonBox );
207 fButtonStartPause->setEnabled(true);
208 fButtonStartPause->setAutoDefault(
TRUE );
209 buttonBoxLayout->addWidget(fButtonStartPause);
210
211 fButtonStopFinishClose = new QPushButton( tr( "&Stop" ),buttonBox );
212 fButtonStopFinishClose->setEnabled(false);
213 fButtonStopFinishClose->setAutoDefault(
TRUE );
214 buttonBoxLayout->addWidget(fButtonStopFinishClose);
215
216 fButtonSave = new QPushButton( tr( "&Save" ),buttonBox );
217 fButtonSave->setEnabled(false);
218 fButtonSave->setAutoDefault(
TRUE );
219 buttonBoxLayout->addWidget(fButtonSave);
220
221 QPushButton *buttonCancel = new QPushButton( tr( "&Cancel" ),buttonBox );
222 buttonCancel->setAutoDefault(
TRUE );
223 buttonBoxLayout->addWidget(buttonCancel);
224
225 buttonBox->setLayout(buttonBoxLayout);
226 globalVLayout->addWidget(buttonBox);
227
228
229
230 setLayout(globalVLayout);
231
232
233 connect( fButtonStartPause, SIGNAL( clicked() ), fParentViewer, SLOT( startPauseVideo() ) );
234 connect( buttonReset, SIGNAL( clicked() ), this, SLOT( resetRecording() ) );
235 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
236 connect( fButtonStopFinishClose, SIGNAL( clicked() ),
this, SLOT(
stopFinishClose() ) );
237 connect( fButtonSave, SIGNAL( clicked() ),
this, SLOT(
save() ) );
238
239
243
244
248
252
253}
bool checkSaveFileNameParameters()
void setRecordingInfos(QString)
void setRecordingStatus(QString)
bool checkTempFolderParameters()
bool checkEncoderSwParameters()
QString getTempFolderPath()