Commit 76bede87 authored by Boris Barbulovski's avatar Boris Barbulovski Committed by Michal Marek

Port xconfig to Qt5 - Use QMenu

Signed-off-by: default avatarBoris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent 924bbb53
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <q3header.h> #include <q3header.h>
#include <QFileDialog> #include <QFileDialog>
#include <q3dragobject.h> #include <q3dragobject.h>
#include <q3popupmenu.h> #include <QMenu>
#include <qapplication.h> #include <qapplication.h>
#include <qdesktopwidget.h> #include <qdesktopwidget.h>
...@@ -817,7 +817,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -817,7 +817,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
if (!headerPopup) { if (!headerPopup) {
QAction *action; QAction *action;
headerPopup = new Q3PopupMenu(this); headerPopup = new QMenu(this);
action = new QAction(_("Show Name"), this); action = new QAction(_("Show Name"), this);
action->setToggleAction(TRUE); action->setToggleAction(TRUE);
connect(action, SIGNAL(toggled(bool)), connect(action, SIGNAL(toggled(bool)),
...@@ -1387,32 +1387,32 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1387,32 +1387,32 @@ ConfigMainWindow::ConfigMainWindow(void)
fullViewAction->addTo(toolBar); fullViewAction->addTo(toolBar);
// create config menu // create config menu
Q3PopupMenu* config = new Q3PopupMenu(this); QMenu* config = new QMenu(this);
menu->insertItem(_("&File"), config); menu->insertItem(_("&File"), config);
loadAction->addTo(config); loadAction->addTo(config);
saveAction->addTo(config); saveAction->addTo(config);
saveAsAction->addTo(config); saveAsAction->addTo(config);
config->insertSeparator(); config->addSeparator();
quitAction->addTo(config); quitAction->addTo(config);
// create edit menu // create edit menu
Q3PopupMenu* editMenu = new Q3PopupMenu(this); QMenu* editMenu = new QMenu(this);
menu->insertItem(_("&Edit"), editMenu); menu->insertItem(_("&Edit"), editMenu);
searchAction->addTo(editMenu); searchAction->addTo(editMenu);
// create options menu // create options menu
Q3PopupMenu* optionMenu = new Q3PopupMenu(this); QMenu* optionMenu = new QMenu(this);
menu->insertItem(_("&Option"), optionMenu); menu->insertItem(_("&Option"), optionMenu);
showNameAction->addTo(optionMenu); showNameAction->addTo(optionMenu);
showRangeAction->addTo(optionMenu); showRangeAction->addTo(optionMenu);
showDataAction->addTo(optionMenu); showDataAction->addTo(optionMenu);
optionMenu->insertSeparator(); optionMenu->addSeparator();
optGroup->addTo(optionMenu); optGroup->addTo(optionMenu);
optionMenu->insertSeparator(); optionMenu->addSeparator();
// create help menu // create help menu
Q3PopupMenu* helpMenu = new Q3PopupMenu(this); QMenu* helpMenu = new QMenu(this);
menu->insertSeparator(); menu->addSeparator();
menu->insertItem(_("&Help"), helpMenu); menu->insertItem(_("&Help"), helpMenu);
showIntroAction->addTo(helpMenu); showIntroAction->addTo(helpMenu);
showAboutAction->addTo(helpMenu); showAboutAction->addTo(helpMenu);
......
...@@ -117,7 +117,7 @@ public slots: ...@@ -117,7 +117,7 @@ public slots:
struct menu *rootEntry; struct menu *rootEntry;
QColorGroup disabledColorGroup; QColorGroup disabledColorGroup;
QColorGroup inactivedColorGroup; QColorGroup inactivedColorGroup;
Q3PopupMenu* headerPopup; QMenu* headerPopup;
private: private:
int colMap[colNr]; int colMap[colNr];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment