BALL 1.5.0
Loading...
Searching...
No Matches
fileObserver.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_VIEW_WIDGETS_FILEOBSERVER_H
6#define BALL_VIEW_WIDGETS_FILEOBSERVER_H
7
8#ifndef BALL_VIEW_WIDGETS_DOCKWIDGET_H
10#endif
11
12#include <QtCore/QTimer>
13#include <QtCore/QDateTime>
14
15class QAction;
16
17namespace BALL
18{
19 namespace VIEW
20 {
35 : public DockWidget
36 {
37 Q_OBJECT
38
39 public:
40
42
43
44 FileObserver(QWidget *parent = 0, const char *name = 0);
45
47 virtual ~FileObserver();
48
49 //
50 virtual void initializeWidget(MainControl& main_control);
51
52 //
53 virtual void checkMenu(MainControl& main_control);
54
56 void setFileName(String filename);
57
59 String getFileName() const;
60
62 void setUpdateInterval(Size msec);
63
64 public Q_SLOTS:
65
67 void updateFile();
68
70 void start();
71
73 void stop();
74
76 void chooseFile();
77
78 protected:
79
80 QAction* start_action_, *stop_action_;
81
82 QTimer timer_;
83 String file_name_;
84 QDateTime last_vis_time_;
85 };
86
87} } // namespaces
88
89#endif // BALL_VIEW_WIDGETS_FILEOBSERVER_H
#define BALL_EMBEDDABLE(TYPE, BASE)
Definition embeddable.h:31
#define BALL_VIEW_EXPORT