Make video recording options have fixed size and merge with spinbox->combobox change.
authorMitchell Kember <mk12360@gmail.com>
Sun, 02 Dec 2012 17:44:34 -0500
changeset 8192 81da6576b0c3
parent 8190 92792d48574b
child 8194 6d1bf7aec084
Make video recording options have fixed size and merge with spinbox->combobox change.
QTfrontend/ui/page/pageoptions.cpp
QTfrontend/ui/page/pageoptions.h
QTfrontend/ui/page/pagevideos.h
--- a/QTfrontend/ui/page/pageoptions.cpp	Sun Dec 02 13:57:21 2012 -0500
+++ b/QTfrontend/ui/page/pageoptions.cpp	Sun Dec 02 17:44:34 2012 -0500
@@ -490,7 +490,7 @@
 
         IconedGroupBox* pOptionsGroup = new IconedGroupBox(this);
         pOptionsGroup->setIcon(QIcon(":/res/Settings.png")); // FIXME
-        pOptionsGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+        pOptionsGroup->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
         pOptionsGroup->setTitle(QGroupBox::tr("Video recording options"));
         QGridLayout * pOptLayout = new QGridLayout(pOptionsGroup);
 
@@ -571,10 +571,12 @@
         labelFramerate->setText(QLabel::tr("Framerate"));
         pOptLayout->addWidget(labelFramerate, 6, 0);
 
-        // framerate
-        framerateBox = new QSpinBox(pOptionsGroup);
-        framerateBox->setRange(1, 200);
-        framerateBox->setSingleStep(1);
+        framerateBox = new QComboBox(pOptionsGroup);
+        framerateBox->addItem("24 fps", 24);
+        framerateBox->addItem("25 fps", 25);
+        framerateBox->addItem("30 fps", 30);
+        framerateBox->addItem("50 fps", 50);
+        framerateBox->addItem("60 fps", 60);
         pOptLayout->addWidget(framerateBox, 6, 1);
 
         // label for Bitrate
@@ -840,7 +842,7 @@
 
 void PageOptions::setDefaultOptions()
 {
-    framerateBox->setValue(30);
+    framerateBox->setCurrentIndex(2);
     bitrateBox->setValue(1000);
     checkRecordAudio->setChecked(true);
     checkUseGameRes->setChecked(true);
--- a/QTfrontend/ui/page/pageoptions.h	Sun Dec 02 13:57:21 2012 -0500
+++ b/QTfrontend/ui/page/pageoptions.h	Sun Dec 02 17:44:34 2012 -0500
@@ -86,7 +86,7 @@
         QLineEdit * leProxyPassword;
 
 #ifdef VIDEOREC
-        QSpinBox  *framerateBox;
+        QComboBox  *framerateBox;
         QSpinBox  *bitrateBox;
         QLineEdit *widthEdit;
         QLineEdit *heightEdit;
@@ -153,6 +153,8 @@
         void changeAVFormat(int index);
         void changeUseGameRes(int state);
         void changeRecordAudio(int state);
+
+    public slots:
         void setDefaultOptions();
 #endif
 };
--- a/QTfrontend/ui/page/pagevideos.h	Sun Dec 02 13:57:21 2012 -0500
+++ b/QTfrontend/ui/page/pagevideos.h	Sun Dec 02 17:44:34 2012 -0500
@@ -93,9 +93,6 @@
         void uploadToYouTube();
         void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
         void uploadFinished();
-
-    public slots:
-        void setDefaultOptions();
 };
 
 #endif // PAGE_VIDEOS_H