Drop KDE4Support in kde-workspace/kwin
REVIEW: 114316
This commit is contained in:
parent
f7ff03f30b
commit
f8468b4043
28 changed files with 313 additions and 273 deletions
|
@ -33,7 +33,6 @@ target_link_libraries(kcm_kwindecoration
|
||||||
KF5::KCompletion
|
KF5::KCompletion
|
||||||
KF5::KI18n
|
KF5::KI18n
|
||||||
KF5::KNewStuff
|
KF5::KNewStuff
|
||||||
KF5::KDE4Support
|
|
||||||
)
|
)
|
||||||
install(TARGETS kcm_kwindecoration DESTINATION ${PLUGIN_INSTALL_DIR} )
|
install(TARGETS kcm_kwindecoration DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDrag>
|
#include <QDrag>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QFontDatabase>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
|
||||||
#include <KDE/KLocalizedString>
|
#include <KDE/KLocalizedString>
|
||||||
#include <kglobalsettings.h>
|
|
||||||
|
|
||||||
#ifdef KWIN_BUILD_KAPPMENU
|
#ifdef KWIN_BUILD_KAPPMENU
|
||||||
#include <KConfigGroup>
|
#include <KConfigGroup>
|
||||||
|
@ -616,7 +616,7 @@ void ButtonDropSite::paintEvent(QPaintEvent* /*pe*/)
|
||||||
QColor c1(palette().color(QPalette::Mid));
|
QColor c1(palette().color(QPalette::Mid));
|
||||||
p.fillRect(r, c1);
|
p.fillRect(r, c1);
|
||||||
p.setPen(palette().color(QPalette::WindowText));
|
p.setPen(palette().color(QPalette::WindowText));
|
||||||
p.setFont(KGlobalSettings::windowTitleFont());
|
p.setFont(QFontDatabase::systemFont(QFontDatabase::TitleFont));
|
||||||
p.drawText(r.adjusted(4, 0, -4, 0), Qt::AlignLeft | Qt::AlignVCenter, i18n("KDE"));
|
p.drawText(r.adjusted(4, 0, -4, 0), Qt::AlignLeft | Qt::AlignVCenter, i18n("KDE"));
|
||||||
|
|
||||||
offset = geometry().width() - 3 - rightoffset;
|
offset = geometry().width() - 3 - rightoffset;
|
||||||
|
|
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "kwindecoration.h"
|
#include "kwindecoration.h"
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
|
||||||
#include <KDE/KLocalizedString>
|
#include <KDE/KLocalizedString>
|
||||||
#include <kdecoration.h>
|
#include <kdecoration.h>
|
||||||
|
@ -35,27 +36,30 @@ KWinDecorationButtonsConfigForm::KWinDecorationButtonsConfigForm(QWidget* parent
|
||||||
}
|
}
|
||||||
|
|
||||||
KWinDecorationButtonsConfigDialog::KWinDecorationButtonsConfigDialog(DecorationButtons const *buttons, bool showTooltips, QWidget* parent, Qt::WFlags flags)
|
KWinDecorationButtonsConfigDialog::KWinDecorationButtonsConfigDialog(DecorationButtons const *buttons, bool showTooltips, QWidget* parent, Qt::WFlags flags)
|
||||||
: KDialog(parent, flags)
|
: QDialog(parent, flags)
|
||||||
|
, m_ui(new KWinDecorationButtonsConfigForm(this))
|
||||||
, m_showTooltip(showTooltips)
|
, m_showTooltip(showTooltips)
|
||||||
, m_buttons(buttons)
|
, m_buttons(buttons)
|
||||||
{
|
{
|
||||||
m_ui = new KWinDecorationButtonsConfigForm(this);
|
|
||||||
setWindowTitle(i18n("Buttons"));
|
setWindowTitle(i18n("Buttons"));
|
||||||
setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default | KDialog::Reset);
|
m_buttonBox = new QDialogButtonBox(this);
|
||||||
enableButton(KDialog::Reset, false);
|
m_buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Reset);
|
||||||
|
m_buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(false);
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout;
|
QVBoxLayout* layout = new QVBoxLayout;
|
||||||
|
layout->addWidget(m_buttonBox);
|
||||||
layout->addWidget(m_ui);
|
layout->addWidget(m_ui);
|
||||||
m_ui->buttonPositionWidget->setEnabled(buttons->customPositions());
|
m_ui->buttonPositionWidget->setEnabled(buttons->customPositions());
|
||||||
|
|
||||||
QWidget* main = new QWidget(this);
|
setLayout(layout);
|
||||||
main->setLayout(layout);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
connect(m_ui->buttonPositionWidget, SIGNAL(changed()), this, SLOT(changed()));
|
connect(m_ui->buttonPositionWidget, SIGNAL(changed()), this, SLOT(changed()));
|
||||||
connect(m_ui->showToolTipsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->showToolTipsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
connect(m_ui->useCustomButtonPositionsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
connect(m_ui->useCustomButtonPositionsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(changed()));
|
||||||
connect(this, SIGNAL(defaultClicked()), this, SLOT(slotDefaultClicked()));
|
connect(m_buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked(bool)), this, SLOT(slotDefaultClicked()));
|
||||||
connect(this, SIGNAL(resetClicked()), this, SLOT(slotResetClicked()));
|
connect(m_buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked(bool)), this, SLOT(slotResetClicked()));
|
||||||
|
connect(m_buttonBox, SIGNAL(accepted()), SLOT(accept()));
|
||||||
|
connect(m_buttonBox, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
|
||||||
slotResetClicked();
|
slotResetClicked();
|
||||||
}
|
}
|
||||||
|
@ -86,7 +90,7 @@ QList<KDecorationDefines::DecorationButton> KWinDecorationButtonsConfigDialog::b
|
||||||
|
|
||||||
void KWinDecorationButtonsConfigDialog::changed()
|
void KWinDecorationButtonsConfigDialog::changed()
|
||||||
{
|
{
|
||||||
enableButton(KDialog::Reset, true);
|
m_buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinDecorationButtonsConfigDialog::slotDefaultClicked()
|
void KWinDecorationButtonsConfigDialog::slotDefaultClicked()
|
||||||
|
@ -105,7 +109,8 @@ void KWinDecorationButtonsConfigDialog::slotResetClicked()
|
||||||
m_ui->buttonPositionWidget->setButtonsLeft(m_buttons->leftButtons());
|
m_ui->buttonPositionWidget->setButtonsLeft(m_buttons->leftButtons());
|
||||||
m_ui->buttonPositionWidget->setButtonsRight(m_buttons->rightButtons());
|
m_ui->buttonPositionWidget->setButtonsRight(m_buttons->rightButtons());
|
||||||
changed();
|
changed();
|
||||||
enableButton(KDialog::Reset, false);
|
|
||||||
|
m_buttonBox->button(QDialogButtonBox::Reset)->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -21,10 +21,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#define KWINDECORATIONBUTTONSCONFIGDIALOG_H
|
#define KWINDECORATIONBUTTONSCONFIGDIALOG_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <KDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
#include "ui_buttons.h"
|
#include "ui_buttons.h"
|
||||||
|
|
||||||
|
class QDialogButtonBox;
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -38,7 +39,7 @@ public:
|
||||||
explicit KWinDecorationButtonsConfigForm(QWidget* parent);
|
explicit KWinDecorationButtonsConfigForm(QWidget* parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class KWinDecorationButtonsConfigDialog : public KDialog
|
class KWinDecorationButtonsConfigDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -59,6 +60,7 @@ private:
|
||||||
KWinDecorationButtonsConfigForm* m_ui;
|
KWinDecorationButtonsConfigForm* m_ui;
|
||||||
bool m_showTooltip;
|
bool m_showTooltip;
|
||||||
DecorationButtons const *m_buttons;
|
DecorationButtons const *m_buttons;
|
||||||
|
QDialogButtonBox* m_buttonBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -23,9 +23,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <QDBusMessage>
|
#include <QDBusMessage>
|
||||||
|
|
||||||
#include <KLibrary>
|
#include <KLibrary>
|
||||||
#include <KVBox>
|
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
#include <KConfigGroup>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
@ -69,7 +71,7 @@ KWinDecorationConfigForm::KWinDecorationConfigForm(QWidget* parent)
|
||||||
KWinDecorationConfigDialog::KWinDecorationConfigDialog(QString deco, const QList<QVariant>& borderSizes,
|
KWinDecorationConfigDialog::KWinDecorationConfigDialog(QString deco, const QList<QVariant>& borderSizes,
|
||||||
KDecorationDefines::BorderSize size,
|
KDecorationDefines::BorderSize size,
|
||||||
QWidget* parent, Qt::WFlags flags)
|
QWidget* parent, Qt::WFlags flags)
|
||||||
: KDialog(parent, flags)
|
: QDialog(parent, flags)
|
||||||
, m_borderSizes(borderSizes)
|
, m_borderSizes(borderSizes)
|
||||||
, m_kwinConfig(KSharedConfig::openConfig("kwinrc"))
|
, m_kwinConfig(KSharedConfig::openConfig("kwinrc"))
|
||||||
, m_pluginObject(0)
|
, m_pluginObject(0)
|
||||||
|
@ -77,10 +79,15 @@ KWinDecorationConfigDialog::KWinDecorationConfigDialog(QString deco, const QList
|
||||||
{
|
{
|
||||||
m_ui = new KWinDecorationConfigForm(this);
|
m_ui = new KWinDecorationConfigForm(this);
|
||||||
setWindowTitle(i18n("Decoration Options"));
|
setWindowTitle(i18n("Decoration Options"));
|
||||||
setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default | KDialog::Reset);
|
|
||||||
enableButton(KDialog::Reset, false);
|
m_buttons = new QDialogButtonBox(this);
|
||||||
|
m_buttons->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Reset);
|
||||||
|
m_buttons->button(QDialogButtonBox::Reset)->setEnabled(false);
|
||||||
QVBoxLayout* layout = new QVBoxLayout;
|
QVBoxLayout* layout = new QVBoxLayout;
|
||||||
layout->addWidget(m_ui);
|
layout->addWidget(m_ui);
|
||||||
|
layout->addWidget(m_buttons);
|
||||||
|
connect(m_buttons, SIGNAL(accepted()), SLOT(accept()));
|
||||||
|
connect(m_buttons, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
|
||||||
KLibrary library(styleToConfigLib(deco));
|
KLibrary library(styleToConfigLib(deco));
|
||||||
if (library.load()) {
|
if (library.load()) {
|
||||||
|
@ -88,15 +95,16 @@ KWinDecorationConfigDialog::KWinDecorationConfigDialog(QString deco, const QList
|
||||||
if (alloc_ptr != NULL) {
|
if (alloc_ptr != NULL) {
|
||||||
allocatePlugin = (QObject * (*)(KConfigGroup & conf, QWidget * parent))alloc_ptr;
|
allocatePlugin = (QObject * (*)(KConfigGroup & conf, QWidget * parent))alloc_ptr;
|
||||||
KConfigGroup config(m_kwinConfig, "Style");
|
KConfigGroup config(m_kwinConfig, "Style");
|
||||||
m_pluginConfigWidget = new KVBox(this);
|
m_pluginConfigWidget = new QWidget(this);
|
||||||
|
m_pluginConfigWidget->setLayout(new QVBoxLayout);
|
||||||
m_pluginObject = (QObject*)(allocatePlugin(config, m_pluginConfigWidget));
|
m_pluginObject = (QObject*)(allocatePlugin(config, m_pluginConfigWidget));
|
||||||
|
|
||||||
// connect required signals and slots together...
|
// connect required signals and slots together...
|
||||||
connect(this, SIGNAL(accepted()), this, SLOT(slotAccepted()));
|
connect(this, SIGNAL(accepted()), this, SLOT(slotAccepted()));
|
||||||
connect(m_pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged()));
|
connect(m_pluginObject, SIGNAL(changed()), this, SLOT(slotSelectionChanged()));
|
||||||
connect(this, SIGNAL(pluginSave(KConfigGroup&)), m_pluginObject, SLOT(save(KConfigGroup&)));
|
connect(this, SIGNAL(pluginSave(KConfigGroup&)), m_pluginObject, SLOT(save(KConfigGroup&)));
|
||||||
connect(this, SIGNAL(defaultClicked()), m_pluginObject, SLOT(defaults()));
|
connect(m_buttons->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked(bool)), m_pluginObject, SLOT(defaults()));
|
||||||
connect(this, SIGNAL(defaultClicked()), SLOT(slotDefault()));
|
connect(m_buttons->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked(bool)), SLOT(slotDefault()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,9 +124,7 @@ KWinDecorationConfigDialog::KWinDecorationConfigDialog(QString deco, const QList
|
||||||
m_ui->borderLabel->hide();
|
m_ui->borderLabel->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget* main = new QWidget(this);
|
setLayout(layout);
|
||||||
main->setLayout(layout);
|
|
||||||
setMainWidget(main);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KWinDecorationConfigDialog::~KWinDecorationConfigDialog()
|
KWinDecorationConfigDialog::~KWinDecorationConfigDialog()
|
||||||
|
@ -153,7 +159,7 @@ void KWinDecorationConfigDialog::slotAccepted()
|
||||||
|
|
||||||
void KWinDecorationConfigDialog::slotSelectionChanged()
|
void KWinDecorationConfigDialog::slotSelectionChanged()
|
||||||
{
|
{
|
||||||
enableButton(KDialog::Reset, true);
|
m_buttons->button(QDialogButtonBox::Reset)->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString KWinDecorationConfigDialog::styleToConfigLib(const QString& styleLib) const
|
QString KWinDecorationConfigDialog::styleToConfigLib(const QString& styleLib) const
|
||||||
|
|
|
@ -20,11 +20,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#ifndef KWINDECORATIONCONFIGDIALOG_H
|
#ifndef KWINDECORATIONCONFIGDIALOG_H
|
||||||
#define KWINDECORATIONCONFIGDIALOG_H
|
#define KWINDECORATIONCONFIGDIALOG_H
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <kdialog.h>
|
#include <QDialog>
|
||||||
#include <kdecoration.h>
|
#include <kdecoration.h>
|
||||||
|
#include <KSharedConfig>
|
||||||
#include "ui_config.h"
|
#include "ui_config.h"
|
||||||
#include "ui_auroraeconfig.h"
|
#include "ui_auroraeconfig.h"
|
||||||
|
|
||||||
|
class QDialogButtonBox;
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -47,7 +49,7 @@ public:
|
||||||
explicit KWinDecorationConfigForm(QWidget* parent);
|
explicit KWinDecorationConfigForm(QWidget* parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
class KWinDecorationConfigDialog : public KDialog, public KDecorationDefines
|
class KWinDecorationConfigDialog : public QDialog, public KDecorationDefines
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -78,6 +80,7 @@ private:
|
||||||
QObject*(*allocatePlugin)(KConfigGroup& conf, QWidget* parent);
|
QObject*(*allocatePlugin)(KConfigGroup& conf, QWidget* parent);
|
||||||
QObject* m_pluginObject;
|
QObject* m_pluginObject;
|
||||||
QWidget* m_pluginConfigWidget;
|
QWidget* m_pluginConfigWidget;
|
||||||
|
QDialogButtonBox* m_buttons;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace KWin
|
} // namespace KWin
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,100,1">
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,100,1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="KLineEdit" name="searchEdit">
|
<widget class="KLineEdit" name="searchEdit">
|
||||||
<property name="clickMessage">
|
<property name="clickMessage" stdset="0">
|
||||||
<string>Search</string>
|
<string>Search</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="showClearButton" stdset="0">
|
<property name="showClearButton" stdset="0">
|
||||||
|
@ -53,21 +53,21 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="configureDecorationButton">
|
<widget class="QPushButton" name="configureDecorationButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Configure Decoration...</string>
|
<string>Configure Decoration...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="configureButtonsButton">
|
<widget class="QPushButton" name="configureButtonsButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Configure Buttons...</string>
|
<string>Configure Buttons...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="ghnsButton">
|
<widget class="QPushButton" name="ghnsButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Get New Decorations...</string>
|
<string>Get New Decorations...</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -78,21 +78,11 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>QDeclarativeView</class>
|
|
||||||
<extends>QGraphicsView</extends>
|
|
||||||
<header>QtDeclarative/QDeclarativeView</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>KLineEdit</class>
|
<class>KLineEdit</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>klineedit.h</header>
|
<header>klineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>searchEdit</tabstop>
|
<tabstop>searchEdit</tabstop>
|
||||||
|
|
|
@ -367,12 +367,17 @@ void KWinDecorationModule::slotConfigureDecoration()
|
||||||
bool reload = false;
|
bool reload = false;
|
||||||
if (index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::AuroraeDecoration ||
|
if (index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::AuroraeDecoration ||
|
||||||
index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::QmlDecoration) {
|
index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::QmlDecoration) {
|
||||||
QPointer< KDialog > dlg = new KDialog(this);
|
QPointer<QDialog> dlg = new QDialog(this);
|
||||||
dlg->setCaption(i18n("Decoration Options"));
|
dlg->setWindowTitle(i18n("Decoration Options"));
|
||||||
dlg->setButtons(KDialog::Ok | KDialog::Cancel);
|
|
||||||
KWinAuroraeConfigForm *form = new KWinAuroraeConfigForm(dlg);
|
KWinAuroraeConfigForm *form = new KWinAuroraeConfigForm(dlg);
|
||||||
form->enableNoSideBorderSupport(index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::QmlDecoration);
|
form->enableNoSideBorderSupport(index.data(DecorationModel::TypeRole).toInt() == DecorationModelData::QmlDecoration);
|
||||||
dlg->setMainWidget(form);
|
setLayout(new QVBoxLayout);
|
||||||
|
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, dlg.data());
|
||||||
|
connect(buttons, SIGNAL(accepted()), dlg, SLOT(accept()));
|
||||||
|
connect(buttons, SIGNAL(rejected()), dlg, SLOT(reject()));
|
||||||
|
layout()->addWidget(form);
|
||||||
|
layout()->addWidget(buttons);
|
||||||
|
|
||||||
form->borderSizesCombo->setCurrentIndex(index.data(DecorationModel::BorderSizeRole).toInt());
|
form->borderSizesCombo->setCurrentIndex(index.data(DecorationModel::BorderSizeRole).toInt());
|
||||||
form->buttonSizesCombo->setCurrentIndex(index.data(DecorationModel::ButtonSizeRole).toInt());
|
form->buttonSizesCombo->setCurrentIndex(index.data(DecorationModel::ButtonSizeRole).toInt());
|
||||||
form->closeWindowsDoubleClick->setChecked(index.data(DecorationModel::CloseOnDblClickRole).toBool());
|
form->closeWindowsDoubleClick->setChecked(index.data(DecorationModel::CloseOnDblClickRole).toBool());
|
||||||
|
@ -400,7 +405,7 @@ void KWinDecorationModule::slotConfigureDecoration()
|
||||||
configManager->updateWidgets();
|
configManager->updateWidgets();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dlg->exec() == KDialog::Accepted) {
|
if (dlg->exec() == QDialog::Accepted) {
|
||||||
m_model->setData(index, form->borderSizesCombo->currentIndex(), DecorationModel::BorderSizeRole);
|
m_model->setData(index, form->borderSizesCombo->currentIndex(), DecorationModel::BorderSizeRole);
|
||||||
m_model->setData(index, form->buttonSizesCombo->currentIndex(), DecorationModel::ButtonSizeRole);
|
m_model->setData(index, form->buttonSizesCombo->currentIndex(), DecorationModel::ButtonSizeRole);
|
||||||
m_model->setData(index, form->closeWindowsDoubleClick->isChecked(), DecorationModel::CloseOnDblClickRole);
|
m_model->setData(index, form->closeWindowsDoubleClick->isChecked(), DecorationModel::CloseOnDblClickRole);
|
||||||
|
@ -419,7 +424,7 @@ void KWinDecorationModule::slotConfigureDecoration()
|
||||||
static_cast<KDecorationDefines::BorderSize>(index.data(DecorationModel::BorderSizeRole).toInt());
|
static_cast<KDecorationDefines::BorderSize>(index.data(DecorationModel::BorderSizeRole).toInt());
|
||||||
QPointer< KWinDecorationConfigDialog > configDialog =
|
QPointer< KWinDecorationConfigDialog > configDialog =
|
||||||
new KWinDecorationConfigDialog(name, borderSizes, size, this);
|
new KWinDecorationConfigDialog(name, borderSizes, size, this);
|
||||||
if (configDialog->exec() == KDialog::Accepted) {
|
if (configDialog->exec() == QDialog::Accepted) {
|
||||||
m_model->setData(index, configDialog->borderSize(), DecorationModel::BorderSizeRole);
|
m_model->setData(index, configDialog->borderSize(), DecorationModel::BorderSizeRole);
|
||||||
reload = true;
|
reload = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ target_link_libraries(kcm_kwindesktop
|
||||||
KF5::KI18n
|
KF5::KI18n
|
||||||
KF5::KWindowSystem
|
KF5::KWindowSystem
|
||||||
KF5::XmlGui
|
KF5::XmlGui
|
||||||
KF5::KDE4Support
|
|
||||||
${X11_LIBRARIES}
|
${X11_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <fixx11h.h>
|
#include <fixx11h.h>
|
||||||
|
|
||||||
#include <netwm.h>
|
#include <netwm.h>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
|
||||||
K_PLUGIN_FACTORY(KWinDesktopConfigFactory, registerPlugin<KWin::KWinDesktopConfig>();)
|
K_PLUGIN_FACTORY(KWinDesktopConfigFactory, registerPlugin<KWin::KWinDesktopConfig>();)
|
||||||
|
|
||||||
|
@ -575,17 +576,20 @@ void KWinDesktopConfig::slotConfigureEffectClicked()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KCModuleProxy* proxy = new KCModuleProxy(effect);
|
KCModuleProxy* proxy = new KCModuleProxy(effect);
|
||||||
QPointer< KDialog > configDialog = new KDialog(this);
|
QPointer<QDialog> configDialog = new QDialog(this);
|
||||||
configDialog->setWindowTitle(m_ui->effectComboBox->currentText());
|
configDialog->setWindowTitle(m_ui->effectComboBox->currentText());
|
||||||
configDialog->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default);
|
configDialog->setLayout(new QVBoxLayout);
|
||||||
connect(configDialog, SIGNAL(defaultClicked()), proxy, SLOT(defaults()));
|
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults, configDialog);
|
||||||
|
connect(buttons, SIGNAL(accepted()), configDialog, SLOT(accept()));
|
||||||
|
connect(buttons, SIGNAL(rejected()), configDialog, SLOT(reject()));
|
||||||
|
connect(buttons->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked(bool)), proxy, SLOT(defaults()));
|
||||||
|
|
||||||
QWidget *showWidget = new QWidget(configDialog);
|
QWidget *showWidget = new QWidget(configDialog);
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
showWidget->setLayout(layout);
|
showWidget->setLayout(layout);
|
||||||
layout->addWidget(proxy);
|
layout->addWidget(proxy);
|
||||||
layout->insertSpacing(-1, KDialog::marginHint());
|
configDialog->layout()->addWidget(showWidget);
|
||||||
configDialog->setMainWidget(showWidget);
|
configDialog->layout()->addWidget(buttons);
|
||||||
|
|
||||||
if (configDialog->exec() == QDialog::Accepted) {
|
if (configDialog->exec() == QDialog::Accepted) {
|
||||||
proxy->save();
|
proxy->save();
|
||||||
|
|
|
@ -11,7 +11,16 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -50,7 +59,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="KIntSpinBox" name="numberSpinBox">
|
<widget class="QSpinBox" name="numberSpinBox">
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
<string>Here you can set how many virtual desktops you want on your KDE desktop.</string>
|
<string>Here you can set how many virtual desktops you want on your KDE desktop.</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -79,7 +88,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="KIntSpinBox" name="rowsSpinBox">
|
<widget class="QSpinBox" name="rowsSpinBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -169,7 +178,7 @@
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="KComboBox" name="effectComboBox">
|
<widget class="QComboBox" name="effectComboBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -179,7 +188,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="effectConfigButton">
|
<widget class="QPushButton" name="effectConfigButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -189,7 +198,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="effectInfoButton"/>
|
<widget class="QPushButton" name="effectInfoButton"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -225,7 +234,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="KIntSpinBox" name="popupHideSpinBox">
|
<widget class="QSpinBox" name="popupHideSpinBox">
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string> msec</string>
|
<string> msec</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -286,21 +295,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>KIntSpinBox</class>
|
|
||||||
<extends>QSpinBox</extends>
|
|
||||||
<header>knuminput.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KComboBox</class>
|
|
||||||
<extends>QComboBox</extends>
|
|
||||||
<header>kcombobox.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>KWin::DesktopNamesWidget</class>
|
<class>KWin::DesktopNamesWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
|
|
@ -25,7 +25,6 @@ set(kcm_libs
|
||||||
KF5::KI18n
|
KF5::KI18n
|
||||||
KF5::KWindowSystem
|
KF5::KWindowSystem
|
||||||
KF5::XmlGui
|
KF5::XmlGui
|
||||||
KF5::KDE4Support
|
|
||||||
${X11_LIBRARIES}
|
${X11_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -16,18 +16,16 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <KDialog>
|
|
||||||
#include "detectwidget.h"
|
#include "detectwidget.h"
|
||||||
#include "../../cursor.h"
|
#include "../../cursor.h"
|
||||||
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <KDE/KLocalizedString>
|
#include <KDE/KLocalizedString>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <kwindowsystem.h>
|
#include <kwindowsystem.h>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
//Added by qt3to4:
|
#include <QDialogButtonBox>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
@ -49,15 +47,21 @@ DetectWidget::DetectWidget(QWidget* parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
DetectDialog::DetectDialog(QWidget* parent, const char* name)
|
DetectDialog::DetectDialog(QWidget* parent, const char* name)
|
||||||
: KDialog(parent),
|
: QDialog(parent),
|
||||||
grabber()
|
grabber()
|
||||||
{
|
{
|
||||||
setObjectName(name);
|
setObjectName(name);
|
||||||
setModal(true);
|
setModal(true);
|
||||||
setButtons(Ok | Cancel);
|
setLayout(new QVBoxLayout);
|
||||||
|
|
||||||
widget = new DetectWidget(this);
|
widget = new DetectWidget(this);
|
||||||
setMainWidget(widget);
|
layout()->addWidget(widget);
|
||||||
|
|
||||||
|
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel, this);
|
||||||
|
layout()->addWidget(buttons);
|
||||||
|
|
||||||
|
connect(buttons, SIGNAL(accepted()), SLOT(accept()));
|
||||||
|
connect(buttons, SIGNAL(rejected()), SLOT(reject()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetectDialog::detect(WId window, int secs)
|
void DetectDialog::detect(WId window, int secs)
|
||||||
|
@ -117,7 +121,7 @@ void DetectDialog::executeDialog()
|
||||||
adjustSize();
|
adjustSize();
|
||||||
if (width() < 4*height()/3)
|
if (width() < 4*height()/3)
|
||||||
resize(4*height()/3, height());
|
resize(4*height()/3, height());
|
||||||
emit detectionDone(exec() == KDialog::Accepted);
|
emit detectionDone(exec() == QDialog::Accepted);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray DetectDialog::selectedClass() const
|
QByteArray DetectDialog::selectedClass() const
|
||||||
|
@ -172,7 +176,7 @@ void DetectDialog::selectWindow()
|
||||||
// use a dialog, so that all user input is blocked
|
// use a dialog, so that all user input is blocked
|
||||||
// use WX11BypassWM and moving away so that it's not actually visible
|
// use WX11BypassWM and moving away so that it's not actually visible
|
||||||
// grab only mouse, so that keyboard can be used e.g. for switching windows
|
// grab only mouse, so that keyboard can be used e.g. for switching windows
|
||||||
grabber.reset(new KDialog(0, Qt::X11BypassWindowManagerHint));
|
grabber.reset(new QDialog(0, Qt::X11BypassWindowManagerHint));
|
||||||
grabber->move(-1000, -1000);
|
grabber->move(-1000, -1000);
|
||||||
grabber->setModal(true);
|
grabber->setModal(true);
|
||||||
grabber->show();
|
grabber->show();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef __DETECTWIDGET_H__
|
#ifndef __DETECTWIDGET_H__
|
||||||
#define __DETECTWIDGET_H__
|
#define __DETECTWIDGET_H__
|
||||||
|
|
||||||
#include <KDialog>
|
#include <QDialog>
|
||||||
#include <kwindowsystem.h>
|
#include <kwindowsystem.h>
|
||||||
#include <QAbstractNativeEventFilter>
|
#include <QAbstractNativeEventFilter>
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
class DetectDialog
|
class DetectDialog
|
||||||
: public KDialog, public QAbstractNativeEventFilter
|
: public QDialog, public QAbstractNativeEventFilter
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -76,7 +76,7 @@ private:
|
||||||
QByteArray extrarole;
|
QByteArray extrarole;
|
||||||
QByteArray machine;
|
QByteArray machine;
|
||||||
DetectWidget* widget;
|
DetectWidget* widget;
|
||||||
QScopedPointer<KDialog> grabber;
|
QScopedPointer<QDialog> grabber;
|
||||||
KWindowInfo info;
|
KWindowInfo info;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <kcmdlineargs.h>
|
#include <QCommandLineParser>
|
||||||
#include <kapplication.h>
|
#include <QApplication>
|
||||||
#include <kconfig.h>
|
#include <kconfig.h>
|
||||||
#include <KDE/KLocalizedString>
|
#include <KDE/KLocalizedString>
|
||||||
#include <kwindowsystem.h>
|
#include <kwindowsystem.h>
|
||||||
|
@ -241,21 +241,26 @@ static int edit(Window wid, bool whole_app)
|
||||||
extern "C"
|
extern "C"
|
||||||
KDE_EXPORT int kdemain(int argc, char* argv[])
|
KDE_EXPORT int kdemain(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
KCmdLineArgs::init(argc, argv, "kwin_rules_dialog", "kcmkwinrules", ki18n("KWin"), "1.0" ,
|
QApplication app(argc, argv);
|
||||||
ki18n("KWin helper utility"));
|
app.setApplicationDisplayName(i18n("KWin"));
|
||||||
|
app.setApplicationName("kwin_rules_dialog");
|
||||||
KCmdLineOptions options;
|
app.setApplicationVersion("1.0");
|
||||||
options.add("wid <wid>", ki18n("WId of the window for special window settings."));
|
bool whole_app = false;
|
||||||
options.add("whole-app", ki18n("Whether the settings should affect all windows of the application."));
|
|
||||||
KCmdLineArgs::addCmdLineOptions(options);
|
|
||||||
KApplication app;
|
|
||||||
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
|
|
||||||
bool id_ok = false;
|
bool id_ok = false;
|
||||||
Window id = args->getOption("wid").toULongLong(&id_ok);
|
Window id = None;
|
||||||
bool whole_app = args->isSet("whole-app");
|
{
|
||||||
args->clear();
|
QCommandLineParser parser;
|
||||||
|
parser.setApplicationDescription(i18n("KWin helper utility"));
|
||||||
|
parser.addOption(QCommandLineOption("wid", i18n("WId of the window for special window settings."), "wid"));
|
||||||
|
parser.addOption(QCommandLineOption("whole-app", i18n("Whether the settings should affect all windows of the application.")));
|
||||||
|
parser.process(app);
|
||||||
|
|
||||||
|
id = parser.value("wid").toULongLong(&id_ok);
|
||||||
|
whole_app = parser.isSet("whole-app");
|
||||||
|
}
|
||||||
|
|
||||||
if (!id_ok || id == None) {
|
if (!id_ok || id == None) {
|
||||||
KCmdLineArgs::usageError(i18n("This helper utility is not supposed to be called directly."));
|
printf("%s\n", qPrintable(i18n("This helper utility is not supposed to be called directly.")));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return KWin::edit(id, whole_app);
|
return KWin::edit(id, whole_app);
|
||||||
|
|
|
@ -11,28 +11,37 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" rowspan="14">
|
<item row="0" column="0" rowspan="14">
|
||||||
<widget class="KListWidget" name="rules_listbox"/>
|
<widget class="QListWidget" name="rules_listbox"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="KPushButton" name="new_button">
|
<widget class="QPushButton" name="new_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&New...</string>
|
<string>&New...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="KPushButton" name="modify_button">
|
<widget class="QPushButton" name="modify_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Modify...</string>
|
<string>&Modify...</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="KPushButton" name="delete_button">
|
<widget class="QPushButton" name="delete_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Delete</string>
|
<string>Delete</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -42,14 +51,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="KPushButton" name="moveup_button">
|
<widget class="QPushButton" name="moveup_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move &Up</string>
|
<string>Move &Up</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="KPushButton" name="movedown_button">
|
<widget class="QPushButton" name="movedown_button">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move &Down</string>
|
<string>Move &Down</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -108,18 +117,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>KListWidget</class>
|
|
||||||
<extends>QListWidget</extends>
|
|
||||||
<header>klistwidget.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<includes>
|
<includes>
|
||||||
<include location="local">kdialog.h</include>
|
<include location="local">kdialog.h</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
|
|
@ -57,6 +57,11 @@ RulesWidget::RulesWidget(QWidget* parent)
|
||||||
: detect_dlg(NULL)
|
: detect_dlg(NULL)
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
|
QRegularExpressionValidator* validator = new QRegularExpressionValidator(QRegularExpression("[0-9\-+,xX:]*"), this);
|
||||||
|
maxsize->setValidator(validator);
|
||||||
|
minsize->setValidator(validator);
|
||||||
|
position->setValidator(validator);
|
||||||
|
Ui::RulesWidgetBase::size->setValidator(validator);
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
QString enableDesc =
|
QString enableDesc =
|
||||||
|
@ -410,11 +415,11 @@ static NET::WindowType comboToType(int val)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECKBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setChecked, setChecked( false ))
|
#define CHECKBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setChecked, setChecked( false ))
|
||||||
#define LINEEDIT_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setText, setText( "" ))
|
#define LINEEDIT_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setText, setText( QString() ))
|
||||||
#define COMBOBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setCurrentIndex, setCurrentIndex( 0 ))
|
#define COMBOBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setCurrentIndex, setCurrentIndex( 0 ))
|
||||||
#define SPINBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setValue, setValue(0))
|
#define SPINBOX_SET_RULE( var, func ) GENERIC_RULE( var, func, Set, set, setValue, setValue(0))
|
||||||
#define CHECKBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setChecked, setChecked( false ))
|
#define CHECKBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setChecked, setChecked( false ))
|
||||||
#define LINEEDIT_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setText, setText( "" ))
|
#define LINEEDIT_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setText, setText( QString() ))
|
||||||
#define COMBOBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setCurrentIndex, setCurrentIndex( 0 ))
|
#define COMBOBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setCurrentIndex, setCurrentIndex( 0 ))
|
||||||
#define SPINBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setValue, setValue(0))
|
#define SPINBOX_FORCE_RULE( var, func ) GENERIC_RULE( var, func, Force, force, setValue, setValue(0))
|
||||||
|
|
||||||
|
@ -770,16 +775,21 @@ void RulesWidget::shortcutEditClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
RulesDialog::RulesDialog(QWidget* parent, const char* name)
|
RulesDialog::RulesDialog(QWidget* parent, const char* name)
|
||||||
: KDialog(parent)
|
: QDialog(parent)
|
||||||
{
|
{
|
||||||
setObjectName(name);
|
setObjectName(name);
|
||||||
setModal(true);
|
setModal(true);
|
||||||
setCaption(i18n("Edit Window-Specific Settings"));
|
setWindowTitle(i18n("Edit Window-Specific Settings"));
|
||||||
setButtons(Ok | Cancel);
|
|
||||||
setWindowIcon(QIcon::fromTheme("preferences-system-windows-actions"));
|
setWindowIcon(QIcon::fromTheme("preferences-system-windows-actions"));
|
||||||
|
|
||||||
|
setLayout(new QVBoxLayout);
|
||||||
widget = new RulesWidget(this);
|
widget = new RulesWidget(this);
|
||||||
setMainWidget(widget);
|
layout()->addWidget(widget);
|
||||||
|
|
||||||
|
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||||
|
connect(buttons, SIGNAL(accepted()), SLOT(accept()));
|
||||||
|
connect(buttons, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
layout()->addWidget(buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
// window is set only for Alt+F3/Window-specific settings, because the dialog
|
// window is set only for Alt+F3/Window-specific settings, because the dialog
|
||||||
|
@ -814,7 +824,7 @@ void RulesDialog::accept()
|
||||||
if (!widget->finalCheck())
|
if (!widget->finalCheck())
|
||||||
return;
|
return;
|
||||||
rules = widget->rules();
|
rules = widget->rules();
|
||||||
KDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditShortcut::EditShortcut(QWidget* parent)
|
EditShortcut::EditShortcut(QWidget* parent)
|
||||||
|
@ -833,19 +843,25 @@ void EditShortcut::editShortcut()
|
||||||
|
|
||||||
void EditShortcut::clearShortcut()
|
void EditShortcut::clearShortcut()
|
||||||
{
|
{
|
||||||
shortcut->setText(QLatin1String(""));
|
shortcut->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditShortcutDialog::EditShortcutDialog(QWidget* parent, const char* name)
|
EditShortcutDialog::EditShortcutDialog(QWidget* parent, const char* name)
|
||||||
: KDialog(parent)
|
: QDialog(parent)
|
||||||
|
, widget(new EditShortcut(this))
|
||||||
{
|
{
|
||||||
setObjectName(name);
|
setObjectName(name);
|
||||||
setModal(true);
|
setModal(true);
|
||||||
setCaption(i18n("Edit Shortcut"));
|
setWindowTitle(i18n("Edit Shortcut"));
|
||||||
setButtons(Ok | Cancel);
|
|
||||||
|
|
||||||
widget = new EditShortcut(this);
|
setLayout(new QVBoxLayout);
|
||||||
setMainWidget(widget);
|
|
||||||
|
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||||
|
connect(buttons, SIGNAL(accepted()), SLOT(accept()));
|
||||||
|
connect(buttons, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
|
||||||
|
layout()->addWidget(buttons);
|
||||||
|
layout()->addWidget(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditShortcutDialog::setShortcut(const QString& cut)
|
void EditShortcutDialog::setShortcut(const QString& cut)
|
||||||
|
@ -859,13 +875,20 @@ QString EditShortcutDialog::shortcut() const
|
||||||
}
|
}
|
||||||
|
|
||||||
ShortcutDialog::ShortcutDialog(const QKeySequence& cut, QWidget* parent)
|
ShortcutDialog::ShortcutDialog(const QKeySequence& cut, QWidget* parent)
|
||||||
: KDialog(parent)
|
: QDialog(parent)
|
||||||
, widget(new KKeySequenceWidget(this))
|
, widget(new KKeySequenceWidget(this))
|
||||||
{
|
{
|
||||||
widget->setKeySequence(cut);
|
widget->setKeySequence(cut);
|
||||||
// It's a global shortcut so don't allow multikey shortcuts
|
// It's a global shortcut so don't allow multikey shortcuts
|
||||||
widget->setMultiKeyShortcutsAllowed(false);
|
widget->setMultiKeyShortcutsAllowed(false);
|
||||||
setMainWidget(widget);
|
|
||||||
|
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Close, this);
|
||||||
|
connect(buttons, SIGNAL(accepted()), SLOT(accept()));
|
||||||
|
connect(buttons, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
|
||||||
|
setLayout(new QVBoxLayout);
|
||||||
|
layout()->addWidget(widget);
|
||||||
|
layout()->addWidget(buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShortcutDialog::accept()
|
void ShortcutDialog::accept()
|
||||||
|
@ -880,11 +903,11 @@ void ShortcutDialog::accept()
|
||||||
|| (seq[0] & Qt::KeyboardModifierMask) == 0) {
|
|| (seq[0] & Qt::KeyboardModifierMask) == 0) {
|
||||||
// clear
|
// clear
|
||||||
widget->clearKeySequence();
|
widget->clearKeySequence();
|
||||||
KDialog::accept();
|
QDialog::accept();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
KDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
QKeySequence ShortcutDialog::shortcut() const
|
QKeySequence ShortcutDialog::shortcut() const
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <config-kwin.h>
|
#include <config-kwin.h>
|
||||||
|
|
||||||
#include <kdialog.h>
|
#include <QDialog>
|
||||||
#include <kwindowsystem.h>
|
#include <kwindowsystem.h>
|
||||||
#include <kkeysequencewidget.h>
|
#include <kkeysequencewidget.h>
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
class RulesDialog
|
class RulesDialog
|
||||||
: public KDialog
|
: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -139,7 +139,7 @@ protected Q_SLOTS:
|
||||||
};
|
};
|
||||||
|
|
||||||
class EditShortcutDialog
|
class EditShortcutDialog
|
||||||
: public KDialog
|
: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -152,7 +152,7 @@ private:
|
||||||
|
|
||||||
// slightly duped from utils.cpp
|
// slightly duped from utils.cpp
|
||||||
class ShortcutDialog
|
class ShortcutDialog
|
||||||
: public KDialog
|
: public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>486</width>
|
<width>584</width>
|
||||||
<height>588</height>
|
<height>588</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="KComboBox" name="wmclass_match">
|
<widget class="QComboBox" name="wmclass_match">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Unimportant</string>
|
<string>Unimportant</string>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<widget class="KLineEdit" name="wmclass"/>
|
<widget class="KLineEdit" name="wmclass"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="4">
|
<item row="4" column="4">
|
||||||
<widget class="KPushButton" name="edit_reg_wmclass">
|
<widget class="QPushButton" name="edit_reg_wmclass">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
<widget class="KLineEdit" name="role"/>
|
<widget class="KLineEdit" name="role"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="4">
|
<item row="6" column="4">
|
||||||
<widget class="KPushButton" name="edit_reg_role">
|
<widget class="QPushButton" name="edit_reg_role">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="1">
|
<item row="10" column="1">
|
||||||
<widget class="KComboBox" name="title_match">
|
<widget class="QComboBox" name="title_match">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Unimportant</string>
|
<string>Unimportant</string>
|
||||||
|
@ -213,7 +213,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="4">
|
<item row="10" column="4">
|
||||||
<widget class="KPushButton" name="edit_reg_title">
|
<widget class="QPushButton" name="edit_reg_title">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="4">
|
<item row="11" column="4">
|
||||||
<widget class="KPushButton" name="edit_reg_machine">
|
<widget class="QPushButton" name="edit_reg_machine">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="detect">
|
<widget class="QPushButton" name="detect">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Detect Window Properties</string>
|
<string>&Detect Window Properties</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -497,7 +497,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="KComboBox" name="rule_position">
|
<widget class="QComboBox" name="rule_position">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -534,14 +534,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="4">
|
<item row="0" column="4">
|
||||||
<widget class="KRestrictedLine" name="position">
|
<widget class="QLineEdit" name="position">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>x,y</string>
|
<string>x,y</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="validChars">
|
<property name="validChars" stdset="0">
|
||||||
<string>0123456789-+,xX:</string>
|
<string>0123456789-+,xX:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -554,7 +554,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="KComboBox" name="rule_size">
|
<widget class="QComboBox" name="rule_size">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -591,14 +591,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="KRestrictedLine" name="size">
|
<widget class="QLineEdit" name="size">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>width,height</string>
|
<string>width,height</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="validChars">
|
<property name="validChars" stdset="0">
|
||||||
<string>0123456789-+,xX:</string>
|
<string>0123456789-+,xX:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -618,7 +618,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3">
|
<item row="3" column="3">
|
||||||
<widget class="KComboBox" name="rule_maximizehoriz">
|
<widget class="QComboBox" name="rule_maximizehoriz">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -669,7 +669,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="3">
|
<item row="4" column="3">
|
||||||
<widget class="KComboBox" name="rule_maximizevert">
|
<widget class="QComboBox" name="rule_maximizevert">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -740,7 +740,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="3">
|
<item row="6" column="3">
|
||||||
<widget class="KComboBox" name="rule_desktop">
|
<widget class="QComboBox" name="rule_desktop">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -777,7 +777,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="4">
|
<item row="6" column="4">
|
||||||
<widget class="KComboBox" name="desktop">
|
<widget class="QComboBox" name="desktop">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -804,7 +804,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="3">
|
<item row="7" column="3">
|
||||||
<widget class="KComboBox" name="rule_activity">
|
<widget class="QComboBox" name="rule_activity">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -841,7 +841,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="4">
|
<item row="7" column="4">
|
||||||
<widget class="KComboBox" name="activity">
|
<widget class="QComboBox" name="activity">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -872,7 +872,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="3">
|
<item row="10" column="3">
|
||||||
<widget class="KComboBox" name="rule_fullscreen">
|
<widget class="QComboBox" name="rule_fullscreen">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -923,7 +923,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="3">
|
<item row="11" column="3">
|
||||||
<widget class="KComboBox" name="rule_minimize">
|
<widget class="QComboBox" name="rule_minimize">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -974,7 +974,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="3">
|
<item row="12" column="3">
|
||||||
<widget class="KComboBox" name="rule_shade">
|
<widget class="QComboBox" name="rule_shade">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1025,7 +1025,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="3" rowspan="2">
|
<item row="14" column="3" rowspan="2">
|
||||||
<widget class="KComboBox" name="rule_placement">
|
<widget class="QComboBox" name="rule_placement">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1047,7 +1047,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="4" rowspan="2">
|
<item row="14" column="4" rowspan="2">
|
||||||
<widget class="KComboBox" name="placement">
|
<widget class="QComboBox" name="placement">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1127,7 +1127,7 @@ to unconditionally popup in the middle of your screen.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="3">
|
<item row="16" column="3">
|
||||||
<widget class="KComboBox" name="rule_ignoregeometry">
|
<widget class="QComboBox" name="rule_ignoregeometry">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1178,7 +1178,7 @@ to unconditionally popup in the middle of your screen.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="18" column="3" rowspan="2">
|
<item row="18" column="3" rowspan="2">
|
||||||
<widget class="KComboBox" name="rule_minsize">
|
<widget class="QComboBox" name="rule_minsize">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1207,14 +1207,14 @@ to unconditionally popup in the middle of your screen.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="19" column="4">
|
<item row="19" column="4">
|
||||||
<widget class="KRestrictedLine" name="minsize">
|
<widget class="QLineEdit" name="minsize">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>width,height</string>
|
<string>width,height</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="validChars">
|
<property name="validChars" stdset="0">
|
||||||
<string>0123456789-+,xX:</string>
|
<string>0123456789-+,xX:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -1227,7 +1227,7 @@ to unconditionally popup in the middle of your screen.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="20" column="3">
|
<item row="20" column="3">
|
||||||
<widget class="KComboBox" name="rule_maxsize">
|
<widget class="QComboBox" name="rule_maxsize">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1249,14 +1249,14 @@ to unconditionally popup in the middle of your screen.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="20" column="4">
|
<item row="20" column="4">
|
||||||
<widget class="KRestrictedLine" name="maxsize">
|
<widget class="QLineEdit" name="maxsize">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>width,height</string>
|
<string>width,height</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="validChars">
|
<property name="validChars" stdset="0">
|
||||||
<string>0123456789-+,xX:</string>
|
<string>0123456789-+,xX:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -1282,7 +1282,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="21" column="3">
|
<item row="21" column="3">
|
||||||
<widget class="KComboBox" name="rule_strictgeometry">
|
<widget class="QComboBox" name="rule_strictgeometry">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1327,7 +1327,7 @@ like your complete screen area.</string>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="3">
|
<item row="8" column="3">
|
||||||
<widget class="KComboBox" name="rule_screen">
|
<widget class="QComboBox" name="rule_screen">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1378,7 +1378,7 @@ like your complete screen area.</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="1" column="2" colspan="2">
|
<item row="1" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_below">
|
<widget class="QComboBox" name="rule_below">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1425,7 +1425,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="2" colspan="2">
|
<item row="16" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_shortcut">
|
<widget class="QComboBox" name="rule_shortcut">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1526,7 +1526,7 @@ like your complete screen area.</string>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="2" colspan="2">
|
<item row="5" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_autogroup">
|
<widget class="QComboBox" name="rule_autogroup">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1548,7 +1548,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="2" colspan="2">
|
<item row="13" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_skippager">
|
<widget class="QComboBox" name="rule_skippager">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1632,7 +1632,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="2" colspan="2">
|
<item row="14" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_skipswitcher">
|
<widget class="QComboBox" name="rule_skipswitcher">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1669,7 +1669,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="2" colspan="2">
|
<item row="12" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_skiptaskbar">
|
<widget class="QComboBox" name="rule_skiptaskbar">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1706,7 +1706,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="4" colspan="2">
|
<item row="16" column="4" colspan="2">
|
||||||
<widget class="KRestrictedLine" name="shortcut">
|
<widget class="QLineEdit" name="shortcut">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1747,7 +1747,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="2" colspan="2">
|
<item row="6" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_autogroupfg">
|
<widget class="QComboBox" name="rule_autogroupfg">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1803,7 +1803,7 @@ like your complete screen area.</string>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="2" colspan="2">
|
<item row="7" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_autogroupid">
|
<widget class="QComboBox" name="rule_autogroupid">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1852,7 +1852,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" colspan="2">
|
<item row="0" column="2" colspan="2">
|
||||||
<widget class="KComboBox" name="rule_above">
|
<widget class="QComboBox" name="rule_above">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1910,7 +1910,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2" rowspan="2" colspan="3">
|
<item row="3" column="2" rowspan="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_opacityactive">
|
<widget class="QComboBox" name="rule_opacityactive">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1946,7 +1946,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" colspan="3">
|
<item row="0" column="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_noborder">
|
<widget class="QComboBox" name="rule_noborder">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2033,7 +2033,7 @@ like your complete screen area.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="2" colspan="3">
|
<item row="5" column="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_opacityinactive">
|
<widget class="QComboBox" name="rule_opacityinactive">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2099,7 +2099,7 @@ from getting focused on a mouse click.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="2" rowspan="2" colspan="3">
|
<item row="11" column="2" rowspan="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_acceptfocus">
|
<widget class="QComboBox" name="rule_acceptfocus">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2148,7 +2148,7 @@ while it's active!</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="2" colspan="3">
|
<item row="13" column="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_disableglobalshortcuts">
|
<widget class="QComboBox" name="rule_disableglobalshortcuts">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2198,7 +2198,7 @@ while it's active!</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="19" column="2" colspan="3">
|
<item row="19" column="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_type">
|
<widget class="QComboBox" name="rule_type">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2220,7 +2220,7 @@ while it's active!</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="19" column="5" colspan="2">
|
<item row="19" column="5" colspan="2">
|
||||||
<widget class="KComboBox" name="type">
|
<widget class="QComboBox" name="type">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2342,7 +2342,7 @@ while it's active!</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="17" column="2" rowspan="2" colspan="3">
|
<item row="17" column="2" rowspan="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_closeable">
|
<widget class="QComboBox" name="rule_closeable">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2396,7 +2396,7 @@ while it's active!</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="23" column="2" rowspan="2" colspan="3">
|
<item row="23" column="2" rowspan="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_blockcompositing">
|
<widget class="QComboBox" name="rule_blockcompositing">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2418,7 +2418,7 @@ while it's active!</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="2" colspan="3">
|
<item row="10" column="2" colspan="3">
|
||||||
<widget class="KComboBox" name="rule_fsplevel">
|
<widget class="QComboBox" name="rule_fsplevel">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2461,14 +2461,14 @@ but this may sometimes fail or superact.
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="5" colspan="2">
|
<item row="1" column="5" colspan="2">
|
||||||
<widget class="KComboBox" name="decocolor">
|
<widget class="QComboBox" name="decocolor">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="KComboBox" name="rule_decocolor">
|
<widget class="QComboBox" name="rule_decocolor">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2496,16 +2496,6 @@ but this may sometimes fail or superact.
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>KRestrictedLine</class>
|
|
||||||
<extends>KLineEdit</extends>
|
|
||||||
<header>krestrictedline.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>KLineEdit</class>
|
<class>KLineEdit</class>
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
|
|
|
@ -7,7 +7,7 @@ set(
|
||||||
screenpreviewwidget.cpp
|
screenpreviewwidget.cpp
|
||||||
)
|
)
|
||||||
kde4_add_ui_files( kcm_kwinscreenedges_PART_SRCS main.ui )
|
kde4_add_ui_files( kcm_kwinscreenedges_PART_SRCS main.ui )
|
||||||
kde4_add_plugin( kcm_kwinscreenedges ${kcm_kwinscreenedges_PART_SRCS} )
|
add_library( kcm_kwinscreenedges MODULE ${kcm_kwinscreenedges_PART_SRCS} )
|
||||||
target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES}
|
target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES}
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
KF5::KCompletion
|
KF5::KCompletion
|
||||||
|
@ -16,7 +16,6 @@ target_link_libraries( kcm_kwinscreenedges ${X11_LIBRARIES}
|
||||||
KF5::KI18n
|
KF5::KI18n
|
||||||
KF5::KService
|
KF5::KService
|
||||||
KF5::Plasma
|
KF5::Plasma
|
||||||
KF5::KDE4Support
|
|
||||||
)
|
)
|
||||||
install( TARGETS kcm_kwinscreenedges DESTINATION ${PLUGIN_INSTALL_DIR} )
|
install( TARGETS kcm_kwinscreenedges DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>461</width>
|
<width>488</width>
|
||||||
<height>511</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="KIntSpinBox" name="activationDelaySpin">
|
<widget class="QSpinBox" name="activationDelaySpin">
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string> ms</string>
|
<string> ms</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -234,7 +234,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="KIntSpinBox" name="triggerCooldownSpin">
|
<widget class="QSpinBox" name="triggerCooldownSpin">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -289,11 +289,6 @@
|
||||||
<extends>QComboBox</extends>
|
<extends>QComboBox</extends>
|
||||||
<header>kcombobox.h</header>
|
<header>kcombobox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>KIntSpinBox</class>
|
|
||||||
<extends>QSpinBox</extends>
|
|
||||||
<header>knuminput.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>KWin::Monitor</class>
|
<class>KWin::Monitor</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
|
|
@ -25,9 +25,10 @@
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <KUrl>
|
#include <QMimeData>
|
||||||
|
|
||||||
#include <Plasma/FrameSvg>
|
#include <Plasma/FrameSvg>
|
||||||
|
#include <kurlmimedata.h>
|
||||||
|
|
||||||
|
|
||||||
class ScreenPreviewWidgetPrivate
|
class ScreenPreviewWidgetPrivate
|
||||||
|
@ -147,10 +148,10 @@ void ScreenPreviewWidget::paintEvent(QPaintEvent *event)
|
||||||
|
|
||||||
void ScreenPreviewWidget::dropEvent(QDropEvent *e)
|
void ScreenPreviewWidget::dropEvent(QDropEvent *e)
|
||||||
{
|
{
|
||||||
if (!KUrl::List::canDecode(e->mimeData()))
|
if (!e->mimeData()->hasUrls())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const KUrl::List uris(KUrl::List::fromMimeData(e->mimeData()));
|
QList<QUrl> uris(KUrlMimeData::urlsFromMimeData(e->mimeData()));
|
||||||
if (!uris.isEmpty()) {
|
if (!uris.isEmpty()) {
|
||||||
// TODO: Download remote file
|
// TODO: Download remote file
|
||||||
if (uris.first().isLocalFile())
|
if (uris.first().isLocalFile())
|
||||||
|
|
|
@ -16,7 +16,6 @@ target_link_libraries(kcm_kwin_scripts
|
||||||
KF5::KIOCore
|
KF5::KIOCore
|
||||||
KF5::KI18n
|
KF5::KI18n
|
||||||
KF5::Plasma
|
KF5::Plasma
|
||||||
KF5::KDE4Support
|
|
||||||
KF5::KNewStuff
|
KF5::KNewStuff
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="ghnsButton">
|
<widget class="QPushButton" name="ghnsButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Get New Script...</string>
|
<string>Get New Script...</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -69,11 +69,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>KPluginSelector</class>
|
<class>KPluginSelector</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
|
|
@ -32,7 +32,6 @@ target_link_libraries(kcm_kwintabbox
|
||||||
KF5::Plasma
|
KF5::Plasma
|
||||||
KF5::XmlGui
|
KF5::XmlGui
|
||||||
KF5::KNewStuff
|
KF5::KNewStuff
|
||||||
KF5::KDE4Support
|
|
||||||
${XCB_XCB_LIBRARY})
|
${XCB_XCB_LIBRARY})
|
||||||
|
|
||||||
install(TARGETS kcm_kwintabbox DESTINATION ${PLUGIN_INSTALL_DIR} )
|
install(TARGETS kcm_kwintabbox DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||||
|
|
|
@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <QtCore/QStandardPaths>
|
#include <QtCore/QStandardPaths>
|
||||||
#include <KDE/KConfigGroup>
|
#include <KDE/KConfigGroup>
|
||||||
#include <KDE/KDesktopFile>
|
#include <KDE/KDesktopFile>
|
||||||
#include <KDE/KIcon>
|
|
||||||
#include <KDE/KIconEffect>
|
#include <KDE/KIconEffect>
|
||||||
#include <KDE/KIconLoader>
|
#include <KDE/KIconLoader>
|
||||||
#include <KDE/KLocalizedString>
|
#include <KDE/KLocalizedString>
|
||||||
|
@ -82,7 +81,7 @@ QPixmap TabBoxImageProvider::requestPixmap(const QString &id, QSize *size, const
|
||||||
s = requestedSize;
|
s = requestedSize;
|
||||||
}
|
}
|
||||||
*size = s;
|
*size = s;
|
||||||
QPixmap icon(KIcon(m_model->data(m_model->index(index), Qt::UserRole+3).toString()).pixmap(s));
|
QPixmap icon(QIcon::fromTheme(m_model->data(m_model->index(index), Qt::UserRole+3).toString()).pixmap(s));
|
||||||
if (parts.size() > 2) {
|
if (parts.size() > 2) {
|
||||||
KIconEffect *effect = KIconLoader::global()->iconEffect();
|
KIconEffect *effect = KIconLoader::global()->iconEffect();
|
||||||
KIconLoader::States state = KIconLoader::DefaultState;
|
KIconLoader::States state = KIconLoader::DefaultState;
|
||||||
|
|
|
@ -23,13 +23,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QtDBus>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
// KDE
|
// KDE
|
||||||
#include <KActionCollection>
|
#include <KActionCollection>
|
||||||
#include <KCModuleProxy>
|
#include <KCModuleProxy>
|
||||||
#include <KDialog>
|
|
||||||
#include <KGlobalAccel>
|
#include <KGlobalAccel>
|
||||||
//#include <KLocalizedString>
|
//#include <KLocalizedString>
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
|
@ -63,7 +63,7 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
|
||||||
, m_config(KSharedConfig::openConfig("kwinrc"))
|
, m_config(KSharedConfig::openConfig("kwinrc"))
|
||||||
, m_layoutPreview(NULL)
|
, m_layoutPreview(NULL)
|
||||||
{
|
{
|
||||||
KTabWidget* tabWidget = new KTabWidget(this);
|
QTabWidget* tabWidget = new QTabWidget(this);
|
||||||
m_primaryTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
|
m_primaryTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
|
||||||
m_alternativeTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
|
m_alternativeTabBoxUi = new KWinTabBoxConfigForm(tabWidget);
|
||||||
tabWidget->addTab(m_primaryTabBoxUi, i18n("Main"));
|
tabWidget->addTab(m_primaryTabBoxUi, i18n("Main"));
|
||||||
|
@ -504,9 +504,13 @@ void KWinTabBoxConfig::configureEffectClicked()
|
||||||
m_layoutPreview->setLayout(ui->effectCombo->itemData(effect, Qt::UserRole+1).toString(), ui->effectCombo->itemText(effect));
|
m_layoutPreview->setLayout(ui->effectCombo->itemData(effect, Qt::UserRole+1).toString(), ui->effectCombo->itemText(effect));
|
||||||
m_layoutPreview->show();
|
m_layoutPreview->show();
|
||||||
} else {
|
} else {
|
||||||
QPointer< KDialog > configDialog = new KDialog(this);
|
QPointer<QDialog> configDialog = new QDialog(this);
|
||||||
configDialog->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Default);
|
configDialog->setLayout(new QVBoxLayout);
|
||||||
configDialog->setWindowTitle(ui->effectCombo->currentText());
|
configDialog->setWindowTitle(ui->effectCombo->currentText());
|
||||||
|
QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults, configDialog);
|
||||||
|
connect(buttonBox, SIGNAL(accepted()), configDialog, SLOT(accept()));
|
||||||
|
connect(buttonBox, SIGNAL(rejected()), configDialog, SLOT(reject()));
|
||||||
|
|
||||||
KCModuleProxy* proxy = new KCModuleProxy(effect == CoverSwitch ? "coverswitch_config" : "flipswitch_config");
|
KCModuleProxy* proxy = new KCModuleProxy(effect == CoverSwitch ? "coverswitch_config" : "flipswitch_config");
|
||||||
connect(configDialog, SIGNAL(defaultClicked()), proxy, SLOT(defaults()));
|
connect(configDialog, SIGNAL(defaultClicked()), proxy, SLOT(defaults()));
|
||||||
|
|
||||||
|
@ -514,8 +518,8 @@ void KWinTabBoxConfig::configureEffectClicked()
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
showWidget->setLayout(layout);
|
showWidget->setLayout(layout);
|
||||||
layout->addWidget(proxy);
|
layout->addWidget(proxy);
|
||||||
layout->insertSpacing(-1, KDialog::marginHint());
|
configDialog->layout()->addWidget(showWidget);
|
||||||
configDialog->setMainWidget(showWidget);
|
configDialog->layout()->addWidget(buttonBox);
|
||||||
|
|
||||||
if (configDialog->exec() == QDialog::Accepted) {
|
if (configDialog->exec() == QDialog::Accepted) {
|
||||||
proxy->save();
|
proxy->save();
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>630</width>
|
<width>658</width>
|
||||||
<height>418</height>
|
<height>418</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -123,7 +123,16 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -175,7 +184,16 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -227,7 +245,16 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -279,7 +306,16 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -417,18 +453,10 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1" colspan="3">
|
<item row="6" column="1" colspan="3">
|
||||||
<widget class="KKeySequenceWidget" name="scCurrentReverse">
|
<widget class="KKeySequenceWidget" name="scCurrentReverse" native="true"/>
|
||||||
<property name="checkForConflictsAgainst">
|
|
||||||
<set>KKeySequenceWidget::GlobalShortcuts</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1" colspan="3">
|
<item row="5" column="1" colspan="3">
|
||||||
<widget class="KKeySequenceWidget" name="scCurrent">
|
<widget class="KKeySequenceWidget" name="scCurrent" native="true"/>
|
||||||
<property name="checkForConflictsAgainst">
|
|
||||||
<set>KKeySequenceWidget::GlobalShortcuts</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="4">
|
<item row="4" column="0" colspan="4">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -447,18 +475,10 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="3">
|
<item row="2" column="1" colspan="3">
|
||||||
<widget class="KKeySequenceWidget" name="scAllReverse">
|
<widget class="KKeySequenceWidget" name="scAllReverse" native="true"/>
|
||||||
<property name="checkForConflictsAgainst">
|
|
||||||
<set>KKeySequenceWidget::GlobalShortcuts</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="3">
|
<item row="1" column="1" colspan="3">
|
||||||
<widget class="KKeySequenceWidget" name="scAll">
|
<widget class="KKeySequenceWidget" name="scAll" native="true"/>
|
||||||
<property name="checkForConflictsAgainst">
|
|
||||||
<set>KKeySequenceWidget::GlobalShortcuts</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -475,11 +495,20 @@
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QWidget" name="widget_6" native="true">
|
<widget class="QWidget" name="widget_6" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KComboBox" name="effectCombo">
|
<widget class="QComboBox" name="effectCombo">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -492,7 +521,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="KPushButton" name="effectConfigButton">
|
<widget class="QPushButton" name="effectConfigButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -538,7 +567,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="KPushButton" name="ghns">
|
<widget class="QPushButton" name="ghns">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Get New Window Switcher Layout</string>
|
<string>Get New Window Switcher Layout</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -582,11 +611,6 @@
|
||||||
<extends>QComboBox</extends>
|
<extends>QComboBox</extends>
|
||||||
<header>kcombobox.h</header>
|
<header>kcombobox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>highlightWindowCheck</tabstop>
|
<tabstop>highlightWindowCheck</tabstop>
|
||||||
|
|
Loading…
Reference in a new issue