Main Page   Class Hierarchy   Compound List   File List   Compound Members  

cfgdata.h

00001 /*
00002  *
00003  * Copyright (C) 2002 George Staikos <staikos@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, USA.
00019  */
00020 
00021 
00022 
00023 #ifndef _CFGDATA_H
00024 #define _CFGDATA_H
00025 
00026 #include <qstring.h>
00027 
00028 
00029 // Not used yet.  Just here for info at the moment.  They might not
00030 // correspond to other areas of the code.
00031 #define NORM_AUTO       0
00032 #define NORM_NTSC       1
00033 #define NORM_PAL        2
00034 #define NORM_SECAM      3
00035 
00036 // Aspect ratio algorithms:
00037 
00038 #define AR_HEIGHT_TO_WIDTH 0
00039 #define AR_WIDTH_TO_HEIGHT 1
00040 
00041 // Screensaver modes:
00042 
00043 #define SAVER_RUNNING      0
00044 #define SAVER_VISIBLE      1
00045 #define SAVER_FULLSCREEN   2
00046 
00047 class KConfig;
00048 
00053 class ConfigData
00054 {
00055 public:
00057     ConfigData(KConfig* config);
00058     
00060     ConfigData(const ConfigData&);
00061     
00063     ~ConfigData();
00064     
00066     ConfigData const &operator=(ConfigData const &);
00067 
00068     void defaults();
00069 
00070     // Allow default values to be restored on a 'page' by 'page' basis in the config dialog
00071     void defaultsGeneral();
00072     void defaultsDevice();
00073     void defaultsPicture();
00074     void defaultsChannels();
00075     
00076     int save();
00077     int load();
00078     int loadTuning(const QString&, const QString&);
00079     int saveTuning(const QString&, const QString&);
00080     const QString lastSourceFor(const QString& dev) const;
00081 
00082 public:
00083     int frameRate;
00084     bool autoStart;
00085     bool maxResolution;
00086     bool landscape;
00087     bool mirror;
00088     bool videoDesktopEnabled;
00089     bool stayOnTop;
00090     bool autoScaleEnabled;
00091     bool showSelectedOnly;
00092     bool firstTime;
00093     bool fixAR;
00094     int  ARmode;
00095     bool disableScreenSaver;
00096     int  screenSaverMode;
00097 
00098     // position and size of topLevel view
00099     QPoint topLevelPos;
00100     QSize topLevelSize;
00101 
00102     bool useListingsURL;
00103     
00104     QString lastSource; // the last source for this device from loadTuning()
00105     QString channelFile;
00106     QString listingsURL;
00107 
00108     int hue;
00109     int colour;    
00110     int contrast;
00111     int whiteness;
00112     int brightness;
00113 
00114     
00115     QString prevDev;
00116     QString prevSrc;
00117     int lastChannel;
00118     int nps;  // ntsc/pal/secam
00119     
00120     // Volume Related Settings
00121     bool volumeMuted;
00122     int volumeLeft;
00123     int volumeRight;
00124     int volumeRestoreDelay;   
00125 
00126 private:
00127     KConfig* _cfg;    
00128 };
00129 
00130 
00131 #endif
00132 

Generated at Thu Jan 30 02:56:02 2003 for QtVision by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001