00001
00002
00003
00004
00005
00006
00007 #ifndef SEQWIDGET_H
00008 #define SEQWIDGET_H
00009
00010 #ifdef HAVE_CONFIG_H
00011 #include <config.h>
00012 #endif
00013
00014
00015 #include <qwidget.h>
00016 #include <qpixmap.h>
00017 #include <qlistbox.h>
00018 #include <qpushbutton.h>
00019 #include <qimage.h>
00020 #include <qvbox.h>
00021 #include <qlayout.h>
00022 #include <qwhatsthis.h>
00023 #include <qapplication.h>
00024
00025 #include "FW/labImage.h"
00026 #include "PixWidget.h"
00027
00031 class PluginItem : public QListBoxText
00032 {
00033 public:
00035 PluginItem(const QString& text, int menuId, int bufferId,
00036 int numParams = 0, QStringList *paramNames = 0);
00038 ~PluginItem();
00039
00041 int getMenuId(void);
00043 int getBufferId(void);
00045 int getNumParams(void);
00047 float* getParams(void);
00049 void setParams(float *params);
00051 QStringList* getParamNames(void);
00053
00054
00055 private:
00057 int menuId;
00059 int bufferId;
00061 unsigned int numParams;
00063 float* params;
00065 QStringList* paramNames;
00066
00067 };
00068
00075 class SeqWidget : public QWidget
00076 {
00077 Q_OBJECT
00078
00079 public:
00081 SeqWidget( QWidget *parent, const char *name, int id, int sourceId, int position);
00083 ~SeqWidget();
00084
00086 void copyPicture(Picture *pic);
00088 void tick();
00090 Picture* getCurrent(void);
00091
00093 void setActive(bool value);
00095 bool isActive(void);
00097 int getId(void);
00098
00100 int getPosition(void);
00102 void setPosition(int value);
00104 int getSourceId(void);
00106 void setSourceId(int value);
00107
00109 void redraw(void);
00111 void reload(void);
00112
00114 void disablePopUp(void);
00116 void setPopUpMenu(QPopupMenu* menu);
00117
00119 void clearSelection(void);
00120
00125 int numPluginItems(void);
00127 PluginItem *getPluginItem(int posn);
00133 PluginItem **getPluginItems(void);
00134
00140 bool addFunction(int menuId);
00146 bool addFunction(int uniqueId, char *functionName);
00147
00148 private:
00150 int id;
00152 int sourceId;
00154 int position;
00156 bool active;
00158 PixWidget *pixWidget;
00160 QHBox *hbox;
00162 QBoxLayout *layout;
00164 QPushButton *popupButton;
00166 QPushButton *rmButton;
00168 QPushButton *upButton;
00170 QPushButton *downButton;
00172 QPushButton *zoomButton;
00174 QListBox *chainListBox;
00176 Picture *picture;
00178 QPixmap *zoomPixmap;
00179
00180 private slots:
00182 void popupPressed();
00184 void rmPressed();
00186 void upPressed();
00188 void downPressed();
00190 void itemHighlighted(QListBoxItem* item);
00192 void zoomToggled(bool on);
00193
00194 };
00195
00196 #endif
00197