-
Notifications
You must be signed in to change notification settings - Fork 1
/
qeyes.h
43 lines (34 loc) · 798 Bytes
/
qeyes.h
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
#ifndef QEYES_H
#define QEYES_H
#include <QWidget>
#include <QProcess>
#include <QWindow>
#include <QVBoxLayout>
#include <QTimer>
#include <QPointer>
class QEyes : public QWidget
{
Q_OBJECT
public:
QEyes(QWidget *parent = 0);
~QEyes();
public:
virtual QSize sizeHint() const Q_DECL_OVERRIDE;
void setPreferSize(const QSize &preferSize);
private slots:
void startXeyesProcess();
void onXeyesProcessError(QProcess::ProcessError err);
void embedXeyesWindow();
private:
void initConnection();
bool xeyesCmdExists();
WId getXeyesWID();
void removeContainer();
private:
QVBoxLayout *m_mainVBoxLayout;
QProcess *m_xeyesProcess;
QPointer<QWidget> m_container;
QTimer *m_embedDelayTimer;
QSize m_preferSize;
};
#endif // QEYES_H