File: browser.h

package info (click to toggle)
kascade 1.0-beta10-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 964 kB
  • ctags: 815
  • sloc: cpp: 7,780; makefile: 39
file content (176 lines) | stat: -rw-r--r-- 4,033 bytes parent folder | download
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#include <qwidget.h>
#include <qtoolbar.h>
#include <qlabel.h>
#include <qevent.h>
#include <qscrollview.h>
#include <qpixmap.h>
#include <qlayout.h>
#include <qpoint.h>
#include <qpopupmenu.h>
#include <qtoolbutton.h>
#include <qpushbutton.h> 
#include <qmainwindow.h> 

class Category;
class ChatBox;
class Separator;
class SourceBox;
class Keyboard;
class Bookmarks;
class MailingLists;
class OwnerButton;
class Currents;

#include <vector>
#include <string>
using namespace std;

class Browser : public QMainWindow {
	Q_OBJECT

public: 
	Browser();

	void showNewCategory();
	void buildToolbar();
	void renewToolbar();
	void setTitleLabelColors();
	void setBackgroundColor();
	void setCatLabelColors();
	void checkScrollHeight();
	void buildBookmarkMenu();

	int update( int );

	int action_openfile();
	int action_openurl();
	int action_backtrace();
	int action_forwardtrace();
	void action_showlinks();
	void action_showinfo();
	void action_shownews();
	void action_chat();

	void timedMessage( string, int );

	ChatBox *chatBox; 
	QToolBar *toolBar;
	QPopupMenu *mainmenu, *editmenu;
	int editmenuid, bmmenuid; 
	SourceBox *sourceBox, *debugWindow;
	vector<QLabel *> allLabelv;

	Separator *maskSep, *genSep;

	QScrollView *scrollView;

	Category *extcat;

	int keyboardaction;
	int disabled;

	QToolButton *TBlinks, *TBback, *TBchat, *TBroot, *TBinfo, *TBstop, *TBmark,
	 	    *TBtomark, *TBforward, *TBnews, *TBdiscuss, *TBbookmarks, *TBbase;

public slots:
	void enterCategory( Category * );
	void aboutQt();
	void about();
	void aboutKDE();
	void aboutAapje();
	void uhm_oops();
	void openFile();
	void openURL();

	void showPreferences();
	void showBookmarks();
	void showMailingLists();

	void backPressed();
	void rootPressed();
	void chatPressed();
	void linksPressed();
	void infoPressed();
	void newsPressed();
	void mlistPressed();
	void markPressed();
	void tomarkPressed();
	void faqPressed();
	void basePressed();
	void discussPressed();
	void forwardPressed();
	void stopPressed();
	void viewPageSource();
	void sendEmail();
	void gotoHomepage();
	void clearCachePressed();
	void debugWindowPressed();
	void addBookmark();
	void bookmarkSelected( int );

	void choseChannel( string );
	void choseLink( string );
	void choseMlist( string, string );
	void choseFaq( string );
	void choseDiscuss( string );
	void choseBase( string );

	void showRightMenu( int, int );
	void showRightMenuExtension( int, int, Category * );

	void extensionOpen();
	void extensionOpenWith();
	void copyLinkLocation();

	void setReady();

signals:
	void stopSignal();

protected: 
	void initDialog();
	void resizeEvent( QResizeEvent * );
	void keyPressEvent( QKeyEvent * );

private: 
	void addCatLabel( vector<QLabel *> &, Category * );
	int resizeCatLabels( vector<QLabel *> &, int ); 
	void createVectors( vector<string> * );
	void addToolButton( QToolButton *&, string, string, const char * ); 
	void tryToSelect( vector<string> *, string, string );
	void enableDisable( int );

	QPixmap folder;
	QVBoxLayout *grid;

	QPopupMenu *catmenu, *ownermenu, *bmmenu, *rightmenu, *mediamenu, *movemenu;

	OwnerButton *Bowner;

	QLabel *titleLabel;
	QPushButton *mailButton;

	QWidget *scrollWidget;
	
	vector<QLabel *> catLabelv, maskLabelv, genLabelv;

	vector<QToolButton *> toolButtonv; 

	Keyboard *keyboard;
	Bookmarks *bookmarks;
	MailingLists *mailinglists;

	vector<string> namev, memoryv, descv; 

	string markaddress;
	Currents *markcurrents;

	int catinfoid, catnewsid, catchatid, catlinksid, catbaseid, catdiscussid, 
	    catfaqid, catmlistid;
	int rightinfoid, rightnewsid, rightchatid, rightlinksid, rightbaseid, 
	    rightdiscussid, rightfaqid, rightmlistid, rightopenid, rightopenwid, 
	    rightcopyid;
	int movebackid, movefwdid, movetomarkid, moverootid, movemarkid, movestopid;
	int editsourceid, editclearid, editdebugid;
	int bmaddid;
};