c9df18ab98
* Displays list with previews instead of a dropdown with just the name. * Configuration is moved into an own dialog accessible via a configure button for each decoration * Button configuration is moved into a dialog, by that the tabs are removed * Aurorae themes are listed just like normal decorations * GHNS support to download Aurorae themes * Semi-live preview of changed: when configure dialog is closed the preview is updated * About Dialog added for each decoration (needs updates in desktop files - the information is missing) svn path=/trunk/KDE/kdebase/workspace/; revision=1077141
101 lines
2.5 KiB
C++
101 lines
2.5 KiB
C++
/*
|
|
This is the new kwindecoration kcontrol module
|
|
|
|
Copyright (c) 2001
|
|
Karol Szwed <gallium@kde.org>
|
|
http://gallium.n3.net/
|
|
Copyright 2009, 2010 Martin Gräßlin <kde@martin-graesslin.com>
|
|
|
|
Supports new kwin configuration plugins, and titlebar button position
|
|
modification via dnd interface.
|
|
|
|
Based on original "kwintheme" (Window Borders)
|
|
Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, 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 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 KWINDECORATION_H
|
|
#define KWINDECORATION_H
|
|
|
|
#include <kcmodule.h>
|
|
#include <kconfig.h>
|
|
|
|
#include <kdecoration.h>
|
|
|
|
#include "ui_decoration.h"
|
|
|
|
class QSortFilterProxyModel;
|
|
namespace KWin
|
|
{
|
|
|
|
class DecorationModel;
|
|
|
|
class KWinDecorationForm : public QWidget, public Ui::KWinDecorationForm
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit KWinDecorationForm( QWidget* parent );
|
|
};
|
|
|
|
class KWinDecorationModule : public KCModule, public KDecorationDefines
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
KWinDecorationModule(QWidget* parent, const QVariantList &);
|
|
~KWinDecorationModule();
|
|
|
|
virtual void load();
|
|
virtual void save();
|
|
virtual void defaults();
|
|
|
|
QString quickHelp() const;
|
|
|
|
signals:
|
|
void pluginLoad( const KConfigGroup& conf );
|
|
void pluginSave( KConfigGroup &conf );
|
|
void pluginDefaults();
|
|
|
|
protected slots:
|
|
// Allows us to turn "save" on
|
|
void slotSelectionChanged();
|
|
void slotConfigureButtons();
|
|
void slotGHNSClicked();
|
|
|
|
private:
|
|
void readConfig( const KConfigGroup& conf );
|
|
void writeConfig( KConfigGroup &conf );
|
|
|
|
KSharedConfigPtr kwinConfig;
|
|
|
|
KWinDecorationForm* m_ui;
|
|
bool m_showTooltips;
|
|
bool m_customPositions;
|
|
QString m_leftButtons;
|
|
QString m_rightButtons;
|
|
|
|
DecorationModel* m_model;
|
|
QSortFilterProxyModel* m_proxyModel;
|
|
bool m_configLoaded;
|
|
};
|
|
|
|
} //namespace
|
|
|
|
#endif
|
|
// vim: ts=4
|
|
// kate: space-indent off; tab-width 4;
|