mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
F9 and F10 hotkeys to hide daily panel sidebar and calendar
This commit is contained in:
parent
754b79b096
commit
592b6c271b
2
configure
vendored
2
configure
vendored
@ -23,4 +23,4 @@ if [[ -z ${QMAKE} ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Finally, configure the build.
|
# Finally, configure the build.
|
||||||
qmake-qt5 "${DIR}"
|
${QMAKE} "${DIR}"
|
||||||
|
@ -1876,7 +1876,7 @@ void gGraphView::keyPressEvent(QKeyEvent *event)
|
|||||||
p_profile->appearance->setLineCursorMode(!p_profile->appearance->lineCursorMode());
|
p_profile->appearance->setLineCursorMode(!p_profile->appearance->lineCursorMode());
|
||||||
timedRedraw(0);
|
timedRedraw(0);
|
||||||
}
|
}
|
||||||
if (event->key() == Qt::Key_F10) {
|
if ((event->key() == Qt::Key_F10) && (event->modifiers() == Qt::ShiftModifier)) {
|
||||||
dumpInfo();
|
dumpInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
const int build_number = 7;
|
const int build_number = 8;
|
||||||
|
@ -51,6 +51,23 @@ inline QString channelInfo(ChannelID code) {
|
|||||||
return schema::channel[code].fullname()+"\n"+schema::channel[code].description()+"\n("+schema::channel[code].units()+")";
|
return schema::channel[code].fullname()+"\n"+schema::channel[code].description()+"\n("+schema::channel[code].units()+")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Daily::setCalendarVisible(bool visible)
|
||||||
|
{
|
||||||
|
on_calButton_toggled(visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Daily::setSidebarVisible(bool visible)
|
||||||
|
{
|
||||||
|
QList<int> a;
|
||||||
|
|
||||||
|
int panel_width = visible ? 350 : 0;
|
||||||
|
a.push_back(panel_width);
|
||||||
|
a.push_back(this->width() - panel_width);
|
||||||
|
ui->splitter_2->setStretchFactor(1,1);
|
||||||
|
ui->splitter_2->setSizes(a);
|
||||||
|
ui->splitter_2->setStretchFactor(1,1);
|
||||||
|
}
|
||||||
|
|
||||||
Daily::Daily(QWidget *parent,gGraphView * shared)
|
Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||||
:QWidget(parent), ui(new Ui::Daily)
|
:QWidget(parent), ui(new Ui::Daily)
|
||||||
{
|
{
|
||||||
|
@ -139,6 +139,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Unload(QDate date=QDate());
|
void Unload(QDate date=QDate());
|
||||||
|
|
||||||
|
void setSidebarVisible(bool visible);
|
||||||
|
void setCalendarVisible(bool visible);
|
||||||
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
/*! \fn on_calendar_currentPageChanged(int year, int month);
|
/*! \fn on_calendar_currentPageChanged(int year, int month);
|
||||||
|
@ -2495,3 +2495,13 @@ void MainWindow::on_actionToggle_Line_Cursor_toggled(bool b)
|
|||||||
getOverview()->graphView()->timedRedraw(0);
|
getOverview()->graphView()->timedRedraw(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionLeft_Daily_Sidebar_toggled(bool visible)
|
||||||
|
{
|
||||||
|
getDaily()->setSidebarVisible(visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionDaily_Calendar_toggled(bool visible)
|
||||||
|
{
|
||||||
|
getDaily()->setCalendarVisible(visible);
|
||||||
|
}
|
||||||
|
@ -323,6 +323,10 @@ class MainWindow : public QMainWindow
|
|||||||
|
|
||||||
void on_actionToggle_Line_Cursor_toggled(bool arg1);
|
void on_actionToggle_Line_Cursor_toggled(bool arg1);
|
||||||
|
|
||||||
|
void on_actionLeft_Daily_Sidebar_toggled(bool arg1);
|
||||||
|
|
||||||
|
void on_actionDaily_Calendar_toggled(bool arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void importCPAPBackups();
|
void importCPAPBackups();
|
||||||
void finishCPAPImport();
|
void finishCPAPImport();
|
||||||
|
@ -3163,6 +3163,8 @@ border-radius: 10px;
|
|||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionToggle_Line_Cursor"/>
|
<addaction name="actionToggle_Line_Cursor"/>
|
||||||
<addaction name="action_Sidebar_Toggle"/>
|
<addaction name="action_Sidebar_Toggle"/>
|
||||||
|
<addaction name="actionLeft_Daily_Sidebar"/>
|
||||||
|
<addaction name="actionDaily_Calendar"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_Help">
|
<widget class="QMenu" name="menu_Help">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -3481,6 +3483,34 @@ border-radius: 10px;
|
|||||||
<string> </string>
|
<string> </string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionLeft_Daily_Sidebar">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Daily Sidebar</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>F9</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionDaily_Calendar">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Daily Calendar</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>F10</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -1 +1 @@
|
|||||||
7
|
8
|
||||||
|
Loading…
Reference in New Issue
Block a user