Refactor checks for inclusion of TabBoxClients in the client list
REVIEW: 104025
This commit is contained in:
parent
e70b0efeea
commit
76c00aa189
9 changed files with 537 additions and 180 deletions
|
@ -133,25 +133,31 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
|
|||
m_alternativeTabBoxUi->effectConfigButton->setIcon(KIcon("configure"));
|
||||
|
||||
// combo boxes
|
||||
connect(m_primaryTabBoxUi->listModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->desktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->activitiesModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->applicationsModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->minimizedModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->showDesktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->multiScreenModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
// check boxes
|
||||
connect(m_primaryTabBoxUi->showOutlineCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->showTabBox, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->highlightWindowCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_primaryTabBoxUi->showDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
// combo boxes alternative
|
||||
connect(m_alternativeTabBoxUi->listModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->desktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->activitiesModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->applicationsModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->minimizedModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->showDesktopModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->multiScreenModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->switchingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
// check boxes alternative
|
||||
connect(m_alternativeTabBoxUi->showOutlineCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->showTabBox, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->highlightWindowCheck, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
connect(m_alternativeTabBoxUi->showDesktopBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||
|
||||
// effects
|
||||
connect(m_primaryTabBoxUi->effectCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotEffectSelectionChanged(int)));
|
||||
|
@ -224,16 +230,22 @@ void KWinTabBoxConfig::load()
|
|||
|
||||
void KWinTabBoxConfig::loadConfig(const KConfigGroup& config, KWin::TabBox::TabBoxConfig& tabBoxConfig)
|
||||
{
|
||||
tabBoxConfig.setClientListMode(TabBox::TabBoxConfig::ClientListMode(
|
||||
config.readEntry<int>("ListMode", TabBox::TabBoxConfig::defaultListMode())));
|
||||
tabBoxConfig.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(
|
||||
config.readEntry<int>("SwitchingMode", TabBox::TabBoxConfig::defaultSwitchingMode())));
|
||||
tabBoxConfig.setClientDesktopMode(TabBox::TabBoxConfig::ClientDesktopMode(
|
||||
config.readEntry<int>("DesktopMode", TabBox::TabBoxConfig::defaultDesktopMode())));
|
||||
tabBoxConfig.setClientActivitiesMode(TabBox::TabBoxConfig::ClientActivitiesMode(
|
||||
config.readEntry<int>("ActivitiesMode", TabBox::TabBoxConfig::defaultActivitiesMode())));
|
||||
tabBoxConfig.setClientApplicationsMode(TabBox::TabBoxConfig::ClientApplicationsMode(
|
||||
config.readEntry<int>("ApplicationsMode", TabBox::TabBoxConfig::defaultApplicationsMode())));
|
||||
tabBoxConfig.setClientMinimizedMode(TabBox::TabBoxConfig::ClientMinimizedMode(
|
||||
config.readEntry<int>("MinimizedMode", TabBox::TabBoxConfig::defaultMinimizedMode())));
|
||||
tabBoxConfig.setShowDesktopMode(TabBox::TabBoxConfig::ShowDesktopMode(
|
||||
config.readEntry<int>("ShowDesktopMode", TabBox::TabBoxConfig::defaultShowDesktopMode())));
|
||||
tabBoxConfig.setClientMultiScreenMode(TabBox::TabBoxConfig::ClientMultiScreenMode(
|
||||
config.readEntry<int>("MultiScreenMode", TabBox::TabBoxConfig::defaultMultiScreenMode())));
|
||||
tabBoxConfig.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(
|
||||
config.readEntry<int>("SwitchingMode", TabBox::TabBoxConfig::defaultSwitchingMode())));
|
||||
tabBoxConfig.setLayout(TabBox::TabBoxConfig::LayoutMode(
|
||||
config.readEntry<int>("LayoutMode", TabBox::TabBoxConfig::defaultLayoutMode())));
|
||||
tabBoxConfig.setShowDesktop(config.readEntry<bool>("ShowDesktop",
|
||||
TabBox::TabBoxConfig::defaultShowDesktop()));
|
||||
|
||||
tabBoxConfig.setShowOutline(config.readEntry<bool>("ShowOutline",
|
||||
TabBox::TabBoxConfig::defaultShowOutline()));
|
||||
|
@ -254,13 +266,16 @@ void KWinTabBoxConfig::loadConfig(const KConfigGroup& config, KWin::TabBox::TabB
|
|||
void KWinTabBoxConfig::saveConfig(KConfigGroup& config, const KWin::TabBox::TabBoxConfig& tabBoxConfig)
|
||||
{
|
||||
// combo boxes
|
||||
config.writeEntry("ListMode", int(tabBoxConfig.clientListMode()));
|
||||
config.writeEntry("SwitchingMode", int(tabBoxConfig.clientSwitchingMode()));
|
||||
config.writeEntry("DesktopMode", int(tabBoxConfig.clientDesktopMode()));
|
||||
config.writeEntry("ActivitiesMode", int(tabBoxConfig.clientActivitiesMode()));
|
||||
config.writeEntry("ApplicationsMode", int(tabBoxConfig.clientApplicationsMode()));
|
||||
config.writeEntry("MinimizedMode", int(tabBoxConfig.clientMinimizedMode()));
|
||||
config.writeEntry("ShowDesktopMode", int(tabBoxConfig.showDesktopMode()));
|
||||
config.writeEntry("MultiScreenMode", int(tabBoxConfig.clientMultiScreenMode()));
|
||||
config.writeEntry("SwitchingMode", int(tabBoxConfig.clientSwitchingMode()));
|
||||
config.writeEntry("LayoutMode", int(tabBoxConfig.layout()));
|
||||
config.writeEntry("LayoutName", tabBoxConfig.layoutName());
|
||||
config.writeEntry("SelectedLayoutName", tabBoxConfig.selectedItemLayoutName());
|
||||
config.writeEntry("ShowDesktop", tabBoxConfig.isShowDesktop());
|
||||
|
||||
// check boxes
|
||||
config.writeEntry("ShowOutline", tabBoxConfig.isShowOutline());
|
||||
|
@ -357,30 +372,36 @@ void KWinTabBoxConfig::save()
|
|||
void KWinTabBoxConfig::defaults()
|
||||
{
|
||||
// combo boxes
|
||||
m_primaryTabBoxUi->listModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultListMode());
|
||||
m_primaryTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode());
|
||||
m_primaryTabBoxUi->desktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultDesktopMode());
|
||||
m_primaryTabBoxUi->activitiesModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultActivitiesMode());
|
||||
m_primaryTabBoxUi->applicationsModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultApplicationsMode());
|
||||
m_primaryTabBoxUi->minimizedModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMinimizedMode());
|
||||
m_primaryTabBoxUi->showDesktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultShowDesktopMode());
|
||||
m_primaryTabBoxUi->multiScreenModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMultiScreenMode());
|
||||
m_primaryTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode());
|
||||
|
||||
// checkboxes
|
||||
m_primaryTabBoxUi->showOutlineCheck->setChecked(TabBox::TabBoxConfig::defaultShowOutline());
|
||||
m_primaryTabBoxUi->showTabBox->setChecked(TabBox::TabBoxConfig::defaultShowTabBox());
|
||||
m_primaryTabBoxUi->highlightWindowCheck->setChecked(TabBox::TabBoxConfig::defaultHighlightWindow());
|
||||
m_primaryTabBoxUi->showDesktopBox->setChecked(TabBox::TabBoxConfig::defaultShowDesktop());
|
||||
|
||||
// effects
|
||||
m_primaryTabBoxUi->effectCombo->setCurrentIndex(1);
|
||||
|
||||
// alternative
|
||||
// combo boxes
|
||||
m_alternativeTabBoxUi->listModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultListMode());
|
||||
m_alternativeTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode());
|
||||
m_alternativeTabBoxUi->desktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultDesktopMode());
|
||||
m_alternativeTabBoxUi->activitiesModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultActivitiesMode());
|
||||
m_alternativeTabBoxUi->applicationsModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultApplicationsMode());
|
||||
m_alternativeTabBoxUi->minimizedModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMinimizedMode());
|
||||
m_alternativeTabBoxUi->showDesktopModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultShowDesktopMode());
|
||||
m_alternativeTabBoxUi->multiScreenModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultMultiScreenMode());
|
||||
m_alternativeTabBoxUi->switchingModeCombo->setCurrentIndex(TabBox::TabBoxConfig::defaultSwitchingMode());
|
||||
|
||||
// checkboxes
|
||||
m_alternativeTabBoxUi->showOutlineCheck->setChecked(TabBox::TabBoxConfig::defaultShowOutline());
|
||||
m_alternativeTabBoxUi->showTabBox->setChecked(TabBox::TabBoxConfig::defaultShowTabBox());
|
||||
m_alternativeTabBoxUi->highlightWindowCheck->setChecked(TabBox::TabBoxConfig::defaultHighlightWindow());
|
||||
m_alternativeTabBoxUi->showDesktopBox->setChecked(TabBox::TabBoxConfig::defaultShowDesktop());
|
||||
|
||||
// effects
|
||||
m_alternativeTabBoxUi->effectCombo->setCurrentIndex(Layout);
|
||||
|
@ -403,27 +424,33 @@ bool KWinTabBoxConfig::effectEnabled(const QString& effect, const KConfigGroup&
|
|||
void KWinTabBoxConfig::updateUiFromConfig(KWinTabBoxConfigForm* ui, const KWin::TabBox::TabBoxConfig& config)
|
||||
{
|
||||
// combo boxes
|
||||
ui->listModeCombo->setCurrentIndex(config.clientListMode());
|
||||
ui->switchingModeCombo->setCurrentIndex(config.clientSwitchingMode());
|
||||
ui->desktopModeCombo->setCurrentIndex(config.clientDesktopMode());
|
||||
ui->activitiesModeCombo->setCurrentIndex(config.clientActivitiesMode());
|
||||
ui->applicationsModeCombo->setCurrentIndex(config.clientApplicationsMode());
|
||||
ui->minimizedModeCombo->setCurrentIndex(config.clientMinimizedMode());
|
||||
ui->showDesktopModeCombo->setCurrentIndex(config.showDesktopMode());
|
||||
ui->multiScreenModeCombo->setCurrentIndex(config.clientMultiScreenMode());
|
||||
ui->switchingModeCombo->setCurrentIndex(config.clientSwitchingMode());
|
||||
|
||||
// check boxes
|
||||
ui->showOutlineCheck->setChecked(config.isShowOutline());
|
||||
ui->showTabBox->setChecked(config.isShowTabBox());
|
||||
ui->highlightWindowCheck->setChecked(config.isHighlightWindows());
|
||||
ui->showDesktopBox->setChecked(config.isShowDesktop());
|
||||
}
|
||||
|
||||
void KWinTabBoxConfig::updateConfigFromUi(const KWin::KWinTabBoxConfigForm* ui, TabBox::TabBoxConfig& config)
|
||||
{
|
||||
config.setClientListMode(TabBox::TabBoxConfig::ClientListMode(ui->listModeCombo->currentIndex()));
|
||||
config.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(ui->switchingModeCombo->currentIndex()));
|
||||
config.setClientDesktopMode(TabBox::TabBoxConfig::ClientDesktopMode(ui->desktopModeCombo->currentIndex()));
|
||||
config.setClientActivitiesMode(TabBox::TabBoxConfig::ClientActivitiesMode(ui->activitiesModeCombo->currentIndex()));
|
||||
config.setClientApplicationsMode(TabBox::TabBoxConfig::ClientApplicationsMode(ui->applicationsModeCombo->currentIndex()));
|
||||
config.setClientMinimizedMode(TabBox::TabBoxConfig::ClientMinimizedMode(ui->minimizedModeCombo->currentIndex()));
|
||||
config.setShowDesktopMode(TabBox::TabBoxConfig::ShowDesktopMode(ui->showDesktopModeCombo->currentIndex()));
|
||||
config.setClientMultiScreenMode(TabBox::TabBoxConfig::ClientMultiScreenMode(ui->multiScreenModeCombo->currentIndex()));
|
||||
config.setClientSwitchingMode(TabBox::TabBoxConfig::ClientSwitchingMode(ui->switchingModeCombo->currentIndex()));
|
||||
|
||||
config.setShowOutline(ui->showOutlineCheck->isChecked());
|
||||
config.setShowTabBox(ui->showTabBox->isChecked());
|
||||
config.setHighlightWindows(ui->highlightWindowCheck->isChecked());
|
||||
config.setShowDesktop(ui->showDesktopBox->isChecked());
|
||||
}
|
||||
|
||||
void KWinTabBoxConfig::slotEffectSelectionChanged(int index)
|
||||
|
|
|
@ -23,15 +23,15 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>List windows:</string>
|
||||
<string>Desktop:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>listModeCombo</cstring>
|
||||
<cstring>desktopModeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="listModeCombo">
|
||||
<widget class="KComboBox" name="desktopModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -40,38 +40,33 @@
|
|||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Current Desktop</string>
|
||||
<string>Windows from all desktops</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>All Desktops</string>
|
||||
<string>Windows from current desktop only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Current Desktop Grouped by Applications</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>All Desktops Grouped by Applications</string>
|
||||
<string>Exclude windows from current desktop</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Sort order:</string>
|
||||
<string>Activities:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>switchingModeCombo</cstring>
|
||||
<cstring>activitiesModeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="switchingModeCombo">
|
||||
<widget class="KComboBox" name="activitiesModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -80,18 +75,58 @@
|
|||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Recently used</string>
|
||||
<string>Windows from all activities</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Stacking order</string>
|
||||
<string>Windows from current activity only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Exclude windows from current activity</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Applications:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>applicationsModeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="KComboBox" name="applicationsModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>All windows from all applications</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Only one window per application</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>All windows of the current application only</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Minimized:</string>
|
||||
</property>
|
||||
|
@ -100,7 +135,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="KComboBox" name="minimizedModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
|
@ -125,18 +160,103 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Show desktop:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>showDesktopModeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="KComboBox" name="showDesktopModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Do not show desktop</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Show desktop to minimize all windows</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Multi screen:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>multiScreenModeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="KComboBox" name="multiScreenModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Ignore</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Only windows from current screen</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Exclude windows from current screen</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Sort order:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>switchingModeCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="KComboBox" name="switchingModeCombo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Recently used</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Stacking order</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showDesktopBox">
|
||||
<property name="toolTip">
|
||||
<string>Adds an entry to minimize all windows.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Include desktop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
|
@ -164,7 +284,7 @@
|
|||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Effect:</string>
|
||||
</property>
|
||||
|
@ -282,8 +402,14 @@
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>listModeCombo</tabstop>
|
||||
<tabstop>desktopModeCombo</tabstop>
|
||||
<tabstop>activitiesModeCombo</tabstop>
|
||||
<tabstop>applicationsModeCombo</tabstop>
|
||||
<tabstop>minimizedModeCombo</tabstop>
|
||||
<tabstop>showDesktopModeCombo</tabstop>
|
||||
<tabstop>multiScreenModeCombo</tabstop>
|
||||
<tabstop>switchingModeCombo</tabstop>
|
||||
<tabstop>highlightWindowCheck</tabstop>
|
||||
<tabstop>showOutlineCheck</tabstop>
|
||||
<tabstop>effectCombo</tabstop>
|
||||
<tabstop>effectConfigButton</tabstop>
|
||||
|
|
|
@ -183,9 +183,7 @@ void ClientModel::createClientList(int desktop, bool partialReset)
|
|||
TabBoxClient* c = tabBox->nextClientFocusChain(start);
|
||||
TabBoxClient* stop = c;
|
||||
while (c) {
|
||||
TabBoxClient* add = tabBox->clientToAddToList(c, desktop,
|
||||
tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsClientList ||
|
||||
tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList);
|
||||
TabBoxClient* add = tabBox->clientToAddToList(c, desktop);
|
||||
if (add != NULL) {
|
||||
if (start == add) {
|
||||
m_clientList.removeAll(add);
|
||||
|
@ -210,9 +208,7 @@ void ClientModel::createClientList(int desktop, bool partialReset)
|
|||
TabBoxClient* stop = c;
|
||||
int index = 0;
|
||||
while (c) {
|
||||
TabBoxClient* add = tabBox->clientToAddToList(c, desktop,
|
||||
tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsClientList ||
|
||||
tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList);
|
||||
TabBoxClient* add = tabBox->clientToAddToList(c, desktop);
|
||||
if (add != NULL) {
|
||||
if (start == add) {
|
||||
m_clientList.removeAll(add);
|
||||
|
@ -239,7 +235,7 @@ void ClientModel::createClientList(int desktop, bool partialReset)
|
|||
m_clientList.removeAll(c);
|
||||
m_clientList.prepend(c);
|
||||
}
|
||||
if (tabBox->config().isShowDesktop()) {
|
||||
if (tabBox->config().showDesktopMode() == TabBoxConfig::ShowDesktopClient) {
|
||||
TabBoxClient* desktopClient = tabBox->desktopClient();
|
||||
if (desktopClient)
|
||||
m_clientList.append(desktopClient);
|
||||
|
|
|
@ -167,8 +167,7 @@ void DeclarativeView::showEvent(QShowEvent *event)
|
|||
rootObject()->setProperty("screenWidth", m_currentScreenGeometry.width());
|
||||
rootObject()->setProperty("screenHeight", m_currentScreenGeometry.height());
|
||||
rootObject()->setProperty("allDesktops", tabBox->config().tabBoxMode() == TabBoxConfig::ClientTabBox &&
|
||||
((tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsClientList) ||
|
||||
(tabBox->config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList)));
|
||||
tabBox->config().clientDesktopMode() == TabBoxConfig::AllDesktopsClients);
|
||||
if (ClientModel *clientModel = qobject_cast<ClientModel*>(m_model)) {
|
||||
rootObject()->setProperty("longestCaption", clientModel->longestCaption());
|
||||
}
|
||||
|
|
|
@ -121,22 +121,101 @@ TabBoxClient* TabBoxHandlerImpl::activeClient() const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
TabBoxClient* TabBoxHandlerImpl::clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const
|
||||
bool TabBoxHandlerImpl::checkDesktop(TabBoxClient* client, int desktop) const
|
||||
{
|
||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||
|
||||
switch (config().clientDesktopMode()) {
|
||||
case TabBoxConfig::AllDesktopsClients:
|
||||
return true;
|
||||
case TabBoxConfig::ExcludeCurrentDesktopClients:
|
||||
return !current->isOnDesktop(desktop);
|
||||
default: // TabBoxConfig::OnlyCurrentDesktopClients
|
||||
return current->isOnDesktop(desktop);
|
||||
}
|
||||
}
|
||||
|
||||
bool TabBoxHandlerImpl::checkActivity(TabBoxClient* client) const
|
||||
{
|
||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||
|
||||
switch (config().clientActivitiesMode()) {
|
||||
case TabBoxConfig::AllActivitiesClients:
|
||||
return true;
|
||||
case TabBoxConfig::ExcludeCurrentActivityClients:
|
||||
return !current->isOnCurrentActivity();
|
||||
default: // TabBoxConfig::OnlyCurrentActivityClients
|
||||
return current->isOnCurrentActivity();
|
||||
}
|
||||
}
|
||||
|
||||
bool TabBoxHandlerImpl::checkApplications(TabBoxClient* client) const
|
||||
{
|
||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||
TabBoxClientImpl* c;
|
||||
QListIterator< TabBoxClient* > i(clientList());
|
||||
|
||||
switch (config().clientApplicationsMode()) {
|
||||
case TabBoxConfig::OneWindowPerApplication:
|
||||
// check if the list already contains an entry of this application
|
||||
while (i.hasNext()) {
|
||||
if ((c = dynamic_cast< TabBoxClientImpl* >(i.next()))) {
|
||||
if (c->client()->resourceClass() == current->resourceClass()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case TabBoxConfig::AllWindowsCurrentApplication:
|
||||
if ((c = dynamic_cast< TabBoxClientImpl* >(tabBox->activeClient()))) {
|
||||
if (c->client()->resourceClass() == current->resourceClass()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
default: // TabBoxConfig::AllWindowsAllApplications
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool TabBoxHandlerImpl::checkMinimized(TabBoxClient* client) const
|
||||
{
|
||||
switch (config().clientMinimizedMode()) {
|
||||
case TabBoxConfig::ExcludeMinimizedClients:
|
||||
return !client->isMinimized();
|
||||
case TabBoxConfig::OnlyMinimizedClients:
|
||||
return client->isMinimized();
|
||||
default: // TabBoxConfig::IgnoreMinimizedStatus
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool TabBoxHandlerImpl::checkMultiScreen(TabBoxClient* client) const
|
||||
{
|
||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||
Workspace* workspace = Workspace::self();
|
||||
|
||||
switch (config().clientMultiScreenMode()) {
|
||||
case TabBoxConfig::IgnoreMultiScreen:
|
||||
return true;
|
||||
case TabBoxConfig::ExcludeCurrentScreenClients:
|
||||
return current->screen() != workspace->activeScreen();
|
||||
default: // TabBoxConfig::OnlyCurrentScreenClients
|
||||
return current->screen() == workspace->activeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
TabBoxClient* TabBoxHandlerImpl::clientToAddToList(TabBoxClient* client, int desktop) const
|
||||
{
|
||||
Client* ret = NULL;
|
||||
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
|
||||
bool addClient = false;
|
||||
bool applications = (config().clientListMode() == TabBoxConfig::AllDesktopsApplicationList ||
|
||||
config().clientListMode() == TabBoxConfig::CurrentDesktopApplicationList);
|
||||
if (allDesktops)
|
||||
addClient = true;
|
||||
else
|
||||
addClient = current->isOnDesktop(desktop);
|
||||
addClient = addClient && current->isOnCurrentActivity();
|
||||
|
||||
bool addClient = checkDesktop(client, desktop)
|
||||
&& checkActivity(client)
|
||||
&& checkApplications(client)
|
||||
&& checkMinimized(client)
|
||||
&& checkMultiScreen(client);
|
||||
addClient = addClient && current->wantsTabFocus() && !current->skipSwitcher();
|
||||
addClient = addClient && !(current->isMinimized() && config().clientMinimizedMode() == TabBoxConfig::ExcludeMinimizedClients );
|
||||
addClient = addClient && !(!current->isMinimized() && config().clientMinimizedMode() == TabBoxConfig::OnlyMinimizedClients);
|
||||
if (addClient) {
|
||||
// don't add windows that have modal dialogs
|
||||
Client* modal = current->findModal();
|
||||
|
@ -147,21 +226,6 @@ TabBoxClient* TabBoxHandlerImpl::clientToAddToList(TabBoxClient* client, int des
|
|||
else {
|
||||
// nothing
|
||||
}
|
||||
if (ret && applications) {
|
||||
// check if the list already contains an entry of this application
|
||||
foreach (TabBoxClient * tabBoxClient, clientList()) {
|
||||
if (TabBoxClientImpl* c = dynamic_cast< TabBoxClientImpl* >(tabBoxClient)) {
|
||||
if (c->client()->resourceClass() == ret->resourceClass()) {
|
||||
ret = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (options->isSeparateScreenFocus()) {
|
||||
if (current->screen() != workspace->activeScreen())
|
||||
ret = NULL;
|
||||
}
|
||||
if (ret)
|
||||
return ret->tabBoxClient();
|
||||
|
@ -307,27 +371,37 @@ TabBox::TabBox(QObject *parent)
|
|||
m_isShown = false;
|
||||
m_defaultConfig = TabBoxConfig();
|
||||
m_defaultConfig.setTabBoxMode(TabBoxConfig::ClientTabBox);
|
||||
m_defaultConfig.setClientListMode(TabBoxConfig::CurrentDesktopClientList);
|
||||
m_defaultConfig.setClientDesktopMode(TabBoxConfig::OnlyCurrentDesktopClients);
|
||||
m_defaultConfig.setClientActivitiesMode(TabBoxConfig::OnlyCurrentActivityClients);
|
||||
m_defaultConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsAllApplications);
|
||||
m_defaultConfig.setClientMinimizedMode(TabBoxConfig::IgnoreMinimizedStatus);
|
||||
m_defaultConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient);
|
||||
m_defaultConfig.setClientMultiScreenMode(TabBoxConfig::OnlyCurrentScreenClients);
|
||||
m_defaultConfig.setClientSwitchingMode(TabBoxConfig::FocusChainSwitching);
|
||||
m_defaultConfig.setLayout(TabBoxConfig::VerticalLayout);
|
||||
|
||||
m_alternativeConfig = TabBoxConfig();
|
||||
m_alternativeConfig.setTabBoxMode(TabBoxConfig::ClientTabBox);
|
||||
m_alternativeConfig.setClientListMode(TabBoxConfig::AllDesktopsClientList);
|
||||
m_alternativeConfig.setClientDesktopMode(TabBoxConfig::AllDesktopsClients);
|
||||
m_alternativeConfig.setClientActivitiesMode(TabBoxConfig::OnlyCurrentActivityClients);
|
||||
m_alternativeConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsAllApplications);
|
||||
m_alternativeConfig.setClientMinimizedMode(TabBoxConfig::IgnoreMinimizedStatus);
|
||||
m_alternativeConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient);
|
||||
m_alternativeConfig.setClientMultiScreenMode(TabBoxConfig::OnlyCurrentScreenClients);
|
||||
m_alternativeConfig.setClientSwitchingMode(TabBoxConfig::FocusChainSwitching);
|
||||
m_alternativeConfig.setLayout(TabBoxConfig::VerticalLayout);
|
||||
|
||||
m_desktopConfig = TabBoxConfig();
|
||||
m_desktopConfig.setTabBoxMode(TabBoxConfig::DesktopTabBox);
|
||||
m_desktopConfig.setShowTabBox(true);
|
||||
m_desktopConfig.setShowDesktop(false);
|
||||
m_desktopConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient);
|
||||
m_desktopConfig.setDesktopSwitchingMode(TabBoxConfig::MostRecentlyUsedDesktopSwitching);
|
||||
m_desktopConfig.setLayout(TabBoxConfig::VerticalLayout);
|
||||
|
||||
m_desktopListConfig = TabBoxConfig();
|
||||
m_desktopListConfig.setTabBoxMode(TabBoxConfig::DesktopTabBox);
|
||||
m_desktopListConfig.setShowTabBox(true);
|
||||
m_desktopListConfig.setShowDesktop(false);
|
||||
m_desktopListConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient);
|
||||
m_desktopListConfig.setDesktopSwitchingMode(TabBoxConfig::StaticDesktopSwitching);
|
||||
m_desktopListConfig.setLayout(TabBoxConfig::VerticalLayout);
|
||||
m_tabBox = new TabBoxHandlerImpl(this);
|
||||
|
@ -576,12 +650,20 @@ void TabBox::reconfigure()
|
|||
|
||||
void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig)
|
||||
{
|
||||
tabBoxConfig.setClientListMode(TabBoxConfig::ClientListMode(
|
||||
config.readEntry<int>("ListMode", TabBoxConfig::defaultListMode())));
|
||||
tabBoxConfig.setClientSwitchingMode(TabBoxConfig::ClientSwitchingMode(
|
||||
config.readEntry<int>("SwitchingMode", TabBoxConfig::defaultSwitchingMode())));
|
||||
tabBoxConfig.setClientDesktopMode(TabBoxConfig::ClientDesktopMode(
|
||||
config.readEntry<int>("DesktopMode", TabBoxConfig::defaultDesktopMode())));
|
||||
tabBoxConfig.setClientActivitiesMode(TabBoxConfig::ClientActivitiesMode(
|
||||
config.readEntry<int>("ActivitiesMode", TabBoxConfig::defaultActivitiesMode())));
|
||||
tabBoxConfig.setClientApplicationsMode(TabBoxConfig::ClientApplicationsMode(
|
||||
config.readEntry<int>("ApplicationsMode", TabBoxConfig::defaultApplicationsMode())));
|
||||
tabBoxConfig.setClientMinimizedMode(TabBoxConfig::ClientMinimizedMode(
|
||||
config.readEntry<int>("MinimizedMode", TabBoxConfig::defaultMinimizedMode())));
|
||||
tabBoxConfig.setShowDesktopMode(TabBoxConfig::ShowDesktopMode(
|
||||
config.readEntry<int>("ShowDesktopMode", TabBoxConfig::defaultShowDesktopMode())));
|
||||
tabBoxConfig.setClientMultiScreenMode(TabBoxConfig::ClientMultiScreenMode(
|
||||
config.readEntry<int>("MultiScreenMode", TabBoxConfig::defaultMultiScreenMode())));
|
||||
tabBoxConfig.setClientSwitchingMode(TabBoxConfig::ClientSwitchingMode(
|
||||
config.readEntry<int>("SwitchingMode", TabBoxConfig::defaultSwitchingMode())));
|
||||
|
||||
tabBoxConfig.setShowOutline(config.readEntry<bool>("ShowOutline",
|
||||
TabBoxConfig::defaultShowOutline()));
|
||||
|
@ -589,8 +671,6 @@ void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig)
|
|||
TabBoxConfig::defaultShowTabBox()));
|
||||
tabBoxConfig.setHighlightWindows(config.readEntry<bool>("HighlightWindows",
|
||||
TabBoxConfig::defaultHighlightWindow()));
|
||||
tabBoxConfig.setShowDesktop(config.readEntry<bool>("ShowDesktop",
|
||||
TabBoxConfig::defaultShowDesktop()));
|
||||
|
||||
tabBoxConfig.setLayoutName(config.readEntry<QString>("LayoutName", TabBoxConfig::defaultLayoutName()));
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
virtual TabBoxClientList stackingOrder() const;
|
||||
virtual void raiseClient(TabBoxClient *client) const;
|
||||
virtual void restack(TabBoxClient *c, TabBoxClient *under);
|
||||
virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const;
|
||||
virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop) const;
|
||||
virtual TabBoxClient* desktopClient() const;
|
||||
virtual void hideOutline();
|
||||
virtual void showOutline(const QRect &outline);
|
||||
|
@ -64,6 +64,12 @@ public:
|
|||
virtual void activateAndClose();
|
||||
|
||||
private:
|
||||
bool checkDesktop(TabBoxClient* client, int desktop) const;
|
||||
bool checkActivity(TabBoxClient* client) const;
|
||||
bool checkApplications(TabBoxClient* client) const;
|
||||
bool checkMinimized(TabBoxClient* client) const;
|
||||
bool checkMultiScreen(TabBoxClient* client) const;
|
||||
|
||||
TabBox* m_tabBox;
|
||||
};
|
||||
|
||||
|
|
|
@ -33,15 +33,18 @@ public:
|
|||
, showOutline(TabBoxConfig::defaultShowOutline())
|
||||
, tabBoxMode(TabBoxConfig::ClientTabBox)
|
||||
, layout(TabBoxConfig::defaultLayoutMode())
|
||||
, clientListMode(TabBoxConfig::defaultListMode())
|
||||
, clientSwitchingMode(TabBoxConfig::defaultSwitchingMode())
|
||||
, clientDesktopMode(TabBoxConfig::defaultDesktopMode())
|
||||
, clientActivitiesMode(TabBoxConfig::defaultActivitiesMode())
|
||||
, clientApplicationsMode(TabBoxConfig::defaultApplicationsMode())
|
||||
, clientMinimizedMode(TabBoxConfig::defaultMinimizedMode())
|
||||
, showDesktopMode(TabBoxConfig::defaultShowDesktopMode())
|
||||
, clientMultiScreenMode(TabBoxConfig::defaultMultiScreenMode())
|
||||
, clientSwitchingMode(TabBoxConfig::defaultSwitchingMode())
|
||||
, desktopSwitchingMode(TabBoxConfig::MostRecentlyUsedDesktopSwitching)
|
||||
, minWidth(TabBoxConfig::defaultMinWidth())
|
||||
, minHeight(TabBoxConfig::defaultMinHeight())
|
||||
, layoutName(TabBoxConfig::defaultLayoutName())
|
||||
, selectedItemLayoutName(TabBoxConfig::defaultSelectedItemLayoutName())
|
||||
, showDesktop(TabBoxConfig::defaultShowDesktop()) {
|
||||
, selectedItemLayoutName(TabBoxConfig::defaultSelectedItemLayoutName()) {
|
||||
}
|
||||
~TabBoxConfigPrivate() {
|
||||
}
|
||||
|
@ -51,15 +54,18 @@ public:
|
|||
|
||||
TabBoxConfig::TabBoxMode tabBoxMode;
|
||||
TabBoxConfig::LayoutMode layout;
|
||||
TabBoxConfig::ClientListMode clientListMode;
|
||||
TabBoxConfig::ClientSwitchingMode clientSwitchingMode;
|
||||
TabBoxConfig::ClientDesktopMode clientDesktopMode;
|
||||
TabBoxConfig::ClientActivitiesMode clientActivitiesMode;
|
||||
TabBoxConfig::ClientApplicationsMode clientApplicationsMode;
|
||||
TabBoxConfig::ClientMinimizedMode clientMinimizedMode;
|
||||
TabBoxConfig::ShowDesktopMode showDesktopMode;
|
||||
TabBoxConfig::ClientMultiScreenMode clientMultiScreenMode;
|
||||
TabBoxConfig::ClientSwitchingMode clientSwitchingMode;
|
||||
TabBoxConfig::DesktopSwitchingMode desktopSwitchingMode;
|
||||
int minWidth;
|
||||
int minHeight;
|
||||
QString layoutName;
|
||||
QString selectedItemLayoutName;
|
||||
bool showDesktop;
|
||||
};
|
||||
|
||||
TabBoxConfig::TabBoxConfig()
|
||||
|
@ -78,11 +84,13 @@ TabBoxConfig& TabBoxConfig::operator=(const KWin::TabBox::TabBoxConfig& object)
|
|||
d->highlightWindows = object.isHighlightWindows();
|
||||
d->showOutline = object.isShowOutline();
|
||||
d->tabBoxMode = object.tabBoxMode();
|
||||
d->showDesktop = object.isShowDesktop();
|
||||
d->layout = object.layout();
|
||||
d->clientListMode = object.clientListMode();
|
||||
d->clientSwitchingMode = object.clientSwitchingMode();
|
||||
d->clientDesktopMode = object.clientDesktopMode();
|
||||
d->clientActivitiesMode = object.clientActivitiesMode();
|
||||
d->clientApplicationsMode = object.clientApplicationsMode();
|
||||
d->clientMinimizedMode = object.clientMinimizedMode();
|
||||
d->showDesktopMode = object.showDesktopMode();
|
||||
d->clientMultiScreenMode = object.clientMultiScreenMode();
|
||||
d->desktopSwitchingMode = object.desktopSwitchingMode();
|
||||
d->selectedItemLayoutName = object.selectedItemLayoutName();
|
||||
d->minWidth = object.minWidth();
|
||||
|
@ -141,24 +149,34 @@ TabBoxConfig::LayoutMode TabBoxConfig::layout() const
|
|||
return d->layout;
|
||||
}
|
||||
|
||||
TabBoxConfig::ClientListMode TabBoxConfig::clientListMode() const
|
||||
TabBoxConfig::ClientDesktopMode TabBoxConfig::clientDesktopMode() const
|
||||
{
|
||||
return d->clientListMode;
|
||||
return d->clientDesktopMode;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setClientListMode(ClientListMode listMode)
|
||||
void TabBoxConfig::setClientDesktopMode(ClientDesktopMode desktopMode)
|
||||
{
|
||||
d->clientListMode = listMode;
|
||||
d->clientDesktopMode = desktopMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::ClientSwitchingMode TabBoxConfig::clientSwitchingMode() const
|
||||
TabBoxConfig::ClientActivitiesMode TabBoxConfig::clientActivitiesMode() const
|
||||
{
|
||||
return d->clientSwitchingMode;
|
||||
return d->clientActivitiesMode;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setClientSwitchingMode(ClientSwitchingMode switchingMode)
|
||||
void TabBoxConfig::setClientActivitiesMode(ClientActivitiesMode activitiesMode)
|
||||
{
|
||||
d->clientSwitchingMode = switchingMode;
|
||||
d->clientActivitiesMode = activitiesMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::ClientApplicationsMode TabBoxConfig::clientApplicationsMode() const
|
||||
{
|
||||
return d->clientApplicationsMode;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setClientApplicationsMode(ClientApplicationsMode applicationsMode)
|
||||
{
|
||||
d->clientApplicationsMode = applicationsMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::ClientMinimizedMode TabBoxConfig::clientMinimizedMode() const
|
||||
|
@ -171,6 +189,36 @@ void TabBoxConfig::setClientMinimizedMode(ClientMinimizedMode minimizedMode)
|
|||
d->clientMinimizedMode = minimizedMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::ShowDesktopMode TabBoxConfig::showDesktopMode() const
|
||||
{
|
||||
return d->showDesktopMode;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setShowDesktopMode(ShowDesktopMode showDesktopMode)
|
||||
{
|
||||
d->showDesktopMode = showDesktopMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::ClientMultiScreenMode TabBoxConfig::clientMultiScreenMode() const
|
||||
{
|
||||
return d->clientMultiScreenMode;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setClientMultiScreenMode(ClientMultiScreenMode multiScreenMode)
|
||||
{
|
||||
d->clientMultiScreenMode = multiScreenMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::ClientSwitchingMode TabBoxConfig::clientSwitchingMode() const
|
||||
{
|
||||
return d->clientSwitchingMode;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setClientSwitchingMode(ClientSwitchingMode switchingMode)
|
||||
{
|
||||
d->clientSwitchingMode = switchingMode;
|
||||
}
|
||||
|
||||
TabBoxConfig::DesktopSwitchingMode TabBoxConfig::desktopSwitchingMode() const
|
||||
{
|
||||
return d->desktopSwitchingMode;
|
||||
|
@ -221,15 +269,5 @@ void TabBoxConfig::setSelectedItemLayoutName(const QString& name)
|
|||
d->selectedItemLayoutName = name;
|
||||
}
|
||||
|
||||
bool TabBoxConfig::isShowDesktop() const
|
||||
{
|
||||
return d->showDesktop;
|
||||
}
|
||||
|
||||
void TabBoxConfig::setShowDesktop(bool show)
|
||||
{
|
||||
d->showDesktop = show;
|
||||
}
|
||||
|
||||
} // namespace TabBox
|
||||
} // namespace KWin
|
||||
|
|
|
@ -61,14 +61,57 @@ public:
|
|||
HorizontalVerticalLayout ///< Items are laid out in a tabular. Number of columns might be greater by one than number of rows
|
||||
};
|
||||
/**
|
||||
* ClientListMode defines the mode used to create the TabBoxClient List
|
||||
* in the TabBoxClientModel
|
||||
* ClientDesktopMode defines whether windows from the current desktop or from all
|
||||
* desktops are included in the TabBoxClient List in the TabBoxClientModel
|
||||
*/
|
||||
enum ClientListMode {
|
||||
CurrentDesktopClientList, ///< Only TabBoxClients on current desktop are included
|
||||
AllDesktopsClientList, ///< TabBoxClients from all desktops are included.
|
||||
CurrentDesktopApplicationList, ///< Only one TabBoxClient for each application on current desktop is included
|
||||
AllDesktopsApplicationList ///< Only one TabBoxClient for each application is included
|
||||
enum ClientDesktopMode {
|
||||
AllDesktopsClients, ///< TabBoxClients from all desktops are included.
|
||||
OnlyCurrentDesktopClients, ///< Only TabBoxClients on current desktop are included
|
||||
ExcludeCurrentDesktopClients ///< Exclude TabBoxClients on current desktop
|
||||
};
|
||||
/**
|
||||
* ClientActivitiesMode defines whether windows from the current activity or from all
|
||||
* activities are included in the TabBoxClient List in the TabBoxClientModel
|
||||
*/
|
||||
enum ClientActivitiesMode {
|
||||
AllActivitiesClients, ///< TabBoxClients from all Activities are included.
|
||||
OnlyCurrentActivityClients, ///< Only TabBoxClients on current activity are included
|
||||
ExcludeCurrentActivityClients ///< Exclude TabBoxClients on current activity
|
||||
};
|
||||
/**
|
||||
* ClientApplicationsMode defines which windows from the current application or from all
|
||||
* applications are included in the TabBoxClient List in the TabBoxClientModel
|
||||
*/
|
||||
enum ClientApplicationsMode {
|
||||
AllWindowsAllApplications, ///< TabBoxClients from all applications are included
|
||||
OneWindowPerApplication, ///< Only one TabBoxClient for each application is included
|
||||
AllWindowsCurrentApplication ///< Only TabBoxClients for the current application are included
|
||||
};
|
||||
/**
|
||||
* ClientMinimizedMode defines which windows are included in the TabBoxClient List
|
||||
* in the TabBoxClientModel based on whether they are minimized or not
|
||||
*/
|
||||
enum ClientMinimizedMode {
|
||||
IgnoreMinimizedStatus, ///< TabBoxClients are included no matter they are minimized or not
|
||||
ExcludeMinimizedClients, ///< Exclude minimized TabBoxClients
|
||||
OnlyMinimizedClients ///< Only minimized TabBoxClients are included
|
||||
};
|
||||
/**
|
||||
* ShowDesktopMode defines whether a TabBoxClient representing the desktop
|
||||
* is included in the TabBoxClient List in the TabBoxClientModel
|
||||
*/
|
||||
enum ShowDesktopMode {
|
||||
DoNotShowDesktopClient, ///< A TabBoxClient representing the desktop is not included
|
||||
ShowDesktopClient ///< A TabBoxClient representing the desktop is included
|
||||
};
|
||||
/**
|
||||
* ClientActivitiesMode defines whether windows from the current activity or from all
|
||||
* activities are included in the TabBoxClient List in the TabBoxClientModel
|
||||
*/
|
||||
enum ClientMultiScreenMode {
|
||||
IgnoreMultiScreen, ///< TabBoxClients are included independently of the screen they are on
|
||||
OnlyCurrentScreenClients, ///< Only TabBoxClients on current screen are included
|
||||
ExcludeCurrentScreenClients ///< Exclude TabBoxClients from the current screen
|
||||
};
|
||||
/**
|
||||
* ClientSwitchingMode defines the sorting of the TabBoxClients in the
|
||||
|
@ -79,15 +122,6 @@ public:
|
|||
StackingOrderSwitching ///< Sort by current stacking order
|
||||
};
|
||||
/**
|
||||
* ClientMinimizedMode defines the mode used to create the TabBoxClient List
|
||||
* in the TabBoxClientModel
|
||||
*/
|
||||
enum ClientMinimizedMode {
|
||||
IgnoreMinimizedStatus, ///< TabBoxClients are included no matter they are minimized or not
|
||||
ExcludeMinimizedClients, ///< Exclude minimized TabBoxClients
|
||||
OnlyMinimizedClients ///< Only minimized TabBoxClients are included
|
||||
};
|
||||
/**
|
||||
* DesktopSwitchingMode defines the sorting of the desktops in the
|
||||
* TabBoxDesktopModel.
|
||||
*/
|
||||
|
@ -141,19 +175,26 @@ public:
|
|||
*/
|
||||
LayoutMode layout() const;
|
||||
/**
|
||||
* @return The current ClientListMode
|
||||
* @return The current ClientDesktopMode
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see setClientListMode
|
||||
* @see defaultListMode
|
||||
* @see setClientDesktopMode
|
||||
* @see defaultDesktopMode
|
||||
*/
|
||||
ClientListMode clientListMode() const;
|
||||
ClientDesktopMode clientDesktopMode() const;
|
||||
/**
|
||||
* @return The current ClientSwitchingMode.
|
||||
* @return The current ClientActivitiesMode
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see setClientSwitchingMode
|
||||
* @see defaultSwitchingMode
|
||||
* @see setClientActivitiesMode
|
||||
* @see defaultActivitiesMode
|
||||
*/
|
||||
ClientSwitchingMode clientSwitchingMode() const;
|
||||
ClientActivitiesMode clientActivitiesMode() const;
|
||||
/**
|
||||
* @return The current ClientApplicationsMode
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see setClientApplicationsMode
|
||||
* @see defaultApplicationsMode
|
||||
*/
|
||||
ClientApplicationsMode clientApplicationsMode() const;
|
||||
/**
|
||||
* @return The current ClientMinimizedMode
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
|
@ -162,6 +203,27 @@ public:
|
|||
*/
|
||||
ClientMinimizedMode clientMinimizedMode() const;
|
||||
/**
|
||||
* @return The current ShowDesktopMode
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see setShowDesktopMode
|
||||
* @see defaultShowDesktopMode
|
||||
*/
|
||||
ShowDesktopMode showDesktopMode() const;
|
||||
/**
|
||||
* @return The current ClientMultiScreenMode
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see setClientMultiScreenMode
|
||||
* @see defaultMultiScreenMode
|
||||
*/
|
||||
ClientMultiScreenMode clientMultiScreenMode() const;
|
||||
/**
|
||||
* @return The current ClientSwitchingMode.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see setClientSwitchingMode
|
||||
* @see defaultSwitchingMode
|
||||
*/
|
||||
ClientSwitchingMode clientSwitchingMode() const;
|
||||
/**
|
||||
* @return The current DesktopSwitchingMode
|
||||
* This option only applies for TabBoxMode DesktopTabBox.
|
||||
* @see setDesktopSwitchingMode
|
||||
|
@ -191,11 +253,6 @@ public:
|
|||
* @see setlayoutName
|
||||
*/
|
||||
QString& selectedItemLayoutName() const;
|
||||
/**
|
||||
* @return If an item for minimizing all windows to the desktop should be included.
|
||||
* @see setShowDesktop
|
||||
*/
|
||||
bool isShowDesktop() const;
|
||||
|
||||
// setters
|
||||
/**
|
||||
|
@ -227,17 +284,23 @@ public:
|
|||
*/
|
||||
void setLayout(LayoutMode layout);
|
||||
/**
|
||||
* @param listMode The new ClientListMode to be used.
|
||||
* @param desktopMode The new ClientDesktopMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see clientListMode
|
||||
* @see clientDesktopMode
|
||||
*/
|
||||
void setClientListMode(ClientListMode listMode);
|
||||
void setClientDesktopMode(ClientDesktopMode desktopMode);
|
||||
/**
|
||||
* @param switchingMode The new ClientSwitchingMode to be used.
|
||||
* @param activitiesMode The new ClientActivitiesMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see clientSwitchingMode
|
||||
* @see clientActivitiesMode
|
||||
*/
|
||||
void setClientSwitchingMode(ClientSwitchingMode switchingMode);
|
||||
void setClientActivitiesMode(ClientActivitiesMode activitiesMode);
|
||||
/**
|
||||
* @param applicationsMode The new ClientApplicationsMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see clientApplicationsMode
|
||||
*/
|
||||
void setClientApplicationsMode(ClientApplicationsMode applicationsMode);
|
||||
/**
|
||||
* @param minimizedMode The new ClientMinimizedMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
|
@ -245,6 +308,24 @@ public:
|
|||
*/
|
||||
void setClientMinimizedMode(ClientMinimizedMode minimizedMode);
|
||||
/**
|
||||
* @param showDesktopMode The new ShowDesktopMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see showDesktopMode
|
||||
*/
|
||||
void setShowDesktopMode(ShowDesktopMode showDesktopMode);
|
||||
/**
|
||||
* @param multiScreenMode The new ClientMultiScreenMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see clientMultiScreenMode
|
||||
*/
|
||||
void setClientMultiScreenMode(ClientMultiScreenMode multiScreenMode);
|
||||
/**
|
||||
* @param switchingMode The new ClientSwitchingMode to be used.
|
||||
* This option only applies for TabBoxMode ClientTabBox.
|
||||
* @see clientSwitchingMode
|
||||
*/
|
||||
void setClientSwitchingMode(ClientSwitchingMode switchingMode);
|
||||
/**
|
||||
* @param switchingMode The new DesktopSwitchingMode to be used.
|
||||
* This option only applies for TabBoxMode DesktopTabBox.
|
||||
* @see desktopSwitchingMode
|
||||
|
@ -270,22 +351,29 @@ public:
|
|||
* @see selectedItemLayoutName
|
||||
*/
|
||||
void setSelectedItemLayoutName(const QString& name);
|
||||
/**
|
||||
* @param show Include item to minimize all windows to the desktop
|
||||
* @see isShowDesktop
|
||||
*/
|
||||
void setShowDesktop(bool show);
|
||||
|
||||
// some static methods to access default values
|
||||
static ClientListMode defaultListMode() {
|
||||
return CurrentDesktopClientList;
|
||||
static ClientDesktopMode defaultDesktopMode() {
|
||||
return OnlyCurrentDesktopClients;
|
||||
}
|
||||
static ClientSwitchingMode defaultSwitchingMode() {
|
||||
return FocusChainSwitching;
|
||||
static ClientActivitiesMode defaultActivitiesMode() {
|
||||
return OnlyCurrentActivityClients;
|
||||
}
|
||||
static ClientApplicationsMode defaultApplicationsMode() {
|
||||
return AllWindowsAllApplications;
|
||||
}
|
||||
static ClientMinimizedMode defaultMinimizedMode() {
|
||||
return IgnoreMinimizedStatus;
|
||||
}
|
||||
static ShowDesktopMode defaultShowDesktopMode() {
|
||||
return DoNotShowDesktopClient;
|
||||
}
|
||||
static ClientMultiScreenMode defaultMultiScreenMode() {
|
||||
return OnlyCurrentScreenClients;
|
||||
}
|
||||
static ClientSwitchingMode defaultSwitchingMode() {
|
||||
return FocusChainSwitching;
|
||||
}
|
||||
static LayoutMode defaultLayoutMode() {
|
||||
return VerticalLayout;
|
||||
}
|
||||
|
@ -310,9 +398,6 @@ public:
|
|||
static QString defaultSelectedItemLayoutName() {
|
||||
return QString("Text");
|
||||
}
|
||||
static bool defaultShowDesktop() {
|
||||
return false;
|
||||
}
|
||||
private:
|
||||
TabBoxConfigPrivate* d;
|
||||
};
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
* @param allDesktops Add clients from all desktops or only from current
|
||||
* @return The client to be included in the list or NULL if it isn't to be included
|
||||
*/
|
||||
virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop, bool allDesktops) const = 0;
|
||||
virtual TabBoxClient* clientToAddToList(TabBoxClient* client, int desktop) const = 0;
|
||||
/**
|
||||
* @return The first desktop window in the stacking order.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue