mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00

this was done with namefsck script from Katie, solves namespace issues Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
82 lines
2.2 KiB
C++
82 lines
2.2 KiB
C++
/*
|
|
* Copyright (c) 2009 Chani Armitage <chani@kde.org>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Library General Public License as
|
|
* published by the Free Software Foundation; either version 2, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this program; if not, write to the
|
|
* Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef MOUSEPLUGINWIDGET_H
|
|
#define MOUSEPLUGINWIDGET_H
|
|
|
|
#include <QDialog>
|
|
#include <QLabel>
|
|
#include <QToolButton>
|
|
|
|
#include <KConfigGroup>
|
|
|
|
#include <plasma/containmentactions.h>
|
|
#include "mouseinputbutton.h"
|
|
|
|
#include <QComboBox>
|
|
#include <QGridLayout>
|
|
|
|
class MousePluginWidget : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MousePluginWidget(const QString &plugin, const QString &trigger, QGridLayout *layoutHack, QWidget *parent = 0);
|
|
~MousePluginWidget();
|
|
|
|
void setTrigger(const QString &trigger);
|
|
void prepareForSave();
|
|
void save();
|
|
|
|
signals:
|
|
void triggerChanged(const QString &oldTrigger, const QString &newTrigger);
|
|
void configChanged(const QString &trigger);
|
|
|
|
public slots:
|
|
void setContainment(Plasma::Containment *ctmt);
|
|
|
|
private slots:
|
|
void changeTrigger(const QString &oldTrigger, const QString& newTrigger);
|
|
void clearTrigger();
|
|
void setPlugin(int index);
|
|
|
|
void configure();
|
|
void acceptConfig();
|
|
void rejectConfig();
|
|
void showAbout();
|
|
|
|
private:
|
|
void updateConfig(const QString &trigger);
|
|
|
|
QComboBox *m_pluginList;
|
|
MouseInputButton *m_triggerButton;
|
|
QToolButton *m_configButton;
|
|
QToolButton *m_aboutButton;
|
|
QToolButton *m_clearButton;
|
|
QDialog *m_configDlg;
|
|
|
|
KPluginInfo m_plugin;
|
|
QWeakPointer<Plasma::ContainmentActions> m_pluginInstance;
|
|
Plasma::Containment *m_containment;
|
|
QString m_lastConfigLocation;
|
|
KConfigGroup m_tempConfig;
|
|
KConfig m_tempConfigParent;
|
|
|
|
};
|
|
#endif
|
|
|