a33f4313ab
clients by adding an unnecessary 'enable-bidi' checkbox which was never agreed upon on the kwin mailing list. The use of --reverse is sufficient without needing this checkbox. Please discuss largish patches like these first, especially during a feature freeze! (Everyone also seems to forget the kwin-styles in kdeartwork) - Make clients look the same with --reverse instead of the broken state they were in previously. If the button ordering is not to your liking in reverse mode, just change the button positions. (Or send patches for those clients that have not got these features yet). - Clean up popupMenu handling somewhat. - Remove a global static object in keramik. svn path=/trunk/kdebase/kwin/; revision=174079
105 lines
2.3 KiB
C++
105 lines
2.3 KiB
C++
/*
|
|
$Id$
|
|
|
|
This is the new kwindecoration kcontrol module
|
|
|
|
Copyright (c) 2001
|
|
Karol Szwed <gallium@kde.org>
|
|
http://gallium.n3.net/
|
|
|
|
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>
|
|
*/
|
|
|
|
#ifndef KWINDECORATION_H
|
|
#define KWINDECORATION_H
|
|
|
|
#include <kcmodule.h>
|
|
#include <dcopobject.h>
|
|
#include <buttons.h>
|
|
#include <kconfig.h>
|
|
#include <klibloader.h>
|
|
|
|
#include "kwindecorationIface.h"
|
|
|
|
class QListBox;
|
|
class QCheckBox;
|
|
class QTabWidget;
|
|
class QVBox;
|
|
|
|
// Stores themeName and its corresponding library Name
|
|
struct DecorationInfo
|
|
{
|
|
QString name;
|
|
QString libraryName;
|
|
};
|
|
|
|
|
|
class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
KWinDecorationModule(QWidget* parent, const char* name, const QStringList &);
|
|
~KWinDecorationModule();
|
|
|
|
virtual void load();
|
|
virtual void save();
|
|
virtual void defaults();
|
|
|
|
QString quickHelp() const;
|
|
const KAboutData* aboutData() const;
|
|
|
|
virtual void dcopUpdateClientList();
|
|
|
|
signals:
|
|
void changed(bool);
|
|
void pluginLoad( KConfig* conf );
|
|
void pluginSave( KConfig* conf );
|
|
void pluginDefaults();
|
|
|
|
protected slots:
|
|
// Allows us to turn "save" on
|
|
void slotSelectionChanged();
|
|
void slotEnableButtonTab(bool on);
|
|
void slotDecorationHighlighted( const QString& s );
|
|
|
|
private:
|
|
void readConfig( KConfig* conf );
|
|
void writeConfig( KConfig* conf );
|
|
void findDecorations();
|
|
void createDecorationList();
|
|
void updateSelection();
|
|
QString decorationLibName( const QString& name );
|
|
QString decorationName ( QString& libName );
|
|
void resetPlugin( KConfig* conf, const QString* currentDecoName = 0 );
|
|
void resetKWin();
|
|
|
|
QTabWidget* tabWidget;
|
|
|
|
// Page 1
|
|
QListBox* decorationListBox;
|
|
QValueList<DecorationInfo> decorations;
|
|
QCheckBox* cbUseCustomButtonPositions;
|
|
// QCheckBox* cbUseMiniWindows;
|
|
QCheckBox* cbShowToolTips;
|
|
|
|
// Page 2
|
|
ButtonDropSite* dropSite;
|
|
ButtonSource* buttonSource;
|
|
|
|
// Page 3
|
|
QObject* pluginObject;
|
|
QString currentLibraryName;
|
|
QString oldLibraryName;
|
|
QVBox* pluginPage;
|
|
QVBox* buttonPage;
|
|
QObject* (*allocatePlugin)( KConfig* conf, QWidget* parent );
|
|
};
|
|
|
|
|
|
#endif
|
|
// vim: ts=4
|