[vlc-commits] Qt: simplify go to time dialog

Francois Cartegnie git at videolan.org
Sat Sep 10 20:43:30 CEST 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Sep 10 20:42:33 2011 +0200| [caa343463e36c9f77f246d323c5dac7092129763] | committer: Francois Cartegnie

Qt: simplify go to time dialog

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=caa343463e36c9f77f246d323c5dac7092129763
---

 modules/gui/qt4/dialogs/gototime.cpp |   24 ++++--------------------
 1 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/modules/gui/qt4/dialogs/gototime.cpp b/modules/gui/qt4/dialogs/gototime.cpp
index b51e670..19a4d26 100644
--- a/modules/gui/qt4/dialogs/gototime.cpp
+++ b/modules/gui/qt4/dialogs/gototime.cpp
@@ -53,35 +53,19 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf)
     buttonBox->addButton( gotoButton, QDialogButtonBox::AcceptRole );
     buttonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
 
-    QGroupBox *timeGroupBox = new QGroupBox;
-    QGridLayout *boxLayout = new QGridLayout( timeGroupBox );
-
     QLabel *timeIntro = new QLabel( qtr( "Go to time" ) + ":" );
     timeIntro->setWordWrap( true );
     timeIntro->setAlignment( Qt::AlignCenter );
 
     timeEdit = new QTimeEdit();
-    timeEdit->setDisplayFormat( "hh : mm : ss" );
+    timeEdit->setDisplayFormat( "HH'H':mm'm':ss's'" );
     timeEdit->setAlignment( Qt::AlignRight );
     timeEdit->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
 
-    QLabel *helpFormat = new QLabel( timeEdit->displayFormat() );
-    helpFormat->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
-
-    QSpacerItem *spacerBox = new QSpacerItem( 20, 10, QSizePolicy::Minimum,
-                                        QSizePolicy::Fixed );
-
-    QSpacerItem *spacerItem = new QSpacerItem( 20, 3, QSizePolicy::Minimum,
-                                        QSizePolicy::Expanding );
-
-    boxLayout->addWidget( timeIntro, 0, 0, 1, 2 );
-    boxLayout->addItem( spacerBox, 1, 0, 1, 2 );
-    boxLayout->addWidget( timeEdit, 2, 0, 1, 1 );
-    boxLayout->addWidget( helpFormat, 2, 1, 1, 1 );
+    mainLayout->addWidget( timeIntro, 0, 0, 1, 1 );
+    mainLayout->addWidget( timeEdit, 0, 1, 1, 1 );
 
-    mainLayout->addWidget( timeGroupBox, 0, 0, 1, 4 );
-    mainLayout->addItem( spacerItem, 1, 0 );
-    mainLayout->addWidget( buttonBox, 2, 3 );
+    mainLayout->addWidget( buttonBox, 1, 0, 1, 2 );
 
     BUTTONACT( gotoButton, close() );
     BUTTONACT( cancelButton, cancel() );



More information about the vlc-commits mailing list