[vlmc-devel] commit: Applying HACKING to VideoPage.* ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Sun Jun 20 19:21:35 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Jun 20 17:58:19 2010 +0200| [cb53112186d51f6a0b1388a533d14cb54d3f5e3e] | committer: Hugo Beauzée-Luyssen
Applying HACKING to VideoPage.*
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=cb53112186d51f6a0b1388a533d14cb54d3f5e3e
---
src/Gui/wizard/VideoPage.cpp | 51 +++++++++++++++-----------
src/Gui/wizard/VideoPage.h | 81 +++++++++++++++++++++--------------------
2 files changed, 70 insertions(+), 62 deletions(-)
diff --git a/src/Gui/wizard/VideoPage.cpp b/src/Gui/wizard/VideoPage.cpp
index e2c9fd2..c68da6e 100644
--- a/src/Gui/wizard/VideoPage.cpp
+++ b/src/Gui/wizard/VideoPage.cpp
@@ -23,9 +23,7 @@
#include "VideoPage.h"
#include "SettingsManager.h"
-#include <QtDebug>
-
-VideoPage::VideoPage( QWidget *parent ) :
+VideoPage::VideoPage( QWidget* parent ) :
QWizardPage( parent )
{
ui.setupUi( this );
@@ -41,7 +39,8 @@ VideoPage::VideoPage( QWidget *parent ) :
this, SLOT( updateAudioPresets() ) );
}
-void VideoPage::changeEvent( QEvent *e )
+void
+VideoPage::changeEvent( QEvent* e )
{
QWizardPage::changeEvent( e );
switch ( e->type() )
@@ -54,17 +53,19 @@ void VideoPage::changeEvent( QEvent *e )
}
}
-int VideoPage::nextId() const
+int
+VideoPage::nextId() const
{
return -1;
}
-void VideoPage::initializePage()
+void
+VideoPage::initializePage()
{
- int projectFps = 30;
- int projectHeight = 300;
- int projectWidth = 480;
- int sampleRate = 44000;
+ int projectFps = 30;
+ int projectHeight = 300;
+ int projectWidth = 480;
+ int sampleRate = 44000;
ui.comboBoxVideoPresets->setCurrentIndex( 0 );
ui.comboBoxAudioPresets->setCurrentIndex( 1 );
@@ -90,12 +91,13 @@ void VideoPage::initializePage()
}
}
-bool VideoPage::validatePage()
+bool
+VideoPage::validatePage()
{
- SettingsManager* sManager = SettingsManager::getInstance();
- QVariant projectFps( ui.doubleSpinBoxVideoFPS->value() );
- QVariant projectHeight( ui.spinBoxVideoHeight->value() );
- QVariant projectWidth( ui.spinBoxVideoWidth->value() );
+ SettingsManager* sManager = SettingsManager::getInstance();
+ QVariant projectFps( ui.doubleSpinBoxVideoFPS->value() );
+ QVariant projectHeight( ui.spinBoxVideoHeight->value() );
+ QVariant projectWidth( ui.spinBoxVideoWidth->value() );
sManager->setValue( "video/VLMCOutputFPS", projectFps, SettingsManager::Project );
sManager->setValue( "video/VideoProjectHeight", projectHeight, SettingsManager::Project );
@@ -104,24 +106,27 @@ bool VideoPage::validatePage()
return true;
}
-void VideoPage::cleanupPage()
+void
+VideoPage::cleanupPage()
{
-
}
-void VideoPage::setVideoFormEnabled( bool enabled )
+void
+VideoPage::setVideoFormEnabled( bool enabled )
{
ui.spinBoxVideoWidth->setEnabled( enabled );
ui.spinBoxVideoHeight->setEnabled( enabled );
}
-void VideoPage::setAudioFormEnabled( bool enabled )
+void
+VideoPage::setAudioFormEnabled( bool enabled )
{
ui.spinBoxAudioChannels->setEnabled( enabled );
ui.comboBoxAudioSamplerate->setEnabled( enabled );
}
-void VideoPage::updateVideoPresets()
+void
+VideoPage::updateVideoPresets()
{
if ( ui.comboBoxVideoPresets->currentIndex() == 0 )
setVideoFormEnabled( true );
@@ -155,7 +160,8 @@ void VideoPage::updateVideoPresets()
}
}
-void VideoPage::updateAudioPresets()
+void
+VideoPage::updateAudioPresets()
{
if ( ui.comboBoxAudioPresets->currentIndex() == 0 )
setAudioFormEnabled( true );
@@ -174,7 +180,8 @@ void VideoPage::updateAudioPresets()
}
}
-void VideoPage::setVideoResolution( int width, int height )
+void
+VideoPage::setVideoResolution( int width, int height )
{
ui.spinBoxVideoWidth->setValue( width );
ui.spinBoxVideoHeight->setValue( height );
diff --git a/src/Gui/wizard/VideoPage.h b/src/Gui/wizard/VideoPage.h
index d91ae05..d7142ee 100644
--- a/src/Gui/wizard/VideoPage.h
+++ b/src/Gui/wizard/VideoPage.h
@@ -29,52 +29,53 @@
class VideoPage : public QWizardPage
{
Q_OBJECT
-public:
- enum SampleRate
- {
- HZ_48000,
- HZ_44100,
- HZ_22050,
- HZ_11025
- };
- enum VideoPresets
- {
- PRESET_VideoCustom,
- PRESET_480i, // SDTV/NTSC
- PRESET_576i, // SDTV/PAL
- PRESET_480p, // EDTV
- PRESET_576p, // EDTV
- PRESET_720p, // HDTV
- PRESET_1080i, // HDTV
- PRESET_1080p, // HDTV
- };
+ public:
+ enum SampleRate
+ {
+ HZ_48000,
+ HZ_44100,
+ HZ_22050,
+ HZ_11025
+ };
- enum AudioPresets
- {
- PRESET_AudioCustom,
- PRESET_STEREO,
- PRESET_MONO
- };
+ enum VideoPresets
+ {
+ PRESET_VideoCustom,
+ PRESET_480i, // SDTV/NTSC
+ PRESET_576i, // SDTV/PAL
+ PRESET_480p, // EDTV
+ PRESET_576p, // EDTV
+ PRESET_720p, // HDTV
+ PRESET_1080i, // HDTV
+ PRESET_1080p, // HDTV
+ };
- VideoPage( QWidget *parent = 0 );
+ enum AudioPresets
+ {
+ PRESET_AudioCustom,
+ PRESET_STEREO,
+ PRESET_MONO
+ };
-protected:
- void changeEvent( QEvent *e );
- virtual int nextId() const;
- virtual void initializePage();
- virtual bool validatePage();
- virtual void cleanupPage();
+ VideoPage( QWidget* parent = 0 );
-private slots:
- void updateVideoPresets();
- void updateAudioPresets();
+ protected:
+ void changeEvent( QEvent* e );
+ virtual int nextId() const;
+ virtual void initializePage();
+ virtual bool validatePage();
+ virtual void cleanupPage();
-private:
- void setVideoFormEnabled( bool enabled );
- void setAudioFormEnabled( bool enabled );
- void setVideoResolution( int width, int height );
- Ui::VideoPage ui;
+ private slots:
+ void updateVideoPresets();
+ void updateAudioPresets();
+
+ private:
+ void setVideoFormEnabled( bool enabled );
+ void setAudioFormEnabled( bool enabled );
+ void setVideoResolution( int width, int height );
+ Ui::VideoPage ui;
};
#endif // VIDEOPAGE_H
More information about the Vlmc-devel
mailing list