1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
#ifndef QFITSTOOLBAR_H
#define QFITSTOOLBAR_H
#include <QPushButton>
#include <QComboBox>
#include <QLineEdit>
#include <QSpinBox>
#include <QToolButton>
#include <QString>
#include <QMenu>
#include <QMutex>
#include <QSlider>
#include <QActionGroup>
#include <QCheckBox>
#include <QLabel>
#include "QFitsGlobal.h"
class QFitsMainWindow;
class QFitsBaseBuffer;
class QFitsSingleBuffer;
class ActionComboBox; //declaration below
class QFitsToolBar : public QWidget {
Q_OBJECT
//----- Functions -----
public:
QFitsToolBar(QFitsMainWindow *parent);
~QFitsToolBar() {}
void updateValues();
void setZoomValue(double);
void setZoomTextCombo(double);
void showControls();
void enableControlsView1D(bool);
void enableControlsView2D(bool);
void enableControlsArithmetic(bool);
void setPaletteControls(QPalette&);
void updateImageMinMax(QFitsBaseBuffer*);
void updateSpecMinMaxY(QFitsBaseBuffer*);
QComboBox* getActualZoomCombo();
double getZoomTextCombo(FitZoom*);
protected:
virtual void resizeEvent(QResizeEvent *r);
private:
QFitsSingleBuffer *getMyBuffer();
void showControlsZoom(dpViewMode);
void showControlsOrientation(bool);
void showControlsScaling(bool);
void showControlsMovie(bool);
void showControlsArithmetics(bool);
void showControlsCube(bool);
void keyPressEvent( QKeyEvent*);
//----- Slots -----
public slots:
void incZoom();
void decZoom();
//#ifdef HAS_VTK
void incZoom_3Dwire();
void decZoom_3Dwire();
//#endif
private slots:
void comboZoomTriggered(const QString&);
void movieButtonToggled(bool);
void setImageLimitsManual();
void setSpecYLimitsManual();
void setImageLimitsScaleRange(int);
void incRotation();
void decRotation();
void flipped(bool);
void flopped(bool);
void setOrientation();
void setRotation(int);
void createArithPopupMenu(int arithmethics, QMenu *arithPopupMenu);
void createPlusPopupMenu();
void createMinusPopupMenu();
void createMulPopupMenu();
void createDivPopupMenu();
void createPowPopupMenu();
void createConvPopupMenu();
void doArithmetics(QAction*);
//----- Signals -----
signals:
void orientationChanged();
//#ifdef HAS_VTK
void updateZRange3D(double, double);
//#endif
//----- Members -----
public:
QSpinBox *cubeImageSlice;
QToolButton *movieButton;
QComboBox *comboZoom,
*comboZoom_3Dwire;
QSlider *alphaMultiplierSlider,
*limitSliderZ;
QCheckBox *drawSliceFramesCheckBox,
*limitZCheckBox;
QSpinBox *limitSpinboxZ;
private:
bool updateAll;
QToolButton *buttonOpen,
*buttonReload,
*buttonSave,
*buttonCopy,
*buttonPrint,
*buttonRotateCCW,
*buttonRotateCW,
*buttonFlip,
*buttonFlop,
*buttonZoomIn,
*buttonZoomOut,
*buttonZoomIn_3Dwire,
*buttonZoomOut_3Dwire,
*imredPlus,
*imredMinus,
*imredMul,
*imredDiv,
*imredPow,
*imredConv;
QComboBox *comboRotate,
*cubeMode,
*imageScaleRange;
ActionComboBox *imageScaleMethod;
QLineEdit *specPhysMinYValue,
*specPhysMaxYValue,
*imageMinValue,
*imageMaxValue;
QSlider *movieSlider;
QMenu *plusPopupMenu,
*minusPopupMenu,
*mulPopupMenu,
*divPopupMenu,
*powPopupMenu,
*convPopupMenu;
QLabel *alphaMultiplierLabel;
int requestedArithmetics;
};
class ActionComboBox : public QComboBox {
Q_OBJECT
//----- Functions -----
public:
ActionComboBox(QWidget *parent);
~ActionComboBox() {}
void setActions(QActionGroup *actions);
QActionGroup *comboActions;
//----- Slots -----
public slots:
void actionActivated(QAction *);
void itemTriggered(int);
//----- Signals -----
//----- Members -----
};
#endif /* QFITSTOOLBAR_H */
|