IconSets Class Reference

#include <iconsets.h>

List of all members.


Detailed Description

Stores all icons used in the program.

It is a utility class composed of static members only. Upon the first invocation all icon sets are initialized for retrieval in various parts of the program. Additionally it can store other pixmaps. All data are to be retrieved using enums.

Definition at line 35 of file brabosphere/include/iconsets.h.

Public Types

enum  IconSetID {
  New = 0, Open = 0, Save, Cut,
  Copy, Paste, Prefs, MoleculeRead,
  MoleculeAnimate, MoleculeSave, MoleculeSelection, SetupGlobal,
  SetupBrabo, SetupRelax, SetupFreq, SetupBuur,
  Start, Pause, Stop, Write,
  Clean, Outputs, ArrowLeft, ArrowRight,
  ArrowUp, ArrowDown, Clear, Image,
  Help, WhatsThis, NewPart, Generate,
  LastIcon
}
enum  PixmapID {
  Background = 0, SymmX, SymmY, SymmZ,
  SymmXY, SymmXZ, SymmYZ, SymmXYZ,
  Stretch, Bend, Torsion, OutOfPlane,
  LinearBend, OK, BRABO, Molecule,
  Visuals, OpenGL, PVM
}
enum  IconSetID {
  Open = 0, Save, Prefs, Image,
  Help, WhatsThis, LastIcon
}

Public Member Functions

 ~IconSets ()
 The default destructor.
 ~IconSets ()

Static Public Member Functions

static QIconSet getIconSet (const IconSetID id)
 Returns the icon set associated with the given id.
static QString factoryName (const IconSetID id)
 Returns the string with which the default version ('normal'version) of the icon set can be accessed through the default QMimeSourceFactory.
static QPixmap getPixmap (const PixmapID id)
 Returns the pixmap associated with the given id.
static QPixmap getSplash ()
 Returns the pixmap used for the splash screen.
static QIconSet getIconSet (const IconSetID id)
static QString factoryName (const IconSetID id)

Private Types

enum  FactoryID {
  NewNormal = 0, NewDisabled, NewActive, OpenNormal = 0,
  OpenDisabled, OpenActive, SaveNormal, SaveDisabled,
  SaveActive, CutNormal, CutDisabled, CutActive,
  CopyNormal, CopyDisabled, CopyActive, PasteNormal,
  PasteDisabled, PasteActive, PrefsNormal, PrefsActive,
  MoleculeReadNormal, MoleculeReadDisabled, MoleculeReadActive, MoleculeAnimateNormal,
  MoleculeAnimateDisabled, MoleculeAnimateActive, MoleculeSaveNormal, MoleculeSaveDisabled,
  MoleculeSaveActive, MoleculeSelectionNormal, MoleculeSelectionDisabled, MoleculeSelectionActive,
  SetupGlobalNormal, SetupGlobalDisabled, SetupGlobalActive, SetupBraboNormal,
  SetupBraboDisabled, SetupBraboActive, SetupRelaxNormal, SetupRelaxDisabled,
  SetupRelaxActive, SetupFreqNormal, SetupBuurNormal, StartNormal,
  StartDisabled, StartActive, PauseNormal, PauseDisabled,
  PauseActive, StopNormal, StopDisabled, StopActive,
  WriteNormal, WriteDisabled, WriteActive, CleanNormal,
  CleanDisabled, CleanActive, OutputsNormal, OutputsDisabled,
  OutputsActive, ArrowLeftNormal, ArrowLeftDisabled, ArrowLeftActive,
  ArrowRightNormal, ArrowRightDisabled, ArrowRightActive, ArrowUpNormal,
  ArrowUpDisabled, ArrowUpActive, ArrowDownNormal, ArrowDownDisabled,
  ArrowDownActive, ClearNormal, ClearDisabled, ClearActive,
  ImageNormal, ImageDisabled, ImageActive, HelpNormal,
  HelpActive, WhatsThisNormal, WhatsThisActive, NewPartNormal,
  NewPartDisabled, NewPartActive, GenerateNormal, GenerateDisabled,
  GenerateActive, Background2, SymmX2, SymmY2,
  SymmZ2, SymmXY2, SymmXZ2, SymmYZ2,
  SymmXYZ2, Stretch2, Bend2, Torsion2,
  OutOfPlane2, LinearBend2, OK2, BRABO2,
  Molecule2, Visuals2, OpenGL2, PVM2,
  LastFactory
}
enum  FactoryID {
  OpenNormal = 0, OpenActive, SaveNormal, SaveDisabled,
  SaveActive, PrefsNormal, PrefsActive, ImageNormal,
  ImageDisabled, ImageActive, HelpNormal, HelpActive,
  WhatsThisNormal, WhatsThisActive, LastFactory
}

Private Member Functions

 IconSets ()
 The default constructor. Made private to inhibit instantiations of this class.
 IconSets ()

Static Private Member Functions

static void initialize ()
 Initializes the static data of the class.
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)
 Stores one pixmap in the default QMimeSourceFactory and sets up the retrieval array.
static void initialize ()
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)

Static Private Attributes

static bool isInitialized = false
 Holds the initialisation status of the class.
static std::vector< QString > factoryNames = std::vector<QString>(LastFactory)
 Holds the names of the pixmaps in the default QMimeSourceFactory.
static std::vector< QString > iconNames = std::vector<QString>(LastIcon)
 Holds the names of the normal versions of the icons in the default QMimeSourceFactory.
static std::vector< QString > factoryNames
static std::vector< QString > iconNames


Member Enumeration Documentation

enum IconSets::IconSetID
 

Enumerator:
New 
Open 
Save 
Cut 
Copy 
Paste 
Prefs 
MoleculeRead 
MoleculeAnimate 
MoleculeSave 
MoleculeSelection 
SetupGlobal 
SetupBrabo 
SetupRelax 
SetupFreq 
SetupBuur 
Start 
Pause 
Stop 
Write 
Clean 
Outputs 
ArrowLeft 
ArrowRight 
ArrowUp 
ArrowDown 
Clear 
Image 
Help 
WhatsThis 
NewPart 
Generate 
LastIcon 

Definition at line 41 of file brabosphere/include/iconsets.h.

enum IconSets::PixmapID
 

Enumerator:
Background 
SymmX 
SymmY 
SymmZ 
SymmXY 
SymmXZ 
SymmYZ 
SymmXYZ 
Stretch 
Bend 
Torsion 
OutOfPlane 
LinearBend 
OK 
BRABO 
Molecule 
Visuals 
OpenGL 
PVM 

Definition at line 50 of file brabosphere/include/iconsets.h.

enum IconSets::FactoryID [private]
 

Enumerator:
NewNormal 
NewDisabled 
NewActive 
OpenNormal 
OpenDisabled 
OpenActive 
SaveNormal 
SaveDisabled 
SaveActive 
CutNormal 
CutDisabled 
CutActive 
CopyNormal 
CopyDisabled 
CopyActive 
PasteNormal 
PasteDisabled 
PasteActive 
PrefsNormal 
PrefsActive 
MoleculeReadNormal 
MoleculeReadDisabled 
MoleculeReadActive 
MoleculeAnimateNormal 
MoleculeAnimateDisabled 
MoleculeAnimateActive 
MoleculeSaveNormal 
MoleculeSaveDisabled 
MoleculeSaveActive 
MoleculeSelectionNormal 
MoleculeSelectionDisabled 
MoleculeSelectionActive 
SetupGlobalNormal 
SetupGlobalDisabled 
SetupGlobalActive 
SetupBraboNormal 
SetupBraboDisabled 
SetupBraboActive 
SetupRelaxNormal 
SetupRelaxDisabled 
SetupRelaxActive 
SetupFreqNormal 
SetupBuurNormal 
StartNormal 
StartDisabled 
StartActive 
PauseNormal 
PauseDisabled 
PauseActive 
StopNormal 
StopDisabled 
StopActive 
WriteNormal 
WriteDisabled 
WriteActive 
CleanNormal 
CleanDisabled 
CleanActive 
OutputsNormal 
OutputsDisabled 
OutputsActive 
ArrowLeftNormal 
ArrowLeftDisabled 
ArrowLeftActive 
ArrowRightNormal 
ArrowRightDisabled 
ArrowRightActive 
ArrowUpNormal 
ArrowUpDisabled 
ArrowUpActive 
ArrowDownNormal 
ArrowDownDisabled 
ArrowDownActive 
ClearNormal 
ClearDisabled 
ClearActive 
ImageNormal 
ImageDisabled 
ImageActive 
HelpNormal 
HelpActive 
WhatsThisNormal 
WhatsThisActive 
NewPartNormal 
NewPartDisabled 
NewPartActive 
GenerateNormal 
GenerateDisabled 
GenerateActive 
Background2 
SymmX2 
SymmY2 
SymmZ2 
SymmXY2 
SymmXZ2 
SymmYZ2 
SymmXYZ2 
Stretch2 
Bend2 
Torsion2 
OutOfPlane2 
LinearBend2 
OK2 
BRABO2 
Molecule2 
Visuals2 
OpenGL2 
PVM2 
LastFactory 

Definition at line 62 of file brabosphere/include/iconsets.h.

enum IconSets::IconSetID
 

Enumerator:
Open 
Save 
Prefs 
Image 
Help 
WhatsThis 
LastIcon 

Definition at line 41 of file crdview/include/iconsets.h.

enum IconSets::FactoryID [private]
 

Enumerator:
OpenNormal 
OpenActive 
SaveNormal 
SaveDisabled 
SaveActive 
PrefsNormal 
PrefsActive 
ImageNormal 
ImageDisabled 
ImageActive 
HelpNormal 
HelpActive 
WhatsThisNormal 
WhatsThisActive 
LastFactory 

Definition at line 49 of file crdview/include/iconsets.h.


Constructor & Destructor Documentation

IconSets::~IconSets  ) 
 

The default destructor.

Definition at line 55 of file brabosphere/source/iconsets.cpp.

IconSets::IconSets  )  [private]
 

The default constructor. Made private to inhibit instantiations of this class.

Definition at line 327 of file brabosphere/source/iconsets.cpp.

IconSets::~IconSets  ) 
 

IconSets::IconSets  )  [private]
 


Member Function Documentation

QIconSet IconSets::getIconSet const IconSetID  id  )  [static]
 

Returns the icon set associated with the given id.

Definition at line 61 of file brabosphere/source/iconsets.cpp.

QString IconSets::factoryName const IconSetID  id  )  [static]
 

Returns the string with which the default version ('normal'version) of the icon set can be accessed through the default QMimeSourceFactory.

Definition at line 283 of file brabosphere/source/iconsets.cpp.

QPixmap IconSets::getPixmap const PixmapID  id  )  [static]
 

Returns the pixmap associated with the given id.

Definition at line 291 of file brabosphere/source/iconsets.cpp.

QPixmap IconSets::getSplash  )  [static]
 

Returns the pixmap used for the splash screen.

It is not stored in the QMimeSourceFactory as it should load quickly on startup.

Definition at line 299 of file brabosphere/source/iconsets.cpp.

void IconSets::initialize  )  [static, private]
 

Initializes the static data of the class.

In practice it fills the default QMimeSourceFactory with data from the included qembed'ed files. QIconSet's are constructed from these data when requested. This allows the factory to be filed with different versions of an icon.

Definition at line 333 of file brabosphere/source/iconsets.cpp.

void IconSets::initPixmap unsigned char *  data,
const int  sizeX,
const int  sizeY,
const bool  alpha,
const FactoryID  id,
const QString  idString,
const IconSetID  iconID = LastIcon
[static, private]
 

Stores one pixmap in the default QMimeSourceFactory and sets up the retrieval array.

Definition at line 508 of file brabosphere/source/iconsets.cpp.

static QIconSet IconSets::getIconSet const IconSetID  id  )  [static]
 

static QString IconSets::factoryName const IconSetID  id  )  [static]
 

static void IconSets::initialize  )  [static, private]
 

static void IconSets::initPixmap unsigned char *  data,
const int  sizeX,
const int  sizeY,
const bool  alpha,
const FactoryID  id,
const QString  idString,
const IconSetID  iconID = LastIcon
[static, private]
 


Member Data Documentation

bool IconSets::isInitialized = false [static, private]
 

Holds the initialisation status of the class.

Definition at line 93 of file brabosphere/include/iconsets.h.

std::vector< QString > IconSets::factoryNames = std::vector<QString>(LastFactory) [static, private]
 

Holds the names of the pixmaps in the default QMimeSourceFactory.

Definition at line 94 of file brabosphere/include/iconsets.h.

std::vector< QString > IconSets::iconNames = std::vector<QString>(LastIcon) [static, private]
 

Holds the names of the normal versions of the icons in the default QMimeSourceFactory.

Definition at line 95 of file brabosphere/include/iconsets.h.

std::vector<QString> IconSets::factoryNames [static, private]
 

Definition at line 63 of file crdview/include/iconsets.h.

std::vector<QString> IconSets::iconNames [static, private]
 

Definition at line 64 of file crdview/include/iconsets.h.


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