mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02:00
102 lines
2.4 KiB
C++
Executable File
102 lines
2.4 KiB
C++
Executable File
#pragma once
|
|
|
|
#include "ui_form_detectormain.h"
|
|
|
|
#include "qDefs.h"
|
|
class qDrawPlot;
|
|
class qTabMeasurement;
|
|
class qTabDataOutput;
|
|
class qTabPlot;
|
|
class qTabAdvanced;
|
|
class qTabSettings;
|
|
class qTabDebugging;
|
|
class qTabDeveloper;
|
|
class qTabMessages;
|
|
class qServer;
|
|
|
|
class multiSlsDetector;
|
|
|
|
#include <QTabWidget>
|
|
class QResizeEvent;
|
|
|
|
/** To Over-ride the QTabWidget class to get the tabBar */
|
|
class MyTabWidget : public QTabWidget {
|
|
public:
|
|
MyTabWidget(QWidget *parent = 0) { setParent(parent); }
|
|
/** Overridden method from QTabWidget */
|
|
QTabBar *tabBar() { return QTabWidget::tabBar(); }
|
|
};
|
|
|
|
class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
qDetectorMain(int argc, char **argv, QApplication *app,
|
|
QWidget *parent = 0);
|
|
~qDetectorMain();
|
|
|
|
/**
|
|
* Starts or stops Acquisition From gui client
|
|
* @param start 1 for start and 0 to stop
|
|
* @returns success or fail
|
|
*/
|
|
int StartStopAcquisitionFromClient(bool start);
|
|
bool isPlotRunning();
|
|
int GetProgress();
|
|
|
|
private slots:
|
|
void EnableModes(QAction *action);
|
|
void ExecuteUtilities(QAction *action);
|
|
void ExecuteHelp(QAction *action);
|
|
void Refresh(int index);
|
|
|
|
/**
|
|
* Resizes the main window if the plot is docked/undocked
|
|
* @param b bool TRUE if undocked(outside main window), FALSE docked
|
|
*/
|
|
void ResizeMainWindow(bool b);
|
|
void EnableTabs();
|
|
void SetZoomToolTip(bool disable);
|
|
void UncheckServer();
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
private:
|
|
void SetUpWidgetWindow();
|
|
void SetUpDetector(const std::string fName, int multiID);
|
|
void Initialization();
|
|
void LoadConfigFile(const std::string fName);
|
|
|
|
/** enumeration of the tabs */
|
|
enum {
|
|
MEASUREMENT,
|
|
SETTINGS,
|
|
DATAOUTPUT,
|
|
PLOT,
|
|
ADVANCED,
|
|
DEBUGGING,
|
|
DEVELOPER,
|
|
MESSAGES,
|
|
NumberOfTabs
|
|
};
|
|
slsDetectorDefs::detectorType detType;
|
|
multiSlsDetector* myDet;
|
|
qDrawPlot* myPlot;
|
|
MyTabWidget* tabs;
|
|
qTabMeasurement* tabMeasurement;
|
|
qTabDataOutput* tabDataOutput;
|
|
qTabPlot* tabPlot;
|
|
qTabSettings* tabSettings;
|
|
qTabAdvanced* tabAdvanced;
|
|
qTabDebugging* tabDebugging;
|
|
qTabDeveloper* tabDeveloper;
|
|
qTabMessages* tabMessages;
|
|
qServer* myServer;
|
|
int isDeveloper;
|
|
int heightPlotWindow;
|
|
int heightCentralWidget;
|
|
QString zoomToolTip;
|
|
QColor defaultTabColor;
|
|
};
|