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.
129 lines
3.9 KiB
129 lines
3.9 KiB
15 years ago
|
/***************************************************************************
|
||
11 years ago
|
tdestylepage.h - description
|
||
15 years ago
|
-------------------
|
||
|
begin : Tue May 22 2001
|
||
|
copyright : (C) 2001 by Ralf Nolden
|
||
|
email : nolden@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. *
|
||
|
* *
|
||
|
***************************************************************************/
|
||
|
|
||
11 years ago
|
#ifndef TDESTYLEPAGE_H
|
||
|
#define TDESTYLEPAGE_H
|
||
15 years ago
|
|
||
15 years ago
|
#include <tqcolor.h>
|
||
11 years ago
|
#include "tdestylepagedlg.h"
|
||
15 years ago
|
|
||
|
/**Abstract class for the style page
|
||
|
*@author Ralf Nolden
|
||
|
*/
|
||
14 years ago
|
class TQListViewItem;
|
||
15 years ago
|
|
||
12 years ago
|
class TDEStylePage : public TDEStylePageDlg {
|
||
15 years ago
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
12 years ago
|
TDEStylePage(TQWidget *parent=0, const char *name=0);
|
||
|
~TDEStylePage();
|
||
15 years ago
|
void save(bool curSettings=true);
|
||
|
/** resets to KDE style as default */
|
||
|
void setDefaults();
|
||
|
/** set the preview-widgets' style to the currently selected */
|
||
|
void switchPrevStyle();
|
||
|
|
||
|
private:
|
||
15 years ago
|
TQString origStyle;
|
||
|
TQString origKWinStyle;
|
||
|
TQString origIcons;
|
||
|
TQString defaultKWinStyle;
|
||
|
TQString currentStyle;
|
||
12 years ago
|
TDEConfig* ctwin;
|
||
15 years ago
|
struct colorSet {
|
||
15 years ago
|
TQString colorFile, bgMode;
|
||
15 years ago
|
int contrast;
|
||
15 years ago
|
TQColor usrCol1, usrCol2;
|
||
|
TQColor foreground;
|
||
|
TQColor background;
|
||
|
TQColor windowForeground;
|
||
|
TQColor windowBackground;
|
||
|
TQColor selectForeground;
|
||
|
TQColor selectBackground;
|
||
|
TQColor buttonForeground;
|
||
|
TQColor buttonBackground;
|
||
|
TQColor linkColor;
|
||
|
TQColor visitedLinkColor;
|
||
|
TQColor activeForeground;
|
||
|
TQColor inactiveForeground;
|
||
|
TQColor activeBackground;
|
||
|
TQColor inactiveBackground;
|
||
|
TQColor activeBlend;
|
||
|
TQColor inactiveBlend;
|
||
|
TQColor activeTitleBtnBg;
|
||
|
TQColor inactiveTitleBtnBg;
|
||
|
TQColor alternateBackground;
|
||
15 years ago
|
} usrColors, currentColors;
|
||
|
// first, the KDE 2 default color values
|
||
15 years ago
|
TQColor widget;
|
||
13 years ago
|
TQColor trinity4Blue;
|
||
15 years ago
|
TQColor inactiveBackground;
|
||
|
TQColor activeBackground;
|
||
|
TQColor button;
|
||
|
TQColor link;
|
||
|
TQColor visitedLink;
|
||
|
TQColor activeBlend;
|
||
|
TQColor activeTitleBtnBg;
|
||
|
TQColor inactiveTitleBtnBg;
|
||
|
TQColor inactiveForeground;
|
||
|
TQColor alternateBackground;
|
||
|
|
||
|
TQListViewItem * kde;
|
||
|
TQListViewItem * classic;
|
||
|
TQListViewItem * keramik;
|
||
|
TQListViewItem * cde;
|
||
|
TQListViewItem * win;
|
||
|
TQListViewItem * platinum;
|
||
|
|
||
|
TQStyle *appliedStyle;
|
||
15 years ago
|
|
||
|
// widget-style existence
|
||
|
bool kde_hc_exist, kde_def_exist, kde_keramik_exist, kde_light_exist,
|
||
|
cde_exist, win_exist, platinum_exist, kde_plastik_exist;
|
||
|
|
||
13 years ago
|
// twin-style-existence
|
||
|
bool twin_keramik_exist, twin_default_exist, twin_system_exist,
|
||
|
twin_win_exist, twin_cde_exist, twin_quartz_exist, twin_plastik_exist;
|
||
15 years ago
|
|
||
|
// icon-theme-existence
|
||
|
bool icon_crystalsvg_exist, icon_kdeclassic_exist, icon_Locolor_exist;
|
||
|
|
||
|
public slots: // Public slots
|
||
|
/** to be connected to the OS page. Catches either KDE, CDE, win or mac and pre-sets the style. */
|
||
15 years ago
|
void presetStyle(const TQString& style);
|
||
15 years ago
|
|
||
|
private:
|
||
|
void saveColors(bool curSettings=true);
|
||
|
void saveStyle(bool curSettings=true);
|
||
|
void saveKWin(bool curSettings=true);
|
||
|
void saveIcons(bool curSettings=true);
|
||
|
void getAvailability();
|
||
|
void getUserDefaults();
|
||
|
void initColors();
|
||
|
void liveUpdate();
|
||
|
void getColors(colorSet *set, bool colorfile );
|
||
15 years ago
|
void setStyleRecursive(TQWidget* w, TQPalette &, TQStyle* s);
|
||
15 years ago
|
void changeCurrentStyle();
|
||
15 years ago
|
TQPalette createPalette();
|
||
15 years ago
|
|
||
|
private slots:
|
||
|
void slotCurrentChanged();
|
||
|
};
|
||
|
|
||
|
#endif
|