Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

profile.h

Go to the documentation of this file.
00001 #ifndef OPIE_PROFILE_H
00002 #define OPIE_PROFILE_H
00003 
00004 #include <qmap.h>
00005 #include <qstring.h>
00006 #include <qstringlist.h>
00007 #include <qvaluelist.h>
00015 class Profile {
00016 public:
00017     typedef QValueList<Profile> ValueList;
00018     enum Color { Black = 0,
00019                  White,
00020                  Gray,
00021                  Green,
00022                  Orange};
00023     enum Terminal {VT102 = 0, VT100,
00024                    Ansi,
00025                    Linux,
00026                    XTerm };
00027     enum Font { Micro = 0,  Small, Medium };
00028     Profile();
00029     Profile( const QString& name,
00030              const QCString& iolayerName,
00031              const QCString& termName,
00032              int background,
00033              int foreground,
00034              int terminal);
00035     Profile( const Profile& );
00036     Profile &operator=( const Profile& );
00037     bool operator==( const Profile& prof );
00038 
00039     ~Profile();
00040     QString name()const;
00041     QCString ioLayerName()const;
00042     QCString terminalName()const;
00043     bool autoConnect()const;
00044     int foreground()const;
00045     int background()const;
00046     int terminal()const;
00047 
00048     /*
00049      * config stuff
00050      */
00051     QMap<QString, QString> conf()const;
00052     void clearConf();
00053     void writeEntry( const QString& key,  const QString& value );
00054     void writeEntry( const QString& key,  int num );
00055     void writeEntry( const QString& key, bool b );
00056     void writeEntry( const QString& key, const QStringList&, const QChar& );
00057     QString readEntry( const QString& key, const QString& deflt = QString::null)const;
00058     int readNumEntry( const QString& key, int = -1 )const;
00059     bool readBoolEntry( const QString& key,  bool = FALSE )const;
00060 
00061     void setName( const QString& );
00062     void setIOLayer( const QCString& );
00063     void setTerminalName( const QCString& );
00064     void setAutoConnect( const bool );
00065     void setBackground( int back );
00066     void setForeground( int fore );
00067     void setTerminal( int term );
00068     void setConf( const QMap<QString, QString>& );
00069 private:
00070     QMap<QString, QString> m_conf;
00071     QString m_name;
00072     QCString m_ioLayer, m_term;
00073     bool m_autoConnect;
00074     int m_back;
00075     int m_fore;
00076     int m_terminal;
00077 };
00078 
00079 #endif

Generated on Sat Nov 5 16:16:50 2005 for OPIE by  doxygen 1.4.2