blob: 0452879e3fdf7c72853959d5fb429aad8f3078f0 (
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
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
|
/****************************************************************************
**
** Definition of something or other
**
** Created : 979899
**
** Copyright (C) 1997-2008 Trolltech ASA. All rights reserved.
**
** This file is part of an example program for TQt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
#ifndef WIDGETS_H
#define WIDGETS_H
#include <tqmainwindow.h>
#include <ntqmovie.h>
#include <ntqlistview.h>
class TQLabel;
class TQCheckBox;
class TQProgressBar;
class TQTabWidget;
class TQGroupBox;
class TQMultiLineEdit;
class TQPopupMenu;
class MyListView : public TQListView
{
TQ_OBJECT
public:
MyListView( TQWidget * parent = 0, const char *name = 0 )
: TQListView( parent, name ), selected(0)
{}
~MyListView()
{}
protected:
void contentsMousePressEvent( TQMouseEvent * e )
{
selected = selectedItem();
TQListView::contentsMousePressEvent( e );
}
void contentsMouseReleaseEvent( TQMouseEvent * e )
{
TQListView::contentsMouseReleaseEvent( e );
if ( selectedItem() != selected ) {
emit mySelectionChanged( selectedItem() );
emit mySelectionChanged();
}
}
signals:
void mySelectionChanged();
void mySelectionChanged( TQListViewItem* );
private:
TQListViewItem* selected;
};
//
// WidgetView contains lots of TQt widgets.
//
class WidgetView : public TQMainWindow
{
TQ_OBJECT
public:
WidgetView( TQWidget *parent=0, const char *name=0 );
public slots:
void setStatus(const TQString&);
void selectionChanged();
void selectionChanged( TQListViewItem* );
void clicked( TQListViewItem* );
void mySelectionChanged( TQListViewItem* );
protected slots:
virtual void button1Clicked();
private slots:
void checkBoxClicked( int );
void radioButtonClicked( int );
void sliderValueChanged( int );
void listBoxItemSelected( int );
void comboBoxItemActivated( int );
void edComboBoxItemActivated( const TQString& );
void lineEditTextChanged( const TQString& );
void movieStatus( int );
void movieUpdate( const TQRect& );
void spinBoxValueChanged( const TQString& );
void popupSelected( int );
void open();
void dummy();
void showProperties();
private:
bool eventFilter( TQObject *, TQEvent * );
TQLabel *msg;
TQCheckBox *cb[3];
TQGroupBox* bg;
TQLabel *movielabel;
TQMovie movie;
TQWidget *central;
TQProgressBar *prog;
int progress;
TQTabWidget* tabs;
TQMultiLineEdit* edit;
TQPopupMenu *textStylePopup;
int plainStyleID;
TQWidget* bla;
};
#endif
|