summaryrefslogtreecommitdiff
path: root/client/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/mainwindow.h')
-rw-r--r--client/mainwindow.h120
1 files changed, 4 insertions, 116 deletions
diff --git a/client/mainwindow.h b/client/mainwindow.h
index 627b431..acba62c 100644
--- a/client/mainwindow.h
+++ b/client/mainwindow.h
@@ -25,56 +25,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "config.h"
-#ifdef USE_GUI
-
-#ifndef __MAINWINDOW_H__
-#define __MAINWINDOW_H__
-
-#include <string>
-using namespace std;
+#ifndef __MIAV_MAINWINDOW_H__
+#define __MIAV_MAINWINDOW_H__
#include <QWidget>
-#include <QLabel>
-#include <QPushButton>
-#include <QStatusBar>
-#include <QTimer>
-#include <QPixmap>
-#include <QImage>
-
-#include "videowidget.h"
-#include "cprquerydialog.h"
-#include "historywidget.h"
-
-#define INCH_IN_CM 2.54f
-
-/**
- * First some GUI specs
- */
-//#define NUM_HISTORY 3 // moved to a genuine variable
-// Button sizes in cm (metric)
-#define BUTTON_WIDTH 7
-#define BUTTON_HEIGHT 2
-
-#define HISTORY_LIST_MARGIN 25
-#define HISTORY_LIST_SPACING 5
/**
- * Textstrings
- */
-#define TXT_ERROR_TITLE "Der er opstået en fejl!"
-#define TXT_READY "Klar..."
-#define TXT_CPRDLG_TITLE "CPRQueryDialog"
-#define TXT_ASK_SAVE_TITLE "Vil du gemme filmen?"
-#define TXT_ASK_SAVE "Vil du gemme filmen permanent?"
-#define TXT_STOP_RECORDING_TITLE "Stop optagelsen"
-#define TXT_STOP_RECORDING "Optagelsen skal standses, inden et nyt cpr nummer kan indtastes.\n\
-Optagelsen standses ved tryk på den røde cirkel med gul streg over."
-#define TXT_TIME "Tid:"
-#define TXT_QUEUELENGTH "Buffer størelse:"
-#define TXT_ASK_CLEAR_SCREEN_TITLE "Fjerne data fra skærmen?"
-#define TXT_ASK_CLEAR_SCREEN "Er du sikker på at du vil dataene fra skærmen (billeder, CPR nummer og navn)?"
-
-/**
* Images
*/
#define PIXMAP_MUTE PIXMAPS"/mute.png"
@@ -97,88 +53,20 @@ class MainWindow : public QWidget
{
Q_OBJECT
public:
- MainWindow(QWidget* parent = 0);
+ MainWindow();
~MainWindow();
- void message(char* msg);
-
public slots:
void cpr_clicked();
void clear_clicked();
void rec_clicked();
void shoot_clicked();
void freeze_clicked();
- void redraw_edge();
- void taskbar_update();
void about_clicked();
void mute_clicked();
private:
- unsigned int num_history;
-
- void clear();
- void createGui();
-
- // Image loading routines.
- QImage *loadButtonIcon( char *name, int height = BUTTON_HEIGHT );
- QImage *loadImage( char *name );
-
- QImage *img_unfreeze;
- QImage *img_freeze;
- QImage *img_snapshot;
- QImage *img_cpr;
- QImage *img_clear;
- QImage *img_record;
- QImage *img_stop;
- QImage *img_logo;
- QImage *img_mute;
- QImage *img_unmute;
- QImage *img_dummy;
-
- QLabel *lbl_version;
- QLabel *lbl_cpr;
- QLabel *lbl_name;
- QLabel *lbl_recordtime;
-
- QTimer *taskbartimer;
-
- // Used for the check_for_error_once_per_2_seconds (very ugly)
- QTimer *errtimer;
-
- float rec_edge_counter;
- QTimer *timer;
- QLabel *img_recedge;
- HistoryWidget **img_history;
-
- QPushButton *btn_logo;
- QPushButton *btn_clear;
- QPushButton *btn_cpr;
- QPushButton *btn_rec;
- QPushButton *btn_shoot;
- QPushButton *btn_freeze;
- QPushButton *btn_mute;
-
- QPushButton *btn_about;
-
- QStatusBar *status;
-
- VideoWidget *img_live;
-
- bool recording;
- bool frozen;
- bool muted;
-
- // Configuration values
- float unit;
- int video_width;
- int video_height;
-
- QPushButton *createButton(char *caption, int width = BUTTON_WIDTH, int height = BUTTON_HEIGHT);
- QPushButton *createButton(char *caption, QWidget *parent, int width = BUTTON_WIDTH, int height = BUTTON_HEIGHT);
- QLabel *createLabel(char *caption, int width, int height);
};
-#endif
-
-#endif /*USE_GUI*/
+#endif/*__MIAV_MAINWINDOW_H__*/