Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Related Pages  

improvConfig.h

00001 /* improvConfig.h
00002  * Last modified: 
00003  * Authors: Leon Koch <leon@redfishsoftware.com.au>
00004  */
00011 #ifndef IMPROVCONFIG_H
00012 #define IMPROVCONFIG_H
00013 
00014 #ifdef HAVE_CONFIG_H
00015 #include <config.h>
00016 #endif
00017 
00018 #include <assert.h>
00019 #include <string.h>
00020 #include <stdlib.h>
00021 #include <dirent.h>
00022 #include <getopt.h>
00023 
00024 #include "imageSeq.h"
00025 
00026 #define MAXLINE 512
00027 
00028 #define CONFIG_FILENAME ".improvqt"
00029 #define DEFAULT_WINDOW_WIDTH     169
00030 #define DEFAULT_WINDOW_HEIGHT    134
00031 #define DEFAULT_NUMBER_WINDOWS   6
00032 #define MINIMUM_BUTTON_BAR_WIDTH 150
00033 
00034 class improvConfig
00035 {
00036         public:
00040                 typedef struct {
00042                         int id;
00044                         bool source;
00046                         int sourceId;
00048                         int position;
00050                         int row;
00052                         int col;
00053                 } widgetConfig;
00054 
00058                 typedef struct {
00060                         int row;
00062                         int col;
00064                         int posn;
00066                         int uniqueId;
00068                         float *params;
00070                         char *name;
00071                 } pluginInstance;
00072 
00074                 improvConfig();
00075 
00077                 ~improvConfig();
00078 
00083                 void load(int argc, char **argv);
00084         
00087                 void loadDefaults(void);
00088 
00092                 bool load(void);
00093 
00097                 bool load(char *filename);
00098                 
00102                 bool save(void);
00103 
00107                 bool saveAs(char *filename);
00108 
00110                 void clear(void);
00111                 
00113                 void clearLayout(void);
00114                         
00118                 void setSequencePath(char *sequencePath);
00119 
00123                 char *getSequencePath(void);
00124         
00128                 void addPluginPath(char *pluginPath);
00129 
00133                 int getNumPluginPaths(void);
00134 
00139                 char *getPluginPath(int num);
00140 
00143                 void clearPluginPaths(void);
00144         
00148                 void setWindowWidth(int width);
00149 
00153                 int getWindowWidth(void);
00154 
00158                 void setWindowHeight(int height);
00159 
00163                 int getWindowHeight(void);
00164 
00168                 void setNumSources(int number);
00169 
00173                 int getNumSources(void);
00174 
00178                 void setNumWindows(int number);
00179                           
00183                 int getNumWindows(void);
00184 
00187                 void setUseSequence(char *name);
00188 
00191                 char *getUseSequence(void);
00192 
00195                 void setCameraType(imageSeqType camera);
00196                 
00200                 imageSeqType getCameraType(void);
00201 
00206                 bool isModified(void);
00207 
00211                 void setModified(bool on);
00212 
00218                 widgetConfig *getWidgetConfig(int posn);
00219                 
00221                 widgetConfig *getWidgetConfig(bool source, int id);
00222 
00224                 int numWidgetConfigs(void);
00225 
00227                 pluginInstance *getPluginInstance(int posn);
00228                 
00230                 int numPluginInstances(void);
00231 
00233                 int getNumRows(void);
00234                 
00236                 int getNumCols(void);
00237 
00239                 bool verifyWidgetConfig(void);
00240                 
00242                 bool verifyWidgetConfig(widgetConfig **_widgets, int _numWidgets,       int _numWindows, int _numSources);
00243 
00245                 char *getDefaultFilename(void);
00246 
00247         private:
00249                 char *sequencePath;
00251                 int numPluginPaths;
00253                 char **pluginPaths;
00255                 char *useSequence;
00257                 int windowWidth;
00259                 int windowHeight;
00261                 int numSources;
00263                 int numWindows;
00265                 int numRows;
00267                 int numCols;
00269                 imageSeqType cameraType;
00271                 bool modified;
00273                 char *defaultFilename;
00275                 int numPlugins;
00277                 pluginInstance **plugins;
00279                 int numWidgets;
00281                 widgetConfig **widgets;
00282                 
00283 };
00284 
00285 #endif

Generated on Tue Apr 1 11:01:16 2003 for ImprovQT by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002