mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Change the order of the quadrants
At least to me it seems more natural to enumerate them row by row instead of column by column, so now we do 1 2 instead of 1 3 3 4 2 4 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ca154a65da
commit
3296089953
2 changed files with 11 additions and 11 deletions
|
@ -63,11 +63,11 @@ MainWindow::MainWindow() : QMainWindow(),
|
||||||
DivePlannerWidget *plannerWidget = new DivePlannerWidget();
|
DivePlannerWidget *plannerWidget = new DivePlannerWidget();
|
||||||
PlannerDetails *plannerDetails = new PlannerDetails();
|
PlannerDetails *plannerDetails = new PlannerDetails();
|
||||||
|
|
||||||
registerApplicationState("Default", mainTab, diveListView, profileWidget, globeGps );
|
registerApplicationState("Default", mainTab, profileWidget, diveListView, globeGps );
|
||||||
registerApplicationState("AddDive", mainTab, diveListView, profileWidget, globeGps );
|
registerApplicationState("AddDive", mainTab, profileWidget, diveListView, globeGps );
|
||||||
registerApplicationState("EditDive", mainTab, diveListView, profileWidget, globeGps );
|
registerApplicationState("EditDive", mainTab, profileWidget, diveListView, globeGps );
|
||||||
registerApplicationState("PlanDive", plannerWidget, plannerSettings, profileWidget, plannerDetails );
|
registerApplicationState("PlanDive", plannerWidget, profileWidget, plannerSettings, plannerDetails );
|
||||||
registerApplicationState("EditPlannedDive", plannerWidget, diveListView, profileWidget, globeGps );
|
registerApplicationState("EditPlannedDive", plannerWidget, profileWidget, diveListView, globeGps );
|
||||||
setApplicationState("Default");
|
setApplicationState("Default");
|
||||||
|
|
||||||
ui.multiFilter->hide();
|
ui.multiFilter->hide();
|
||||||
|
@ -1513,9 +1513,9 @@ void MainWindow::checkForUndoAndRedo()
|
||||||
ui.action_Redo->setEnabled(undoBuffer->canRedo());
|
ui.action_Redo->setEnabled(undoBuffer->canRedo());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *bottomLeft, QWidget *topRight, QWidget *bottomRight)
|
void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight)
|
||||||
{
|
{
|
||||||
applicationState[state] = WidgetForQuadrant(topLeft, bottomLeft, topRight, bottomRight);
|
applicationState[state] = WidgetForQuadrant(topLeft, topRight, bottomLeft, bottomRight);
|
||||||
if (ui.topLeft->indexOf(topLeft) == -1) {
|
if (ui.topLeft->indexOf(topLeft) == -1) {
|
||||||
ui.topLeft->addWidget(topLeft);
|
ui.topLeft->addWidget(topLeft);
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,7 +199,7 @@ private:
|
||||||
void saveSplitterSizes();
|
void saveSplitterSizes();
|
||||||
QString lastUsedDir();
|
QString lastUsedDir();
|
||||||
void updateLastUsedDir(const QString &s);
|
void updateLastUsedDir(const QString &s);
|
||||||
void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *bottomLeft, QWidget *topRight, QWidget *bottomRight);
|
void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight);
|
||||||
bool filesAsArguments;
|
bool filesAsArguments;
|
||||||
UpdateManager *updateManager;
|
UpdateManager *updateManager;
|
||||||
|
|
||||||
|
@ -211,11 +211,11 @@ private:
|
||||||
QList<QAction *> profileToolbarActions;
|
QList<QAction *> profileToolbarActions;
|
||||||
|
|
||||||
struct WidgetForQuadrant {
|
struct WidgetForQuadrant {
|
||||||
WidgetForQuadrant(QWidget *tl = 0, QWidget *bl = 0, QWidget *tr = 0, QWidget *br = 0) :
|
WidgetForQuadrant(QWidget *tl = 0, QWidget *tr = 0, QWidget *bl = 0, QWidget *br = 0) :
|
||||||
topLeft(tl), bottomLeft(bl), topRight(tr), bottomRight(br) {}
|
topLeft(tl), topRight(tr), bottomLeft(bl), bottomRight(br) {}
|
||||||
QWidget *topLeft;
|
QWidget *topLeft;
|
||||||
QWidget *bottomLeft;
|
|
||||||
QWidget *topRight;
|
QWidget *topRight;
|
||||||
|
QWidget *bottomLeft;
|
||||||
QWidget *bottomRight;
|
QWidget *bottomRight;
|
||||||
};
|
};
|
||||||
QHash<QByteArray, WidgetForQuadrant> applicationState;
|
QHash<QByteArray, WidgetForQuadrant> applicationState;
|
||||||
|
|
Loading…
Reference in a new issue