mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Add show/hide statusbar option
This commit is contained in:
parent
1f9ccb44a3
commit
0940a8a764
@ -181,6 +181,16 @@ void Preferences::setToolbarDisplayed(bool displayed)
|
|||||||
setValue("Preferences/General/ToolbarDisplayed", displayed);
|
setValue("Preferences/General/ToolbarDisplayed", displayed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Preferences::isStatusbarDisplayed() const
|
||||||
|
{
|
||||||
|
return value("Preferences/General/StatusbarDisplayed", true).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Preferences::setStatusbarDisplayed(bool displayed)
|
||||||
|
{
|
||||||
|
setValue("Preferences/General/StatusbarDisplayed", displayed);
|
||||||
|
}
|
||||||
|
|
||||||
bool Preferences::minimizeToTray() const
|
bool Preferences::minimizeToTray() const
|
||||||
{
|
{
|
||||||
return value("Preferences/General/MinimizeToTray", false).toBool();
|
return value("Preferences/General/MinimizeToTray", false).toBool();
|
||||||
|
@ -119,6 +119,8 @@ public:
|
|||||||
void setSystrayIntegration(bool enabled);
|
void setSystrayIntegration(bool enabled);
|
||||||
bool isToolbarDisplayed() const;
|
bool isToolbarDisplayed() const;
|
||||||
void setToolbarDisplayed(bool displayed);
|
void setToolbarDisplayed(bool displayed);
|
||||||
|
bool isStatusbarDisplayed() const;
|
||||||
|
void setStatusbarDisplayed(bool displayed);
|
||||||
bool minimizeToTray() const;
|
bool minimizeToTray() const;
|
||||||
void setMinimizeToTray(bool b);
|
void setMinimizeToTray(bool b);
|
||||||
bool closeToTray() const;
|
bool closeToTray() const;
|
||||||
|
@ -300,6 +300,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
// View settings
|
// View settings
|
||||||
m_ui->actionTopToolBar->setChecked(pref->isToolbarDisplayed());
|
m_ui->actionTopToolBar->setChecked(pref->isToolbarDisplayed());
|
||||||
|
m_ui->actionShowStatusbar->setChecked(pref->isStatusbarDisplayed());
|
||||||
m_ui->actionSpeedInTitleBar->setChecked(pref->speedInTitleBar());
|
m_ui->actionSpeedInTitleBar->setChecked(pref->speedInTitleBar());
|
||||||
m_ui->actionRSSReader->setChecked(pref->isRSSWidgetEnabled());
|
m_ui->actionRSSReader->setChecked(pref->isRSSWidgetEnabled());
|
||||||
m_ui->actionSearchWidget->setChecked(pref->isSearchEnabled());
|
m_ui->actionSearchWidget->setChecked(pref->isSearchEnabled());
|
||||||
@ -1284,6 +1285,8 @@ void MainWindow::loadPreferences(bool configureSession)
|
|||||||
m_ui->toolBar->setVisible(false);
|
m_ui->toolBar->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_statusBar->setVisible(pref->isStatusbarDisplayed());
|
||||||
|
|
||||||
if (pref->preventFromSuspend() && !m_preventTimer->isActive()) {
|
if (pref->preventFromSuspend() && !m_preventTimer->isActive()) {
|
||||||
m_preventTimer->start(PREVENT_SUSPEND_INTERVAL);
|
m_preventTimer->start(PREVENT_SUSPEND_INTERVAL);
|
||||||
}
|
}
|
||||||
@ -1543,6 +1546,13 @@ void MainWindow::on_actionTopToolBar_triggered()
|
|||||||
Preferences::instance()->setToolbarDisplayed(isVisible);
|
Preferences::instance()->setToolbarDisplayed(isVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionShowStatusbar_triggered()
|
||||||
|
{
|
||||||
|
bool isVisible = static_cast<QAction*>(sender())->isChecked();
|
||||||
|
m_statusBar->setVisible(isVisible);
|
||||||
|
Preferences::instance()->setStatusbarDisplayed(isVisible);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionSpeedInTitleBar_triggered()
|
void MainWindow::on_actionSpeedInTitleBar_triggered()
|
||||||
{
|
{
|
||||||
m_displaySpeedInTitle = static_cast<QAction * >(sender())->isChecked();
|
m_displaySpeedInTitle = static_cast<QAction * >(sender())->isChecked();
|
||||||
|
@ -155,6 +155,7 @@ private slots:
|
|||||||
void on_actionRSSReader_triggered();
|
void on_actionRSSReader_triggered();
|
||||||
void on_actionSpeedInTitleBar_triggered();
|
void on_actionSpeedInTitleBar_triggered();
|
||||||
void on_actionTopToolBar_triggered();
|
void on_actionTopToolBar_triggered();
|
||||||
|
void on_actionShowStatusbar_triggered();
|
||||||
void on_actionDonateMoney_triggered();
|
void on_actionDonateMoney_triggered();
|
||||||
void on_actionExecutionLogs_triggered(bool checked);
|
void on_actionExecutionLogs_triggered(bool checked);
|
||||||
void on_actionNormalMessages_triggered(bool checked);
|
void on_actionNormalMessages_triggered(bool checked);
|
||||||
|
@ -110,6 +110,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionTopToolBar"/>
|
<addaction name="actionTopToolBar"/>
|
||||||
|
<addaction name="actionShowStatusbar"/>
|
||||||
<addaction name="actionSpeedInTitleBar"/>
|
<addaction name="actionSpeedInTitleBar"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionSearchWidget"/>
|
<addaction name="actionSearchWidget"/>
|
||||||
@ -300,6 +301,14 @@
|
|||||||
<string>Display Top Toolbar</string>
|
<string>Display Top Toolbar</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionShowStatusbar">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Status &Bar</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="actionSpeedInTitleBar">
|
<action name="actionSpeedInTitleBar">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user