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.
259 lines
7.2 KiB
259 lines
7.2 KiB
14 years ago
|
//
|
||
|
// Copyright 2003 Jim Bublitz <jbublitz@nwinternet.com>
|
||
|
// Earlier copyrights 1998 - 2002 Jim Bublitz and/or Phil Thompson
|
||
|
// may also apply
|
||
|
|
||
|
|
||
|
// Generated by preSip
|
||
|
// module kdeui version KDE_3_1_1
|
||
|
|
||
|
|
||
|
// This software 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 software 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 library; see the file COPYING.
|
||
|
// If not, write to the Free Software Foundation, Inc.,
|
||
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
|
||
|
|
||
|
class KThemePixmap : KPixmap
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <kthemebase.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
enum BorderType
|
||
|
{
|
||
|
Top = 0,
|
||
|
Bottom,
|
||
|
Left,
|
||
|
Right,
|
||
|
TopLeft,
|
||
|
TopRight,
|
||
|
BottomLeft,
|
||
|
BottomRight
|
||
|
};
|
||
|
|
||
|
KThemePixmap (bool = 1);
|
||
|
KThemePixmap (const KThemePixmap&);
|
||
|
QPixmap* border (KThemePixmap::BorderType);
|
||
|
void setBorder (KThemePixmap::BorderType, const QPixmap&);
|
||
|
void updateAccessed ();
|
||
|
bool isOld ();
|
||
|
|
||
|
protected:
|
||
|
|
||
|
}; // class KThemePixmap
|
||
|
|
||
|
|
||
|
class KThemeCache : QObject
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <kthemebase.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
enum ScaleHint
|
||
|
{
|
||
|
FullScale,
|
||
|
HorizontalScale,
|
||
|
VerticalScale
|
||
|
};
|
||
|
|
||
|
KThemeCache (int, QObject*/TransferThis/ = 0, const char* = 0);
|
||
|
bool insert (KThemePixmap*, KThemeCache::ScaleHint, int, bool = 0, bool = 0);
|
||
|
KThemePixmap* pixmap (int, int, int, bool = 0, bool = 0);
|
||
|
KThemePixmap* horizontalPixmap (int, int);
|
||
|
KThemePixmap* verticalPixmap (int, int);
|
||
|
|
||
|
protected slots:
|
||
|
void flushTimeout ();
|
||
|
|
||
|
protected:
|
||
|
|
||
|
}; // class KThemeCache
|
||
|
|
||
|
|
||
|
class KThemeBase : KStyle
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <kthemebase.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
KThemeBase (const QString&);
|
||
|
|
||
|
enum ScaleHint
|
||
|
{
|
||
|
FullScale,
|
||
|
HorizontalScale,
|
||
|
VerticalScale,
|
||
|
TileScale
|
||
|
};
|
||
|
|
||
|
|
||
|
enum ArrowStyle
|
||
|
{
|
||
|
MotifArrow,
|
||
|
LargeArrow,
|
||
|
SmallArrow
|
||
|
};
|
||
|
|
||
|
|
||
|
enum ShadeStyle
|
||
|
{
|
||
|
Motif,
|
||
|
Windows,
|
||
|
Next,
|
||
|
KDE
|
||
|
};
|
||
|
|
||
|
|
||
|
enum SButton
|
||
|
{
|
||
|
SBBottomLeft,
|
||
|
SBBottomRight,
|
||
|
SBOpposite
|
||
|
};
|
||
|
|
||
|
|
||
|
enum Gradient
|
||
|
{
|
||
|
GrNone,
|
||
|
GrHorizontal,
|
||
|
GrVertical,
|
||
|
GrDiagonal,
|
||
|
GrPyramid,
|
||
|
GrRectangle,
|
||
|
GrElliptic,
|
||
|
GrReverseBevel
|
||
|
};
|
||
|
|
||
|
|
||
|
enum WidgetType
|
||
|
{
|
||
|
PushButton = 0,
|
||
|
ComboBox,
|
||
|
HScrollBarSlider,
|
||
|
VScrollBarSlider,
|
||
|
Bevel,
|
||
|
ToolButton,
|
||
|
ScrollButton,
|
||
|
HScrollDeco,
|
||
|
VScrollDeco,
|
||
|
ComboDeco,
|
||
|
MenuItem,
|
||
|
InactiveTab,
|
||
|
ArrowUp,
|
||
|
ArrowDown,
|
||
|
ArrowLeft,
|
||
|
ArrowRight,
|
||
|
PushButtonDown,
|
||
|
ComboBoxDown,
|
||
|
HScrollBarSliderDown,
|
||
|
VScrollBarSliderDown,
|
||
|
BevelDown,
|
||
|
ToolButtonDown,
|
||
|
ScrollButtonDown,
|
||
|
HScrollDecoDown,
|
||
|
VScrollDecoDown,
|
||
|
ComboDecoDown,
|
||
|
MenuItemDown,
|
||
|
ActiveTab,
|
||
|
SunkenArrowUp,
|
||
|
SunkenArrowDown,
|
||
|
SunkenArrowLeft,
|
||
|
SunkenArrowRight,
|
||
|
HScrollGroove,
|
||
|
VScrollGroove,
|
||
|
Slider,
|
||
|
SliderGroove,
|
||
|
IndicatorOn,
|
||
|
IndicatorOff,
|
||
|
ExIndicatorOn,
|
||
|
ExIndicatorOff,
|
||
|
HBarHandle,
|
||
|
VBarHandle,
|
||
|
ToolBar,
|
||
|
Splitter,
|
||
|
CheckMark,
|
||
|
MenuBar,
|
||
|
DisArrowUp,
|
||
|
DisArrowDown,
|
||
|
DisArrowLeft,
|
||
|
DisArrowRight,
|
||
|
ProgressBar,
|
||
|
ProgressBg,
|
||
|
MenuBarItem,
|
||
|
Background
|
||
|
};
|
||
|
|
||
|
ScaleHint scaleHint (KThemeBase::WidgetType) const;
|
||
|
Gradient gradientHint (KThemeBase::WidgetType) const;
|
||
|
const QColorGroup* colorGroup (const QColorGroup&, KThemeBase::WidgetType) const;
|
||
|
QBrush pixmapBrush (const QColorGroup&, QColorGroup::ColorRole, int, int, KThemeBase::WidgetType);
|
||
|
bool isPixmap (KThemeBase::WidgetType) const;
|
||
|
bool isColor (KThemeBase::WidgetType) const;
|
||
|
bool is3DFocus () const;
|
||
|
int focusOffset () const;
|
||
|
int borderWidth (KThemeBase::WidgetType) const;
|
||
|
int pixBorderWidth (KThemeBase::WidgetType) const;
|
||
|
KThemePixmap* borderPixmap (KThemeBase::WidgetType);
|
||
|
int highlightWidth (KThemeBase::WidgetType) const;
|
||
|
int decoWidth (KThemeBase::WidgetType) const;
|
||
|
int getSBExtent () const;
|
||
|
SButton scrollBarLayout () const;
|
||
|
ArrowStyle arrowType () const;
|
||
|
ShadeStyle shade () const;
|
||
|
int frameWidth () const;
|
||
|
int splitWidth () const;
|
||
|
int bevelContrast (KThemeBase::WidgetType) const;
|
||
|
int buttonXShift () const;
|
||
|
int buttonYShift () const;
|
||
|
int sliderButtonLength () const;
|
||
|
bool roundButton () const;
|
||
|
bool roundComboBox () const;
|
||
|
bool roundSlider () const;
|
||
|
bool activeTabLine () const;
|
||
|
bool inactiveTabLine () const;
|
||
|
KThemePixmap* uncached (KThemeBase::WidgetType) const;
|
||
|
virtual KThemePixmap* scalePixmap (int, int, KThemeBase::WidgetType);
|
||
|
static void applyConfigFile (const QString&);
|
||
|
|
||
|
protected:
|
||
|
QImage* image (KThemeBase::WidgetType) const;
|
||
|
QColor* gradientHigh (KThemeBase::WidgetType) const;
|
||
|
QColor* gradientLow (KThemeBase::WidgetType) const;
|
||
|
void readConfig (Qt::GUIStyle = Qt::WindowsStyle);
|
||
|
//ig void readWidgetConfig (int, KConfig*, QString*, QString*, bool*);
|
||
|
void copyWidgetConfig (int, int, QString*, QString*);
|
||
|
QColorGroup* makeColorGroup (QColor&, QColor&, Qt::GUIStyle = Qt::WindowsStyle);
|
||
|
KThemePixmap* scale (int, int, KThemeBase::WidgetType);
|
||
|
KThemePixmap* scaleBorder (int, int, KThemeBase::WidgetType);
|
||
|
KThemePixmap* gradient (int, int, KThemeBase::WidgetType);
|
||
|
KThemePixmap* blend (KThemeBase::WidgetType);
|
||
|
void generateBorderPix (int);
|
||
|
void applyResourceGroup (KConfig*, int);
|
||
|
void applyMiscResourceGroup (KConfig*);
|
||
|
void readResourceGroup (int, QString*, QString*, bool*);
|
||
|
void readMiscResourceGroup ();
|
||
|
KThemePixmap* loadPixmap (QString&);
|
||
|
QImage* loadImage (QString&);
|
||
|
|
||
|
}; // class KThemeBase
|
||
|
|