diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtMainWindow.cpp | 14 | ||||
-rw-r--r-- | Swift/QtUI/QtMainWindow.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp index af38d68..879a54b 100644 --- a/Swift/QtUI/QtMainWindow.cpp +++ b/Swift/QtUI/QtMainWindow.cpp @@ -93,6 +93,20 @@ QtMainWindow::QtMainWindow(SettingsProvider* settings, UIEventStream* uiEventStr connect(tabs_, SIGNAL(currentChanged(int)), this, SLOT(handleTabChanged(int))); + tabBarCombo_ = NULL; + if (settings_->getSetting(QtUISettingConstants::USE_SCREENREADER)) { + tabs_->tabBar()->hide(); + tabBarCombo_ = new QComboBox(this); + tabBarCombo_->setAccessibleName("Current View"); + tabBarCombo_->addItem(tr("Contacts")); + tabBarCombo_->addItem(tr("Chats")); + tabBarCombo_->addItem(tr("Notices")); + tabBarCombo_->setCurrentIndex(tabs_->currentIndex()); + mainLayout->addWidget(tabBarCombo_); + connect(tabBarCombo_, SIGNAL(currentIndexChanged(int)), tabs_, SLOT(setCurrentIndex(int))); + } + + this->setLayout(mainLayout); QMenu* viewMenu = new QMenu(tr("&View"), this); diff --git a/Swift/QtUI/QtMainWindow.h b/Swift/QtUI/QtMainWindow.h index 627cc17..c489a9e 100644 --- a/Swift/QtUI/QtMainWindow.h +++ b/Swift/QtUI/QtMainWindow.h @@ -93,6 +93,7 @@ namespace Swift { QAction* toggleRequestDeliveryReceipts_; QMenu* serverAdHocMenu_; QtTabWidget* tabs_; + QComboBox* tabBarCombo_; QWidget* contactsTabWidget_; QWidget* eventsTabWidget_; QtEventWindow* eventWindow_; |