Merge pull request #583 from opentx/dvogonen/simplified_companion_menu_580

Dvogonen/simplified companion menu 580
This commit is contained in:
Bertrand Songis
2014-01-23 08:27:11 -08:00
21 changed files with 0 additions and 103 deletions
-16
View File
@@ -298,7 +298,6 @@
<file>themes/monochrome/16/edit.png</file>
<file>themes/monochrome/16/information.png</file>
<file>themes/monochrome/16/configure.png</file>
<file>themes/monochrome/16/switch_dir.png</file>
<file>themes/monochrome/16/list.png</file>
<file>themes/monochrome/16/wizard.png</file>
<file>themes/monochrome/16/logs.png</file>
@@ -342,7 +341,6 @@
<file>themes/monochrome/24/edit.png</file>
<file>themes/monochrome/24/information.png</file>
<file>themes/monochrome/24/configure.png</file>
<file>themes/monochrome/24/switch_dir.png</file>
<file>themes/monochrome/24/list.png</file>
<file>themes/monochrome/24/wizard.png</file>
<file>themes/monochrome/24/logs.png</file>
@@ -386,7 +384,6 @@
<file>themes/monochrome/32/edit.png</file>
<file>themes/monochrome/32/information.png</file>
<file>themes/monochrome/32/configure.png</file>
<file>themes/monochrome/32/switch_dir.png</file>
<file>themes/monochrome/32/list.png</file>
<file>themes/monochrome/32/wizard.png</file>
<file>themes/monochrome/32/logs.png</file>
@@ -430,7 +427,6 @@
<file>themes/monochrome/48/edit.png</file>
<file>themes/monochrome/48/information.png</file>
<file>themes/monochrome/48/configure.png</file>
<file>themes/monochrome/48/switch_dir.png</file>
<file>themes/monochrome/48/list.png</file>
<file>themes/monochrome/48/wizard.png</file>
<file>themes/monochrome/48/logs.png</file>
@@ -474,7 +470,6 @@
<file>themes/classic/16/edit.png</file>
<file>themes/classic/16/information.png</file>
<file>themes/classic/16/configure.png</file>
<file>themes/classic/16/switch_dir.png</file>
<file>themes/classic/16/list.png</file>
<file>themes/classic/16/wizard.png</file>
<file>themes/classic/16/logs.png</file>
@@ -518,7 +513,6 @@
<file>themes/classic/24/edit.png</file>
<file>themes/classic/24/information.png</file>
<file>themes/classic/24/configure.png</file>
<file>themes/classic/24/switch_dir.png</file>
<file>themes/classic/24/list.png</file>
<file>themes/classic/24/wizard.png</file>
<file>themes/classic/24/logs.png</file>
@@ -562,7 +556,6 @@
<file>themes/classic/32/edit.png</file>
<file>themes/classic/32/information.png</file>
<file>themes/classic/32/configure.png</file>
<file>themes/classic/32/switch_dir.png</file>
<file>themes/classic/32/list.png</file>
<file>themes/classic/32/wizard.png</file>
<file>themes/classic/32/logs.png</file>
@@ -606,7 +599,6 @@
<file>themes/classic/48/edit.png</file>
<file>themes/classic/48/information.png</file>
<file>themes/classic/48/configure.png</file>
<file>themes/classic/48/switch_dir.png</file>
<file>themes/classic/48/list.png</file>
<file>themes/classic/48/wizard.png</file>
<file>themes/classic/48/logs.png</file>
@@ -650,7 +642,6 @@
<file>themes/monoblue/16/edit.png</file>
<file>themes/monoblue/16/information.png</file>
<file>themes/monoblue/16/configure.png</file>
<file>themes/monoblue/16/switch_dir.png</file>
<file>themes/monoblue/16/list.png</file>
<file>themes/monoblue/16/wizard.png</file>
<file>themes/monoblue/16/logs.png</file>
@@ -694,7 +685,6 @@
<file>themes/monoblue/24/edit.png</file>
<file>themes/monoblue/24/information.png</file>
<file>themes/monoblue/24/configure.png</file>
<file>themes/monoblue/24/switch_dir.png</file>
<file>themes/monoblue/24/list.png</file>
<file>themes/monoblue/24/wizard.png</file>
<file>themes/monoblue/24/logs.png</file>
@@ -738,7 +728,6 @@
<file>themes/monoblue/32/edit.png</file>
<file>themes/monoblue/32/information.png</file>
<file>themes/monoblue/32/configure.png</file>
<file>themes/monoblue/32/switch_dir.png</file>
<file>themes/monoblue/32/list.png</file>
<file>themes/monoblue/32/wizard.png</file>
<file>themes/monoblue/32/logs.png</file>
@@ -782,7 +771,6 @@
<file>themes/monoblue/48/edit.png</file>
<file>themes/monoblue/48/information.png</file>
<file>themes/monoblue/48/configure.png</file>
<file>themes/monoblue/48/switch_dir.png</file>
<file>themes/monoblue/48/list.png</file>
<file>themes/monoblue/48/wizard.png</file>
<file>themes/monoblue/48/logs.png</file>
@@ -826,7 +814,6 @@
<file>themes/monowhite/16/edit.png</file>
<file>themes/monowhite/16/information.png</file>
<file>themes/monowhite/16/configure.png</file>
<file>themes/monowhite/16/switch_dir.png</file>
<file>themes/monowhite/16/list.png</file>
<file>themes/monowhite/16/wizard.png</file>
<file>themes/monowhite/16/logs.png</file>
@@ -870,7 +857,6 @@
<file>themes/monowhite/24/edit.png</file>
<file>themes/monowhite/24/information.png</file>
<file>themes/monowhite/24/configure.png</file>
<file>themes/monowhite/24/switch_dir.png</file>
<file>themes/monowhite/24/list.png</file>
<file>themes/monowhite/24/wizard.png</file>
<file>themes/monowhite/24/logs.png</file>
@@ -914,7 +900,6 @@
<file>themes/monowhite/32/edit.png</file>
<file>themes/monowhite/32/information.png</file>
<file>themes/monowhite/32/configure.png</file>
<file>themes/monowhite/32/switch_dir.png</file>
<file>themes/monowhite/32/list.png</file>
<file>themes/monowhite/32/wizard.png</file>
<file>themes/monowhite/32/logs.png</file>
@@ -958,7 +943,6 @@
<file>themes/monowhite/48/edit.png</file>
<file>themes/monowhite/48/information.png</file>
<file>themes/monowhite/48/configure.png</file>
<file>themes/monowhite/48/switch_dir.png</file>
<file>themes/monowhite/48/list.png</file>
<file>themes/monowhite/48/wizard.png</file>
<file>themes/monowhite/48/logs.png</file>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

-78
View File
@@ -1556,12 +1556,6 @@ void MainWindow::updateMenus()
saveAct->setEnabled(hasMdiChild);
saveAsAct->setEnabled(hasMdiChild);
pasteAct->setEnabled(hasMdiChild ? activeMdiChild()->hasPasteData() : false);
closeAct->setEnabled(hasMdiChild);
closeAllAct->setEnabled(hasMdiChild);
tileAct->setEnabled(hasMdiChild);
cascadeAct->setEnabled(hasMdiChild);
nextAct->setEnabled(hasMdiChild);
previousAct->setEnabled(hasMdiChild);
burnToAct->setEnabled(hasMdiChild);
separatorAct->setVisible(hasMdiChild);
@@ -1590,39 +1584,6 @@ void MainWindow::updateMenus()
profileButton->setDisabled(notfound);
}
void MainWindow::updateWindowMenu()
{
windowMenu->clear();
windowMenu->addAction(closeAct);
windowMenu->addAction(closeAllAct);
windowMenu->addSeparator();
windowMenu->addAction(tileAct);
windowMenu->addAction(cascadeAct);
windowMenu->addSeparator();
windowMenu->addAction(nextAct);
windowMenu->addAction(previousAct);
windowMenu->addAction(separatorAct);
QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
separatorAct->setVisible(!windows.isEmpty());
for (int i = 0; i < windows.size(); ++i) {
MdiChild *child = qobject_cast<MdiChild *>(windows.at(i)->widget());
QString text;
if (i < 9) {
text = tr("&%1 %2").arg(i + 1).arg(child->userFriendlyCurrentFile());
} else {
text = tr("%1 %2").arg(i + 1).arg(child->userFriendlyCurrentFile());
}
QAction *action = windowMenu->addAction(text);
action->setCheckable(true);
action ->setChecked(child == activeMdiChild());
connect(action, SIGNAL(triggered()), windowMapper, SLOT(map()));
windowMapper->setMapping(action, windows.at(i));
}
}
MdiChild *MainWindow::createMdiChild()
{
MdiChild *child = new MdiChild;
@@ -1773,37 +1734,6 @@ void MainWindow::createActions()
printAct->setEnabled(false);
connect(printAct,SIGNAL(triggered()),this,SLOT(print()));
closeAct = new QAction(tr("Cl&ose"), this);
closeAct->setStatusTip(tr("Close the active window"));
connect(closeAct, SIGNAL(triggered()),
mdiArea, SLOT(closeActiveSubWindow()));
closeAllAct = new QAction(tr("Close &All"), this);
closeAllAct->setStatusTip(tr("Close all the windows"));
connect(closeAllAct, SIGNAL(triggered()),
mdiArea, SLOT(closeAllSubWindows()));
tileAct = new QAction(tr("&Tile"), this);
tileAct->setStatusTip(tr("Tile the windows"));
connect(tileAct, SIGNAL(triggered()), mdiArea, SLOT(tileSubWindows()));
cascadeAct = new QAction(tr("&Cascade"), this);
cascadeAct->setStatusTip(tr("Cascade the windows"));
connect(cascadeAct, SIGNAL(triggered()), mdiArea, SLOT(cascadeSubWindows()));
nextAct = new QAction(tr("Ne&xt"), this);
nextAct->setShortcuts(QKeySequence::NextChild);
nextAct->setStatusTip(tr("Move the focus to the next window"));
connect(nextAct, SIGNAL(triggered()),
mdiArea, SLOT(activateNextSubWindow()));
previousAct = new QAction(tr("Pre&vious"), this);
previousAct->setShortcuts(QKeySequence::PreviousChild);
previousAct->setStatusTip(tr("Move the focus to the previous "
"window"));
connect(previousAct, SIGNAL(triggered()),
mdiArea, SLOT(activatePreviousSubWindow()));
separatorAct = new QAction(this);
separatorAct->setSeparator(true);
@@ -1811,9 +1741,6 @@ void MainWindow::createActions()
aboutAct->setStatusTip(tr("Show the application's About box"));
connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
switchLayoutDirectionAct = new QAction(CompanionIcon("switch_dir.png"), tr("Switch layout direction"), this);
switchLayoutDirectionAct->setStatusTip(tr("Switch layout Left/Right"));
connect(switchLayoutDirectionAct, SIGNAL(triggered()), this, SLOT(switchLayoutDirection()));
for (int i = 0; i < MaxRecentFiles; ++i) {
recentFileActs[i] = new QAction(this);
recentFileActs[i]->setVisible(false);
@@ -1857,7 +1784,6 @@ void MainWindow::createMenus()
profilesMenu->setIcon(CompanionIcon("profiles.png"));
for (int i=0; i<MAX_PROFILES; ++i)
profilesMenu->addAction(profileActs[i]);
fileMenu->addAction(switchLayoutDirectionAct);
fileMenu->addAction(exitAct);
editMenu = menuBar()->addMenu(tr("&Edit"));
@@ -1883,10 +1809,6 @@ void MainWindow::createMenus()
burnMenu->addAction(burnFusesAct);
burnMenu->addAction(burnListAct);
}
windowMenu = menuBar()->addMenu(tr("&Window"));
updateWindowMenu();
connect(windowMenu, SIGNAL(aboutToShow()), this, SLOT(updateWindowMenu()));
menuBar()->addSeparator();
helpMenu = menuBar()->addMenu(tr("&Help"));
-9
View File
@@ -120,7 +120,6 @@ private slots:
void loadBackup();
void preferences();
void updateMenus();
void updateWindowMenu();
MdiChild *createMdiChild();
void switchLayoutDirection();
void setActiveSubWindow(QWidget *window);
@@ -185,7 +184,6 @@ private:
QMenu *fileMenu;
QMenu *editMenu;
QMenu *burnMenu;
QMenu *windowMenu;
QMenu *helpMenu;
QToolBar *fileToolBar;
QToolBar *editToolBar;
@@ -217,18 +215,11 @@ private:
QAction *burnExtenalToEEPROMAct;
QAction *burnExtenalFromEEPROMAct;
QAction *simulateAct;
QAction *closeAct;
QAction *closeAllAct;
QAction *tileAct;
QAction *cascadeAct;
QAction *nextAct;
QAction *previousAct;
QAction *separatorAct;
QAction *aboutAct;
QAction *printAct;
QAction *loadbackupAct;
QAction *logsAct;
QAction *switchLayoutDirectionAct;
QAction *recentFileActs[MAX_RECENT];
QAction *profileActs[MAX_PROFILES];
QString fwToUpdate;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B