fixed show/hide buttons in appearance settings page

This commit is contained in:
csoler 2017-02-22 22:06:00 +01:00
parent f9f79d4306
commit 27db797a9f
5 changed files with 20 additions and 16 deletions

View File

@ -1498,6 +1498,7 @@ void MainWindow::switchVisibilityStatus(StatusElement e,bool b)
case StatusGrpStatus : getInstance()->statusBar() ->setVisible(b); break ;
case StatusCompactMode : getInstance()->setCompactStatusMode(b) ; break ;
case StatusShowToolTip : getInstance()->toggleStatusToolTip(b) ; break ;
case StatusShowCBox : getInstance()->statusComboBoxInstance() ->setVisible(b); break ;
case StatusShowStatus : getInstance()->peerstatusInstance() ->setVisible(b); break ;
case StatusShowPeer : getInstance()->natstatusInstance() ->setVisible(b); break ;
case StatusShowDHT : getInstance()->dhtstatusInstance() ->setVisible(b); break ;

View File

@ -123,7 +123,8 @@ public:
StatusShowOpMode = 0x0a,
StatusShowSound = 0x0b,
StatusShowToaster = 0x0c,
StatusShowSystray = 0x0d
StatusShowSystray = 0x0d,
StatusShowCBox = 0x0e
};
/** Create main window */

View File

@ -55,7 +55,7 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.grpStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusBar(), */, SLOT(switch_status_grpStatus(bool)));
connect(ui.checkBoxStatusCompactMode, SIGNAL(toggled(bool)), this /* pMainWindow, */, SLOT(switch_status_compactMode(bool)));
connect(ui.checkBoxDisableSysTrayToolTip, SIGNAL(toggled(bool)), this /* pMainWindow, */, SLOT(switch_status_showToolTip(bool)));
connect(ui.checkBoxShowStatusStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusComboBoxInstance(), */, SLOT(switch_status_ShowStatus(bool)));
connect(ui.checkBoxShowStatusStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusComboBoxInstance(), */, SLOT(switch_status_ShowCBox(bool)));
connect(ui.checkBoxShowPeerStatus, SIGNAL(toggled(bool)), this /* pMainWindow->peerstatusInstance(), */, SLOT(switch_status_ShowStatus(bool)));
connect(ui.checkBoxShowNATStatus, SIGNAL(toggled(bool)), this /* pMainWindow->natstatusInstance(), */, SLOT(switch_status_ShowPeer(bool)));
connect(ui.checkBoxShowDHTStatus, SIGNAL(toggled(bool)), this /* pMainWindow->dhtstatusInstance(), */, SLOT(switch_status_ShowDHT(bool)));
@ -110,6 +110,7 @@ void AppearancePage::switch_status_ShowOpMode(bool b) { switch_status(Main
void AppearancePage::switch_status_ShowSound(bool b) { switch_status(MainWindow::StatusShowSound ,"ShowSound", b) ; }
void AppearancePage::switch_status_ShowToaster(bool b) { switch_status(MainWindow::StatusShowToaster,"ShowToaster", b) ; }
void AppearancePage::switch_status_ShowSystray(bool b) { switch_status(MainWindow::StatusShowSystray,"ShowSysTrayOnStatusBar",b) ; }
void AppearancePage::switch_status_ShowCBox(bool b) { switch_status(MainWindow::StatusShowCBox, "ShowStatusCBox" ,b) ; }
void AppearancePage::switch_status(MainWindow::StatusElement s,const QString& key, bool b)
{

View File

@ -57,6 +57,7 @@ private slots:
void switch_status_ShowSound(bool) ;
void switch_status_ShowToaster(bool) ;
void switch_status_ShowSystray(bool) ;
void switch_status_ShowCBox(bool) ;
void updateLanguageCode() ;
void updateInterfaceStyle() ;

View File

@ -338,13 +338,6 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" name="grpStatusGLayout">
<item row="4" column="2">
<widget class="QCheckBox" name="checkBoxShowSystrayOnStatus">
<property name="text">
<string>Show SysTray on Status Bar</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="checkBoxShowToasterDisable">
<property name="text">
@ -359,13 +352,6 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="checkBoxShowOpModeStatus">
<property name="text">
<string>Show Operating Mode Status</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="checkBoxShowRateStatus">
<property name="text">
@ -432,6 +418,20 @@
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="checkBoxShowOpModeStatus">
<property name="text">
<string>Show Operating Mode Status</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="checkBoxShowSystrayOnStatus">
<property name="text">
<string>Show SysTray on Status Bar</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>