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
|
#ifndef _H_URLDLG
#define _H_URLDLG
//
// This file is part of the KVIrc irc client distribution
// Copyright (C) 1999-2000 Andrea Parrella (anandrea@iname.com)
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your opinion) any later version.
//
// This program is distributed in the HOPE that it will be USEFUL,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
#include <tqdialog.h>
#include <tqlayout.h>
#include "kvi_tal_listview.h"
#include <tqstring.h>
#include <tqpushbutton.h>
#include <tqfile.h>
#ifdef COMPILE_USE_QT4
#include <tq3textstream.h>
#else
#include <tqtextstream.h>
#endif
#include <tqcheckbox.h>
#include "kvi_tal_listbox.h"
#include <tqmenubar.h>
#include <tqinputdialog.h>
#include <tqtoolbutton.h>
#include <tqiconset.h>
#include "kvi_locale.h"
#include "kvi_config.h"
#include "kvi_irctoolbar.h"
#include "kvi_imagelib.h"
#include "kvi_window.h"
#include "kvi_tal_menubar.h"
#include "kvi_mextoolbar.h"
#include "kvi_styled_controls.h"
#include <tqpixmap.h>
typedef struct _KviUrl
{
TQString url;
TQString window;
int count;
TQString timestamp;
} KviUrl;
class UrlDialog : public KviWindow
{
TQ_OBJECT
public:
UrlDialog(KviPointerList<KviUrl> *g_pList);
~UrlDialog();
private:
KviTalMenuBar *m_pMenuBar;
KviTalPopupMenu *m_pListPopup; // dynamic popup menu
KviStr m_szUrl; // used to pass urls to sayToWin slot
protected:
TQPixmap *myIconPtr();
void resizeEvent(TQResizeEvent *);
public:
KviTalListView *m_pUrlList;
void addUrl(TQString url, TQString window, TQString count, TQString timestamp);
// void saveProperties();
protected slots:
void config();
void help();
void saveList();
void loadList();
void clear();
void close_slot();
void remove();
void findtext();
void dblclk_url(KviTalListViewItem *item);
void popup(KviTalListViewItem *item, const TQPoint &p, int col);
void sayToWin(int);
};
class BanFrame : public TQFrame
{
TQ_OBJECT
public:
BanFrame(TQWidget *parent=0, const char *name=0, bool banEnable = false);
~BanFrame();
void saveBans();
private:
KviStyledCheckBox *m_pEnable;
KviTalListBox *m_pBanList;
TQPushButton *m_pAddBtn;
TQPushButton *m_pRemoveBtn;
protected slots:
void enableClicked();
void addBan();
void removeBan();
};
#define cbnum 2
class ConfigDialog : public TQDialog
{
TQ_OBJECT
public:
ConfigDialog();
~ConfigDialog();
private:
KviStyledCheckBox *cb[cbnum];
BanFrame *m_pBanFrame;
void closeEvent(TQCloseEvent *);
protected slots:
void acceptbtn();
void discardbtn();
};
#include "kvi_kvs_action.h"
class KviUrlAction : public KviKvsAction
{
TQ_OBJECT
public:
KviUrlAction(TQObject * pParent);
~KviUrlAction();
protected:
TQPixmap * m_pBigIcon;
TQPixmap * m_pSmallIcon;
public:
virtual TQPixmap * bigIcon();
virtual TQPixmap * smallIcon();
};
#endif
|