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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
#ifndef PLINE_H
#define PLINE_H
#include <tqframe.h>
#include <tqscrollbar.h>
#include <tqlineedit.h>
#include <tqlabel.h>
#include <tqptrlist.h>
#include <tqlayout.h>
#include "types.h"
class TQPushButton;
/** Internal class : display a "player line" in netmeeting. */
class MeetingLine : public TQFrame
{
Q_OBJECT
TQ_OBJECT
public:
MeetingLine(bool isOwner, bool readerIsServer, bool serverLine,
TQWidget *tqparent, const char *name = 0);
MeetingCheckBox::Type type() const { return tcb->type(); }
void setType(MeetingCheckBox::Type type) { tcb->setType(type); }
void setText(const TQString &text) { qle->setText(text); }
void setData(const ExtData &ed);
void data(ExtData &ed) const;
TQString text() const { return qle->text(); }
signals:
void typeChanged(MeetingCheckBox::Type);
void textChanged(const TQString &);
private slots:
void _typeChanged(int t)
{ emit typeChanged((MeetingCheckBox::Type)t); }
void _textChanged(const TQString &text) { emit textChanged(text); }
protected:
TQHBoxLayout *hbl;
private:
MeetingCheckBox *tcb;
TQLabel *lname, *labH, *labAI;
TQValueList<BoardData> bds;
TQLineEdit *qle;
};
class PlayerLine : public TQFrame
{
Q_OBJECT
TQ_OBJECT
public:
PlayerLine(PlayerComboBox::Type type, const TQString &txt,
bool humanSetting, bool AISetting,
bool canBeEmpty, bool acceptAI,
TQWidget *tqparent = 0, const char *name = 0);
PlayerComboBox::Type type() const { return pcb->type(); }
TQString name() const { return edit->text(); }
signals:
void setHuman();
void setAI();
void typeChanged(int);
private slots:
void setSlot();
void typeChangedSlot(int);
private:
PlayerComboBox *pcb;
TQLineEdit *edit;
TQPushButton *setting;
bool hs, as;
};
/** Internal class : scrolable list of widgets. */
class GWidgetList : public TQWidget
{
Q_OBJECT
TQ_OBJECT
public:
GWidgetList(uint interval, TQWidget *tqparent = 0, const char * name = 0);
void remove(uint i);
uint size() const { return widgets.count(); }
protected:
/** The widget must be created with this widget as tqparent. */
void append(TQWidget *);
TQWidget *widget(uint i) { return widgets.at(i); }
private:
TQPtrList<TQWidget> widgets;
TQVBoxLayout vbl;
};
template <class Type>
class WidgetList : public GWidgetList
{
public:
WidgetList(uint interval, TQWidget *tqparent=0, const char *name=0)
: GWidgetList(interval, tqparent, name) {}
void append(Type *w) { GWidgetList::append(w); }
Type *widget(uint i) { return (Type *)GWidgetList::widget(i); }
};
#endif // PLINE_H
|