summaryrefslogtreecommitdiffstats
path: root/src/interface.h
blob: 66bffc86ce7c1e6a91f7efa1e06bad8ed072bff4 (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
//
// C++ Interface: interface
//
// Description:
//
//
// Author: Hugo Parente Lima <hugo.pl@gmail.com>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef INTERFACE_H
#define INTERFACE_H

#include <tqstring.h>
#include "knetstatsview.h"
class KNetStats;

class Interface {
	TQString mName;
	KNetStatsView* mView;
	KNetStats* mParent;

	Interface(const Interface&);
public:
	/**
	*	Constructs a new interface.
	*	\param parent	parent of the view of this interface.
	*	\param name		name of this interface (not the TQObject name!!)
	*/
	Interface(KNetStats* parent, const TQString& name);

	/**
	*	Set this interface visible to the user via a KNetStatsView.
	*/
	void setVisible(bool visible);
	bool isVisible() { return mView; }

	void update();

	void say(const TQString& message);

	KNetStatsView::Options options();
};

#include <tqmap.h>
typedef TQMap<TQString, Interface*> InterfaceMap;


#endif