1
/****************************************************************************
2
** mainwin.h - the main window. holds contactlist and buttons.
3
** Copyright (C) 2001, 2002 Justin Karneges
5
** This program is free software; you can redistribute it and/or
6
** modify it under the terms of the GNU General Public License
7
** as published by the Free Software Foundation; either version 2
8
** of the License, or (at your option) any later version.
10
** This program is distributed in the hope that it will be useful,
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
** GNU General Public License for more details.
15
** You should have received a copy of the GNU General Public License
16
** along with this program; if not, write to the Free Software
17
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
19
****************************************************************************/
25
#include<qpushbutton.h>
26
#include<qtoolbutton.h>
27
#include<qpopupmenu.h>
30
#include<qptrvector.h>
33
#include"contactview.h"
38
class AboutDlg : public QDialog
42
AboutDlg(const QPixmap &icon, const QString &content, QWidget *par=0);
45
class MPushButton : public QPushButton
49
MPushButton(QWidget *parent=0, const char *name=0);
51
void setText(const QString &);
55
void drawButtonLabel(QPainter *);
62
class MToolButton : public QToolButton
66
MToolButton(QWidget *parent=0, const char *name=0);
69
void setPressed(bool);
73
class MLabel : public QLabel
77
MLabel(QWidget *parent=0, const char *name=0);
81
void mouseReleaseEvent(QMouseEvent *);
82
void mouseDoubleClickEvent(QMouseEvent *);
90
class MainWin : public QWidget
94
MainWin(bool onTop, QWidget *parent=0, const char *name=0);
97
void setAlwaysOnTop(bool);
98
void setUseDock(bool);
99
void setInfo(const QString &);
100
void setUsingSSL(bool);
102
QVBoxLayout *vb_main;
103
QHBoxLayout *hb_status;
109
QPushButton *pb_options;
110
MPushButton *pb_status;
112
int nextType, nextAmount;
118
QPopupMenu *statusMenu, *optionsMenu;
121
MToolButton *tb_offline, *tb_away, *tb_agents;
123
QPopupMenu *trayMenu;
128
void updateCaption();
129
void setToolBarIcons();
130
QString makeToolTip(const JabRosterEntry &e);
131
QPixmap makeTrayIcon(const QImage &);
140
void traySetAnim(Anim *_anim);
145
virtual void closeEvent(QCloseEvent *);
148
void statusChanged(int);
149
void changeProfile();
153
void doManageServices();
154
void doManageAccounts();
155
void doFileSharing();
158
void recvNextEvent();
161
void buildStatusMenu();
162
void activatedStatusMenu(int);
163
void buildOptionsMenu();
164
void activatedOptionsMenu(int);
165
void buildTrayMenu();
166
void trayClicked(const QPoint &, int);
167
void trayDoubleClicked();
169
void doRecvNextEvent();
170
void statusClicked(int);
173
void tryCloseProgram();
176
void decorateButton(int);
177
void localUpdate(const JabRosterEntry &);
178
void updateReadNext(int nextType, int amount);
180
void optionsUpdate();