You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
4.2 KiB
149 lines
4.2 KiB
15 years ago
|
/*
|
||
13 years ago
|
This is the new twindecoration kcontrol module
|
||
15 years ago
|
|
||
|
Copyright (c) 2001
|
||
|
Karol Szwed <gallium@kde.org>
|
||
|
http://gallium.n3.net/
|
||
|
|
||
13 years ago
|
Supports new twin configuration plugins, and titlebar button position
|
||
15 years ago
|
modification via dnd interface.
|
||
|
|
||
13 years ago
|
Based on original "twintheme" (Window Borders)
|
||
15 years ago
|
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 <dcopobject.h>
|
||
|
#include <buttons.h>
|
||
|
#include <kconfig.h>
|
||
|
#include <klibloader.h>
|
||
|
|
||
|
#include <kdecoration.h>
|
||
|
|
||
13 years ago
|
#include "twindecorationIface.h"
|
||
15 years ago
|
|
||
|
class KComboBox;
|
||
15 years ago
|
class TQCheckBox;
|
||
|
class TQLabel;
|
||
|
class TQTabWidget;
|
||
|
class TQVBox;
|
||
|
class TQSlider;
|
||
15 years ago
|
|
||
|
class KDecorationPlugins;
|
||
|
class KDecorationPreview;
|
||
|
|
||
|
// Stores themeName and its corresponding library Name
|
||
|
struct DecorationInfo
|
||
|
{
|
||
15 years ago
|
TQString name;
|
||
|
TQString libraryName;
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
|
class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface, public KDecorationDefines
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
15 years ago
|
KWinDecorationModule(TQWidget* parent, const char* name, const TQStringList &);
|
||
15 years ago
|
~KWinDecorationModule();
|
||
|
|
||
|
virtual void load();
|
||
|
virtual void save();
|
||
|
virtual void defaults();
|
||
|
|
||
15 years ago
|
TQString quickHelp() const;
|
||
15 years ago
|
|
||
|
virtual void dcopUpdateClientList();
|
||
|
|
||
|
signals:
|
||
|
void pluginLoad( KConfig* conf );
|
||
|
void pluginSave( KConfig* conf );
|
||
|
void pluginDefaults();
|
||
|
|
||
|
protected slots:
|
||
|
// Allows us to turn "save" on
|
||
|
void slotSelectionChanged();
|
||
15 years ago
|
void slotChangeDecoration( const TQString & );
|
||
15 years ago
|
void slotBorderChanged( int );
|
||
|
void slotButtonsChanged();
|
||
|
|
||
|
private:
|
||
|
void readConfig( KConfig* conf );
|
||
|
void writeConfig( KConfig* conf );
|
||
|
void findDecorations();
|
||
|
void createDecorationList();
|
||
|
void updateSelection();
|
||
15 years ago
|
TQString decorationLibName( const TQString& name );
|
||
|
TQString decorationName ( TQString& libName );
|
||
|
static TQString styleToConfigLib( TQString& styleLib );
|
||
|
void resetPlugin( KConfig* conf, const TQString& currentDecoName = TQString::null );
|
||
15 years ago
|
void resetKWin();
|
||
|
void checkSupportedBorderSizes();
|
||
15 years ago
|
static int borderSizeToIndex( BorderSize size, TQValueList< BorderSize > sizes );
|
||
|
static BorderSize indexToBorderSize( int index, TQValueList< BorderSize > sizes );
|
||
15 years ago
|
|
||
15 years ago
|
TQTabWidget* tabWidget;
|
||
15 years ago
|
|
||
|
// Page 1
|
||
|
KComboBox* decorationList;
|
||
15 years ago
|
TQValueList<DecorationInfo> decorations;
|
||
15 years ago
|
|
||
|
KDecorationPreview* preview;
|
||
|
KDecorationPlugins* plugins;
|
||
13 years ago
|
KConfig twinConfig;
|
||
15 years ago
|
|
||
15 years ago
|
TQCheckBox* cbUseCustomButtonPositions;
|
||
|
// TQCheckBox* cbUseMiniWindows;
|
||
|
TQCheckBox* cbShowToolTips;
|
||
|
TQLabel* lBorder;
|
||
|
TQComboBox* cBorder;
|
||
15 years ago
|
BorderSize border_size;
|
||
|
|
||
15 years ago
|
TQObject* pluginObject;
|
||
|
TQWidget* pluginConfigWidget;
|
||
|
TQString currentLibraryName;
|
||
|
TQString oldLibraryName;
|
||
|
TQObject* (*allocatePlugin)( KConfig* conf, TQWidget* parent );
|
||
15 years ago
|
|
||
|
// Page 2
|
||
|
ButtonPositionWidget *buttonPositionWidget;
|
||
15 years ago
|
TQVBox* buttonPage;
|
||
14 years ago
|
|
||
|
// Page 3
|
||
|
TQVBox *shadowPage;
|
||
|
KColorButton *inactiveShadowColourButton, *shadowColourButton;
|
||
|
TQCheckBox *cbShadowDocks, *cbShadowOverrides, *cbShadowTopMenus;
|
||
|
TQCheckBox *cbInactiveShadow, *cbWindowShadow;
|
||
|
TQGroupBox *activeShadowSettings, *inactiveShadowSettings;
|
||
|
TQGroupBox *whichShadowSettings;
|
||
|
TQSlider *inactiveShadowOpacitySlider, *shadowOpacitySlider;
|
||
|
TQSpinBox *inactiveShadowOpacitySpinBox, *shadowOpacitySpinBox;
|
||
|
TQSpinBox *inactiveShadowXOffsetSpinBox, *shadowXOffsetSpinBox;
|
||
|
TQSpinBox *inactiveShadowYOffsetSpinBox, *shadowYOffsetSpinBox;
|
||
|
TQSpinBox *inactiveShadowThicknessSpinBox, *shadowThicknessSpinBox;
|
||
15 years ago
|
};
|
||
|
|
||
|
|
||
|
#endif
|
||
|
// vim: ts=4
|
||
|
// kate: space-indent off; tab-width 4;
|