[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdemultimedia/kmix
From:       Christian Esken <esken () kde ! org>
Date:       2004-09-30 20:12:38
Message-ID: 20040930201238.D664D9BAF () office ! kde ! org
[Download RAW message or body]

CVS commit by esken: 

Preferences dialog:
- Show correct 'Orientation' state after opening dialog
- Use QButtonGroup to make the 'Orientation' buttons behave properly


  M +3 -1      kmix.cpp   1.190
  M +16 -7     kmixprefdlg.cpp   1.21


--- kdemultimedia/kmix/kmix.cpp  #1.189:1.190
@@ -390,4 +390,6 @@ KMixWindow::showSettings()
       m_prefDlg->m_showLabels->setChecked( m_showLabels );
       m_prefDlg->m_onLogin->setChecked( m_onLogin );
+      m_prefDlg->_rbVertical  ->setChecked( m_toplevelOrientation == Qt::Vertical );
+      m_prefDlg->_rbHorizontal->setChecked( m_toplevelOrientation == Qt::Horizontal \
);  
       m_prefDlg->show();

--- kdemultimedia/kmix/kmixprefdlg.cpp  #1.20:1.21
@@ -21,4 +21,5 @@
  */
 
+#include <qbuttongroup.h>
 #include <qlayout.h>
 #include <qwhatsthis.h>
@@ -69,11 +70,19 @@ KMixPrefDlg::KMixPrefDlg( QWidget *paren
 
    QBoxLayout *orientationLayout = new QHBoxLayout( layout );
-   QLabel* qlb = new QLabel( i18n("Orientation"), m_generalTab );
-   _rbHorizontal = new QRadioButton(i18n("&Horizontal"), m_generalTab);
-   _rbVertical   = new QRadioButton(i18n("&Vertical" ), m_generalTab);
+   QButtonGroup* orientationGroup = new QButtonGroup( 3, Qt::Horizontal, \
i18n("Orientation"), m_generalTab ); +   orientationLayout->add(orientationGroup);
+   orientationGroup->setRadioButtonExclusive(true);
+   //QLabel* qlb = new QLabel( i18n("Orientation"), orientationGroup );
+   _rbHorizontal = new QRadioButton(i18n("&Horizontal"), orientationGroup);
+   _rbVertical   = new QRadioButton(i18n("&Vertical"  ), orientationGroup);
+   orientationGroup->insert(_rbHorizontal);
+   orientationGroup->insert(_rbVertical);
+   //orientationLayout->add(qlb);
+   //orientationLayout->add(orientationGroup);
+   /*
    orientationLayout->add(qlb);
    orientationLayout->add(_rbHorizontal);
    orientationLayout->add(_rbVertical);
-
+   */
    layout->addStretch();
    enableButtonSeparator(true);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic