summaryrefslogtreecommitdiffstats
path: root/clients/tde/src/app/views/instrumentview.h
blob: 36b9aad410662e7fbcdc8fea9a78757afee1f8a6 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//Author:    Timothy Pearson <kb9vqf@pearsoncomputing.net>, (C) 2012
//Copyright: See COPYING file that comes with this distribution

#ifndef INSTRUMENTVIEW_H
#define INSTRUMENTVIEW_H

#include <tdeconfig.h>
#include <tdeparts/part.h>
#include <tdemdichildview.h>

#include <tqtrla.h>

class TDEAction;

namespace RemoteLab {

typedef KParts::RemoteInstrumentPart InstrumentPart;

class InstrumentView : public KMdiChildView
{
	Q_OBJECT
	
	public:
		InstrumentView(const TQString &library, TQWidget *parentWidget=0L, const char *name=0L, WFlags f=0);
		InstrumentView(const TQString &library, const TQString &caption, TQWidget *parentWidget=0L, const char *name=0L, WFlags f=0);
		~InstrumentView();
		void connectServer(TQString server);
		void closeConnections();

		TQPtrList<TDEAction> menuActionList();
	
	protected:
		virtual void saveProperties(TDEConfig *);
		virtual void readProperties(TDEConfig *);
		virtual bool queryExit();
		virtual void resizeEvent(TQResizeEvent *);
		virtual bool eventFilter(TQObject *o, TQEvent *e);

	private slots:
		void setStatusMessage(const TQString& message);
		void setUsingFixedSize(bool fixed);
		void setChildSizeData();

	signals:
		void statusMessageSet(const TQString&);
	
	private:
		void init();
		KMdiMainFrm* m_mainForm;
		TQString m_libraryName;
		RemoteLab::InstrumentPart *m_instrumentPart;
		bool m_fixedSize;
		bool* m_canary;
};

} // namespace RemoteLab

#endif