@@ -358,6 +358,18 @@ void ConfigList::reinit(void)
358
358
updateListAll ();
359
359
}
360
360
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
+
361
373
void ConfigList::saveSettings (void )
362
374
{
363
375
if (!objectName ().isEmpty ()) {
@@ -901,9 +913,9 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
901
913
}
902
914
903
915
ConfigView*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;
907
919
908
920
ConfigView::ConfigView (QWidget* parent, const char *name)
909
921
: Parent(parent)
@@ -934,18 +946,6 @@ ConfigView::~ConfigView(void)
934
946
}
935
947
}
936
948
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
-
949
949
void ConfigView::setShowName (bool b)
950
950
{
951
951
if (list->showName != b) {
@@ -1488,17 +1488,17 @@ ConfigMainWindow::ConfigMainWindow(void)
1488
1488
1489
1489
QActionGroup *optGroup = new QActionGroup (this );
1490
1490
optGroup->setExclusive (true );
1491
- connect (optGroup, SIGNAL (triggered (QAction*)), configView ,
1491
+ connect (optGroup, SIGNAL (triggered (QAction*)), configList ,
1492
1492
SLOT (setOptionMode (QAction *)));
1493
- connect (optGroup, SIGNAL (triggered (QAction *)), menuView ,
1493
+ connect (optGroup, SIGNAL (triggered (QAction *)), menuList ,
1494
1494
SLOT (setOptionMode (QAction *)));
1495
1495
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 );
1502
1502
1503
1503
QAction *showDebugAction = new QAction (" Show Debug Info" , this );
1504
1504
showDebugAction->setCheckable (true );
0 commit comments