1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

Two new dialogs defined.

This commit is contained in:
Kjell Kernen 2014-02-05 17:44:49 +01:00
parent 8ff61ef915
commit d9f97016e2
10 changed files with 2556 additions and 0 deletions

View file

@ -49,6 +49,8 @@
#include "comparedialog.h"
#include "logsdialog.h"
#include "preferencesdialog.h"
#include "apppreferencesdialog.h"
#include "fwpreferencesdialog.h"
#include "flashinterface.h"
#include "fusesdialog.h"
#include "downloaddialog.h"
@ -819,6 +821,32 @@ void MainWindow::preferences()
updateMenus();
}
void MainWindow::appPreferences()
{
appPreferencesDialog *pd = new appPreferencesDialog(this);
pd->exec();
updateMenus();
}
void MainWindow::fwPreferences()
{
fwPreferencesDialog *pd = new fwPreferencesDialog(this);
pd->exec();
FirmwareInfo *firmware = GetCurrentFirmware();
if (ActiveProfile) {
setWindowTitle(tr("Companion - Models and Settings Editor - %1 - profile %2").arg(firmware->name).arg(ActiveProfileName));
}
else {
setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name));
}
foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
mdiChild->eepromInterfaceChanged();
}
updateMenus();
}
void MainWindow::contributors()
{
contributorsDialog *cd = new contributorsDialog(this,0);
@ -1671,6 +1699,14 @@ void MainWindow::createActions()
preferencesAct->setStatusTip(tr("Edit general preferences"));
connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences()));
appPreferencesAct = new QAction(tr("&Application Preferences..."), this);
appPreferencesAct->setStatusTip(tr("Edit application preferences"));
connect(appPreferencesAct, SIGNAL(triggered()), this, SLOT(appPreferences()));
fwPreferencesAct = new QAction(tr("&Firmware Preferences..."), this);
fwPreferencesAct->setStatusTip(tr("Edit firmware preferences"));
connect(fwPreferencesAct, SIGNAL(triggered()), this, SLOT(fwPreferences()));
checkForUpdatesAct = new QAction(CompanionIcon("update.png"), tr("&Check for updates..."), this);
checkForUpdatesAct->setStatusTip(tr("Check for new version of Companion"));
connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates()));
@ -1927,6 +1963,8 @@ void MainWindow::createMenus()
iconThemeSizeMenu->addAction(bigIconAct);
iconThemeSizeMenu->addAction(hugeIconAct);
settingsMenu->addSeparator();
settingsMenu->addAction(appPreferencesAct);
settingsMenu->addAction(fwPreferencesAct);
settingsMenu->addAction(preferencesAct);
settingsMenu->addAction(customizeSplashAct);
settingsMenu->addAction(burnConfigAct);
@ -2010,6 +2048,7 @@ void MainWindow::createToolBars()
fileToolBar->addAction(saveAct);
fileToolBar->addAction(logsAct);
fileToolBar->addSeparator();
fileToolBar->addAction(fwPreferencesAct);
fileToolBar->addAction(preferencesAct);
profileButton = new QToolButton;
profileButton->setPopupMode(QToolButton::InstantPopup);