/[projects]/infoscreen/MainView.h
ViewVC logotype

Contents of /infoscreen/MainView.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 881 - (show annotations) (download)
Thu Jun 24 07:52:59 2010 UTC (13 years, 10 months ago) by torben
File MIME type: text/plain
File size: 1445 byte(s)
add another configurable for controlling XML read interval
1
2 #ifndef MAINVIEW_H
3 #define MAINVIEW_H
4
5 #include <QVector>
6 #include <QWidget>
7 #include "screenitem.h"
8 #include "screenxmlhandler.h"
9
10 class QStackedLayout;
11 class VideoView;
12 class MyWebView;
13 class ClientSideRender;
14 class PictureView;
15 class QSvgWidget;
16 class ScreenManager;
17 class QSettings;
18
19 enum Mode {
20 ModeNone,
21 ModeSimpleWeb,
22 ModeXml,
23 ModeLocal
24 };
25
26 class MainView : public QWidget
27 {
28
29 Q_OBJECT
30 public:
31 MainView(QWidget* parent);
32
33 public slots:
34 void onTimer();
35
36 protected:
37 virtual void keyPressEvent ( QKeyEvent * event );
38 virtual void closeEvent ( QCloseEvent * event );
39 private:
40 void loadSettings();
41 bool readXml();
42 void readLocalFiles();
43 void switchScreens();
44 void ensureVisible(QWidget* widget);
45 void errorInfoScreen(QString msg);
46
47 Mode currentMode;
48 bool enableScreenManager;
49
50 QStackedLayout* layout;
51
52 MyWebView* web;
53 ClientSideRender* render;
54 PictureView* picture;
55 VideoView* video;
56 QSvgWidget* svg;
57 QWidget* current;
58 ScreenManager* screenManager;
59 QTime screenManagerOn;
60 QTime screenManagerOff;
61 int xmlInterval;
62
63 QTimer* timer ;
64 QTime lastXml;
65 QTime lastScreenSwitch;
66 ScreenItem currentItem;
67 int currentItemIdx;
68 QVector<ScreenItem> screenItems;
69
70 ScreenXmlHandler xmlHandler;
71
72 QSettings* settings;
73 QString url;
74 QString screenid;
75 QString xmlUrl;
76 QString path;
77 };
78
79 #endif //MAINVIEW_H

  ViewVC Help
Powered by ViewVC 1.1.20