@@ -358,6 +358,18 @@ void ConfigList::reinit(void)
358358 updateListAll ();
359359}
360360
361+ void ConfigList::setOptionMode (QAction *action)
362+ {
363+ if (action == showNormalAction)
364+ optMode = normalOpt;
365+ else if (action == showAllAction)
366+ optMode = allOpt;
367+ else
368+ optMode = promptOpt;
369+
370+ updateListAll ();
371+ }
372+
361373void ConfigList::saveSettings (void )
362374{
363375 if (!objectName ().isEmpty ()) {
@@ -901,9 +913,9 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
901913}
902914
903915ConfigView*ConfigView::viewList;
904- QAction *ConfigView ::showNormalAction;
905- QAction *ConfigView ::showAllAction;
906- QAction *ConfigView ::showPromptAction;
916+ QAction *ConfigList ::showNormalAction;
917+ QAction *ConfigList ::showAllAction;
918+ QAction *ConfigList ::showPromptAction;
907919
908920ConfigView::ConfigView (QWidget* parent, const char *name)
909921 : Parent(parent)
@@ -934,18 +946,6 @@ ConfigView::~ConfigView(void)
934946 }
935947}
936948
937- void ConfigView::setOptionMode (QAction *act)
938- {
939- if (act == showNormalAction)
940- list->optMode = normalOpt;
941- else if (act == showAllAction)
942- list->optMode = allOpt;
943- else
944- list->optMode = promptOpt;
945-
946- list->updateListAll ();
947- }
948-
949949void ConfigView::setShowName (bool b)
950950{
951951 if (list->showName != b) {
@@ -1488,17 +1488,17 @@ ConfigMainWindow::ConfigMainWindow(void)
14881488
14891489 QActionGroup *optGroup = new QActionGroup (this );
14901490 optGroup->setExclusive (true );
1491- connect (optGroup, SIGNAL (triggered (QAction*)), configView ,
1491+ connect (optGroup, SIGNAL (triggered (QAction*)), configList ,
14921492 SLOT (setOptionMode (QAction *)));
1493- connect (optGroup, SIGNAL (triggered (QAction *)), menuView ,
1493+ connect (optGroup, SIGNAL (triggered (QAction *)), menuList ,
14941494 SLOT (setOptionMode (QAction *)));
14951495
1496- configView-> showNormalAction = new QAction (" Show Normal Options" , optGroup);
1497- configView-> showAllAction = new QAction ( " Show All Options " , optGroup );
1498- configView-> showPromptAction = new QAction (" Show Prompt Options" , optGroup);
1499- configView-> showNormalAction ->setCheckable (true );
1500- configView-> showAllAction -> setCheckable ( true );
1501- configView-> showPromptAction ->setCheckable (true );
1496+ ConfigList:: showNormalAction = new QAction (" Show Normal Options" , optGroup);
1497+ ConfigList::showNormalAction-> setCheckable ( true );
1498+ ConfigList::showAllAction = new QAction (" Show All Options" , optGroup);
1499+ ConfigList::showAllAction ->setCheckable (true );
1500+ ConfigList::showPromptAction = new QAction ( " Show Prompt Options " , optGroup );
1501+ ConfigList:: showPromptAction->setCheckable (true );
15021502
15031503 QAction *showDebugAction = new QAction (" Show Debug Info" , this );
15041504 showDebugAction->setCheckable (true );
0 commit comments