tabs
This commit is contained in:
parent
075aaf34d8
commit
8274369575
5 changed files with 38 additions and 3 deletions
|
@ -9,6 +9,8 @@ set(APP_VERSION "2.0.0-prealpha-2")
|
|||
set(APP_AUTHOR "Martin Rotter")
|
||||
set(APP_URL "http://rssguard.sf.net")
|
||||
|
||||
option(USE_QT_5 "Use Qt 5 for building" OFF)
|
||||
|
||||
message(STATUS "[${APP_LOW_NAME}] Welcome to ${APP_NAME} compilation process.")
|
||||
message(STATUS "[${APP_LOW_NAME}] Compilation process begins right now.")
|
||||
|
||||
|
|
|
@ -452,6 +452,9 @@ void FormSettings::loadInterface() {
|
|||
m_ui->m_checkNewTabDoubleClick->setChecked(settings->value(APP_CFG_GUI,
|
||||
"tab_new_double_button",
|
||||
true).toBool());
|
||||
m_ui->m_hideTabBarIfOneTabVisible->setChecked(settings->value(APP_CFG_GUI,
|
||||
"hide_tabbar_one_tab",
|
||||
true).toBool());
|
||||
}
|
||||
|
||||
void FormSettings::saveInterface() {
|
||||
|
@ -489,4 +492,6 @@ void FormSettings::saveInterface() {
|
|||
m_ui->m_checkCloseTabsDoubleClick->isChecked());
|
||||
settings->setValue(APP_CFG_GUI, "tab_new_double_button",
|
||||
m_ui->m_checkNewTabDoubleClick->isChecked());
|
||||
settings->setValue(APP_CFG_GUI, "hide_tabbar_one_tab",
|
||||
m_ui->m_hideTabBarIfOneTabVisible->isChecked());
|
||||
}
|
||||
|
|
|
@ -69,8 +69,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>585</width>
|
||||
<height>368</height>
|
||||
<width>100</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
|
@ -115,7 +115,7 @@
|
|||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabIconSkin">
|
||||
<attribute name="title">
|
||||
|
@ -189,6 +189,11 @@
|
|||
<property name="expandsOnDoubleClick">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
|
@ -334,6 +339,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="m_hideTabBarIfOneTabVisible">
|
||||
<property name="text">
|
||||
<string>Hide tab bar if just one tab is visible</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -27,6 +27,19 @@ void TabWidget::setupCornerButton() {
|
|||
setCornerWidget(m_cornerButton);
|
||||
}
|
||||
|
||||
void TabWidget::tabInserted(int index) {
|
||||
QTabWidget::tabInserted(index);
|
||||
|
||||
// TODO: Opravit tento řádek, aby se korektně tabbar skrýval a objevoval atp.
|
||||
tabBar()->setVisible(count() > 1 && Settings::getInstance()->value(APP_CFG_GUI,
|
||||
"hide_tabbar_one_tab",
|
||||
true).toBool());
|
||||
}
|
||||
|
||||
void TabWidget::tabRemoved(int index) {
|
||||
QTabWidget::tabRemoved(index);
|
||||
}
|
||||
|
||||
void TabWidget::createConnections() {
|
||||
connect(m_cornerButton, SIGNAL(clicked()), this, SLOT(addEmptyBrowser()));
|
||||
connect(tabBar(), SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
|
||||
|
|
|
@ -46,6 +46,9 @@ class TabWidget : public QTabWidget {
|
|||
|
||||
// Sets up properties of custom corner button.
|
||||
void setupCornerButton();
|
||||
|
||||
void tabInserted(int index);
|
||||
void tabRemoved(int index);
|
||||
|
||||
public slots:
|
||||
void fixContentAfterIndexChange(int from);
|
||||
|
|
Loading…
Add table
Reference in a new issue