@@ -50,7 +50,9 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
5050 const int podcastBitRate,
5151 const QList<int >& podcastBitRateDivisor,
5252 const QList<int >& podcastVerticalResolution,
53- const QList<int >& podcastHorizontalResolution)
53+ const QList<int >& podcastHorizontalResolution,
54+ const bool podcastPublishToIntranet,
55+ const bool podcastPublishToYoutube)
5456 : QDialog(parent)
5557 , mPodcastAudioRecordingDevices(podcastAudioRecordingDevices)
5658 , mPodcastProfileNames(podcastProfileNames)
@@ -65,9 +67,14 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
6567 mainLayout->setContentsMargins (20 , 18 , 20 , 18 );
6668 mainLayout->setSpacing (16 );
6769
70+ QWidget* recordingWidget = new QWidget (this );
71+ QVBoxLayout* recordingLayout = new QVBoxLayout (recordingWidget);
72+ recordingLayout->setContentsMargins (20 , 18 , 20 , 18 );
73+ recordingLayout->setSpacing (16 );
74+
6875 const QString audioDeviceSelectorToolTip = tr (" The selected audio device applies to all profiles." );
6976
70- QWidget* audioWidget = new QWidget (this );
77+ QWidget* audioWidget = new QWidget (recordingWidget );
7178 audioWidget->setObjectName (QStringLiteral (" podcastPreferencesHeader" ));
7279 QHBoxLayout* audioLayout = new QHBoxLayout (audioWidget);
7380 audioLayout->setContentsMargins (14 , 12 , 14 , 12 );
@@ -101,11 +108,11 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
101108 audioLayout->addWidget (mNoAudioCheckBox );
102109 audioLayout->addWidget (mDefaultAudioCheckBox );
103110 audioLayout->addWidget (mAudioDeviceSelector );
104- mainLayout ->addWidget (audioWidget);
111+ recordingLayout ->addWidget (audioWidget);
105112
106113 const QString frameRateFormToolTip = tr (" The global frame rate applies to all profiles." );
107114
108- QWidget* frameRateFormWidget = new QWidget (this );
115+ QWidget* frameRateFormWidget = new QWidget (recordingWidget );
109116 frameRateFormWidget->setObjectName (QStringLiteral (" podcastPreferencesSpinBox" ));
110117 QHBoxLayout* frameRateFormLayout = new QHBoxLayout (frameRateFormWidget);
111118 frameRateFormLayout->setContentsMargins (14 , 12 , 14 , 12 );
@@ -121,11 +128,11 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
121128 frameRateLabel->setToolTip (frameRateFormToolTip);
122129 frameRateFormLayout->addWidget (frameRateLabel);
123130 frameRateFormLayout->addWidget (mFrameRateSpinBox );
124- mainLayout ->addWidget (frameRateFormWidget);
131+ recordingLayout ->addWidget (frameRateFormWidget);
125132
126133 const QString bitRateFormToolTip = tr (" The base bit rate is scaled depending on the profile." );
127134
128- QWidget* bitRateFormWidget = new QWidget (this );
135+ QWidget* bitRateFormWidget = new QWidget (recordingWidget );
129136 bitRateFormWidget->setObjectName (QStringLiteral (" podcastPreferencesSpinBox" ));
130137 QHBoxLayout* bitRateFormLayout = new QHBoxLayout (bitRateFormWidget);
131138 bitRateFormLayout->setContentsMargins (14 , 12 , 14 , 12 );
@@ -141,9 +148,9 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
141148 bitRateLabel->setToolTip (bitRateFormToolTip);
142149 bitRateFormLayout->addWidget (bitRateLabel);
143150 bitRateFormLayout->addWidget (mBitRateSpinBox );
144- mainLayout ->addWidget (bitRateFormWidget);
151+ recordingLayout ->addWidget (bitRateFormWidget);
145152
146- mTabWidget = new QTabWidget (this );
153+ mTabWidget = new QTabWidget (recordingWidget );
147154 mTabWidget ->setObjectName (QStringLiteral (" podcastPreferencesTabWidget" ));
148155 mTabWidget ->setIconSize (QSize (18 , 18 ));
149156
@@ -163,9 +170,9 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
163170 mTabWidget ->addTab (tab, tabLabel);
164171 }
165172 mTabWidget ->setCurrentIndex (mPodcastProfileNames .indexOf (podcastProfile));
166- mainLayout ->addWidget (mTabWidget );
173+ recordingLayout ->addWidget (mTabWidget );
167174
168- QWidget* hintWidget = new QWidget (this );
175+ QWidget* hintWidget = new QWidget (recordingWidget );
169176 hintWidget->setObjectName (QStringLiteral (" podcastPreferencesHint" ));
170177 QHBoxLayout* hintLayout = new QHBoxLayout (hintWidget);
171178 hintLayout->setContentsMargins (14 , 10 , 14 , 10 );
@@ -184,7 +191,26 @@ UBPodcastPreferencesDialog::UBPodcastPreferencesDialog(QWidget* parent,
184191
185192 hintLayout->addWidget (hintIcon, 0 , Qt::AlignTop);
186193 hintLayout->addWidget (hintLabel, 1 );
187- mainLayout->addWidget (hintWidget);
194+ recordingLayout->addWidget (hintWidget);
195+
196+ QWidget* publish = new QWidget (this );
197+ QVBoxLayout* publishLayout = new QVBoxLayout (publish);
198+ publishLayout->setContentsMargins (8 , 14 , 8 , 6 );
199+ publishLayout->setSpacing (14 );
200+
201+ mPublishToIntranet = new QCheckBox (tr (" Publish to Intranet" ));
202+ mPublishToIntranet ->setChecked (podcastPublishToIntranet);
203+ mPublishToYoutube = new QCheckBox (tr (" Publish to Youtube" ));
204+ mPublishToYoutube ->setChecked (podcastPublishToYoutube);
205+ publishLayout->addWidget (mPublishToIntranet );
206+ publishLayout->addWidget (mPublishToYoutube );
207+
208+ publishLayout->addStretch ();
209+
210+ QTabWidget* mainTabs = new QTabWidget (this );
211+ mainTabs->addTab (recordingWidget, tr (" Recording" ));
212+ mainTabs->addTab (publish, tr (" Upload" ));
213+ mainLayout->addWidget (mainTabs);
188214
189215 QDialogButtonBox* buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this );
190216 buttons->setObjectName (QStringLiteral (" colorPreferencesButtonBox" ));
@@ -235,6 +261,16 @@ int UBPodcastPreferencesDialog::podcastFrameRate() const
235261 return mFrameRateSpinBox ->value ();
236262}
237263
264+ bool UBPodcastPreferencesDialog::podcastPublishToIntranet () const
265+ {
266+ return mPublishToIntranet ->isChecked ();
267+ }
268+
269+ bool UBPodcastPreferencesDialog::podcastPublishToYoutube () const
270+ {
271+ return mPublishToYoutube ->isChecked ();
272+ }
273+
238274void UBPodcastPreferencesDialog::bitRateChanged (int bitRate)
239275{
240276 for (int i = 0 ; i < mBitRateProfileValues .size (); ++i)
@@ -299,6 +335,8 @@ void UBPodcastPreferencesDialog::resetDefaultSettings()
299335 mTabWidget ->setCurrentIndex (mPodcastProfileNames .indexOf (" Medium" ));
300336 mBitRateSpinBox ->setValue (1700000 );
301337 mFrameRateSpinBox ->setValue (10 );
338+ mPublishToIntranet ->setChecked (false );
339+ mPublishToYoutube ->setChecked (false );
302340}
303341
304342
0 commit comments