iconsets.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           iconsets.h  -  description
00003                              -------------------
00004     begin                : Thu Jun 23 2005
00005     copyright            : (C) 2005-2006 by Ben Swerts
00006     email                : bswerts@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00020 
00021 #ifndef ICONSETS_H
00022 #define ICONSETS_H
00023 
00025 
00026 // STL headers
00027 #include <vector>
00028 
00029 // Qt forward class declarations
00030 #include <qiconset.h>
00031 #include <qpixmap.h>
00032 class QString;
00033 
00035 class IconSets
00036 {
00037   public:
00038     ~IconSets();                        // default destructor
00039 
00040     // public enums
00041     enum IconSetID{New = 0, Open, Save, 
00042                    Cut, Copy, Paste, Prefs,
00043                    MoleculeRead, MoleculeAnimate, MoleculeSave, MoleculeSelection,
00044                    SetupGlobal, SetupBrabo, SetupRelax, SetupFreq, SetupBuur,
00045                    Start, Pause, Stop, Write, Clean, Outputs,
00046                    ArrowLeft, ArrowRight, ArrowUp, ArrowDown,
00047                    Clear, Image, Help, WhatsThis,
00048                    NewPart, Generate,
00049                    LastIcon};
00050     enum PixmapID{Background = 0, SymmX, SymmY, SymmZ, SymmXY, SymmXZ, SymmYZ, SymmXYZ,
00051                   Stretch, Bend, Torsion, OutOfPlane, LinearBend, 
00052                   OK, BRABO, Molecule, Visuals, OpenGL, PVM};
00053 
00054     // static public member functions
00055     static QIconSet getIconSet(const IconSetID id);         // returns the iconset associated with the id
00056     static QString factoryName(const IconSetID id);         // returns the string with which to access the 'normal' version of the icon
00057     static QPixmap getPixmap(const PixmapID id);  // returns the pixmap associated with the id
00058     static QPixmap getSplash();         // returns the pixmap used for the splash screen and about box
00059 
00060   private:
00061     // private enums
00062     enum FactoryID{NewNormal = 0, NewDisabled, NewActive, OpenNormal, OpenDisabled, OpenActive, SaveNormal, SaveDisabled, SaveActive,
00063                    CutNormal, CutDisabled, CutActive, CopyNormal, CopyDisabled, CopyActive, 
00064                    PasteNormal, PasteDisabled, PasteActive, PrefsNormal, PrefsActive,
00065                    MoleculeReadNormal, MoleculeReadDisabled, MoleculeReadActive, 
00066                    MoleculeAnimateNormal, MoleculeAnimateDisabled, MoleculeAnimateActive, 
00067                    MoleculeSaveNormal, MoleculeSaveDisabled, MoleculeSaveActive, 
00068                    MoleculeSelectionNormal, MoleculeSelectionDisabled, MoleculeSelectionActive,
00069                    SetupGlobalNormal, SetupGlobalDisabled, SetupGlobalActive,
00070                    SetupBraboNormal, SetupBraboDisabled, SetupBraboActive,
00071                    SetupRelaxNormal, SetupRelaxDisabled, SetupRelaxActive, SetupFreqNormal, SetupBuurNormal,
00072                    StartNormal, StartDisabled, StartActive, PauseNormal, PauseDisabled, PauseActive, 
00073                    StopNormal, StopDisabled, StopActive, WriteNormal, WriteDisabled, WriteActive, 
00074                    CleanNormal, CleanDisabled, CleanActive, OutputsNormal, OutputsDisabled, OutputsActive,
00075                    ArrowLeftNormal, ArrowLeftDisabled, ArrowLeftActive, ArrowRightNormal, ArrowRightDisabled, ArrowRightActive, 
00076                    ArrowUpNormal, ArrowUpDisabled, ArrowUpActive, ArrowDownNormal, ArrowDownDisabled, ArrowDownActive,
00077                    ClearNormal, ClearDisabled, ClearActive, ImageNormal, ImageDisabled, ImageActive, 
00078                    HelpNormal, HelpActive, WhatsThisNormal, WhatsThisActive,
00079                    NewPartNormal, NewPartDisabled, NewPartActive, GenerateNormal, GenerateDisabled, GenerateActive,
00080 
00081                    Background2, SymmX2, SymmY2, SymmZ2, SymmXY2, SymmXZ2, SymmYZ2, SymmXYZ2,
00082                    Stretch2, Bend2, Torsion2, OutOfPlane2, LinearBend2, 
00083                    OK2, BRABO2, Molecule2, Visuals2, OpenGL2, PVM2,
00084                    LastFactory};
00085 
00086     IconSets();                         // private constructor for a static class
00087 
00088     // private static member functions
00089     static void initialize();           // fills all pixmaps
00090     static void initPixmap(unsigned char* data, const int sizeX, const int sizeY, const bool alpha, const FactoryID id, const QString idString, const IconSetID iconID = LastIcon); // fills one pixmap
00091 
00092     // private static member data
00093     static bool isInitialized;          //< indicates whether initialize() is called already
00094     static std::vector<QString> factoryNames;  // the names of all pixmaps stored in the QMimeSourceFactory
00095     static std::vector<QString> iconNames;     // the names of the normal versions of the icons stored in the QMimeSourceFactory
00096 };
00097 
00098 #endif
00099 

Generated on Fri May 19 14:31:55 2006 for Brabosphere by  doxygen 1.4.6-NO