home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ksgrd / StyleEngine.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.0 KB  |  87 lines

  1. /*
  2.     KSysGuard, the KDE System Guard
  3.    
  4.     Copyright (c) 1999 - 2001 Chris Schlaeger <cs@kde.org>
  5.     
  6.     This program is free software; you can redistribute it and/or
  7.     modify it under the terms of version 2 of the GNU General Public
  8.     License as published by the Free Software Foundation.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  18.  
  19.     KSysGuard is currently maintained by Chris Schlaeger <cs@kde.org>.
  20.     Please do not commit any changes without consulting me first. Thanks!
  21.  
  22. */
  23.  
  24. #ifndef KSG_STYLEENGINE_H
  25. #define KSG_STYLEENGINE_H
  26.  
  27. #include <qcolor.h>
  28. #include <qobject.h>
  29. #include <qptrlist.h>
  30.  
  31. #include <kdemacros.h>
  32.  
  33. class KConfig;
  34.  
  35. class QListBoxItem;
  36.  
  37. class StyleSettings;
  38.  
  39. namespace KSGRD {
  40.  
  41. class KDE_EXPORT StyleEngine : public QObject
  42. {
  43.   Q_OBJECT
  44.  
  45.   public:
  46.     StyleEngine();
  47.     ~StyleEngine();
  48.  
  49.     void readProperties( KConfig* );
  50.     void saveProperties( KConfig* );
  51.  
  52.     const QColor& firstForegroundColor() const;
  53.     const QColor& secondForegroundColor() const;
  54.     const QColor& alarmColor() const;
  55.     const QColor& backgroundColor() const;
  56.  
  57.     uint fontSize() const;
  58.  
  59.     const QColor& sensorColor( uint pos );
  60.     uint numSensorColors() const;
  61.  
  62.   public slots:
  63.     void configure();
  64.     void applyToWorksheet();
  65.  
  66.   signals:
  67.       void applyStyleToWorksheet();
  68.  
  69.   private:
  70.     void apply();
  71.  
  72.     QColor mFirstForegroundColor;
  73.     QColor mSecondForegroundColor;
  74.     QColor mAlarmColor;
  75.     QColor mBackgroundColor;
  76.     uint mFontSize;
  77.     QValueList<QColor> mSensorColors;
  78.  
  79.     StyleSettings *mSettingsDialog;
  80. };
  81.  
  82. KDE_EXPORT extern StyleEngine* Style;
  83.  
  84. }
  85.  
  86. #endif
  87.