Make Ctrl+Tab key combo cycle main tabs

This commit is contained in:
Mark Watkins 2011-10-28 21:31:31 +10:00
parent c17b6ff183
commit 49ae2f0b83
4 changed files with 20 additions and 1 deletions

View File

@ -2286,6 +2286,10 @@ void gGraphView::wheelEvent(QWheelEvent * event)
void gGraphView::keyPressEvent(QKeyEvent * event)
{
if (event->key()==Qt::Key_Tab) {
event->ignore();
return;
}
gGraph *g;
for (int i=0;i<m_graphs.size();i++) {
if (m_graphs[i]->group()==0) {

View File

@ -529,3 +529,13 @@ void MainWindow::on_action_Link_Graph_Groups_toggled(bool arg1)
PROFILE["LinkGroups"]=arg1;
if (daily) daily->RedrawGraphs();
}
void MainWindow::on_action_CycleTabs_triggered()
{
int i;
qDebug() << "Switching Tabs";
i=ui->tabWidget->currentIndex()+1;
if (i >= ui->tabWidget->count())
i=0;
ui->tabWidget->setCurrentIndex(i);
}

View File

@ -102,6 +102,8 @@ private slots:
void on_action_Link_Graph_Groups_toggled(bool arg1);
void on_action_CycleTabs_triggered();
private:
Ui::MainWindow *ui;
Daily * daily;

View File

@ -657,10 +657,13 @@
<string>F4</string>
</property>
</action>
<action name="action_2">
<action name="action_CycleTabs">
<property name="text">
<string>-</string>
</property>
<property name="shortcut">
<string>Ctrl+Tab</string>
</property>
</action>
<action name="actionUse_AntiAliasing">
<property name="checkable">