diff options
author | Boris Barbulovski <bbarbulovski@gmail.com> | 2015-09-22 11:36:13 -0700 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2015-10-14 14:59:01 +0200 |
commit | 780505e33f0af32808257fd8b6ace5c3e3d9666f (patch) | |
tree | bd82a7b0cc154b2bf3fedf107a1750e9a7f35742 /scripts/kconfig/qconf.cc | |
parent | 9c86235a19861155cdd81e0cb29f34cd0d07fbe2 (diff) |
Port xconfig to Qt5 - Make single/split/full actions checkable.
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/kconfig/qconf.cc')
-rw-r--r-- | scripts/kconfig/qconf.cc | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index c2f9767514de..f439f355dddc 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1329,11 +1329,14 @@ ConfigMainWindow::ConfigMainWindow(void) QAction *searchAction = new QAction(_("&Find"), this); searchAction->setShortcut(Qt::CTRL + Qt::Key_F); connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); - QAction *singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this); + singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this); + singleViewAction->setCheckable(TRUE); connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); - QAction *splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this); + splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this); + splitViewAction->setCheckable(TRUE); connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView())); - QAction *fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this); + fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this); + fullViewAction->setCheckable(TRUE); connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView())); QAction *showNameAction = new QAction(_("Show Name"), this); @@ -1579,6 +1582,13 @@ void ConfigMainWindow::goBack(void) void ConfigMainWindow::showSingleView(void) { + singleViewAction->setEnabled(false); + singleViewAction->setChecked(true); + splitViewAction->setEnabled(true); + splitViewAction->setChecked(false); + fullViewAction->setEnabled(true); + fullViewAction->setChecked(false); + menuView->hide(); menuList->setRootMenu(0); configList->mode = singleMode; @@ -1592,6 +1602,13 @@ void ConfigMainWindow::showSingleView(void) void ConfigMainWindow::showSplitView(void) { + singleViewAction->setEnabled(true); + singleViewAction->setChecked(false); + splitViewAction->setEnabled(false); + splitViewAction->setChecked(true); + fullViewAction->setEnabled(true); + fullViewAction->setChecked(false); + configList->mode = symbolMode; if (configList->rootEntry == &rootmenu) configList->updateListAll(); @@ -1608,6 +1625,13 @@ void ConfigMainWindow::showSplitView(void) void ConfigMainWindow::showFullView(void) { + singleViewAction->setEnabled(true); + singleViewAction->setChecked(false); + splitViewAction->setEnabled(true); + splitViewAction->setChecked(false); + fullViewAction->setEnabled(false); + fullViewAction->setChecked(true); + menuView->hide(); menuList->setRootMenu(0); configList->mode = fullMode; |