summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-08 23:25:46 (UTC)
committer harlekin <harlekin>2003-12-08 23:25:46 (UTC)
commite372949ac776a7d986cac91b2ff1a5022040d43b (patch) (unidiff)
tree4c37d554d55501e1be587828651d90722a18f681
parent92d67d6f0e34cdee111c94d2b0304768dfdea2f9 (diff)
downloadopie-e372949ac776a7d986cac91b2ff1a5022040d43b.zip
opie-e372949ac776a7d986cac91b2ff1a5022040d43b.tar.gz
opie-e372949ac776a7d986cac91b2ff1a5022040d43b.tar.bz2
remove not used includes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircchannellist.cpp1
-rw-r--r--noncore/net/opieirc/ircchanneltab.cpp2
-rw-r--r--noncore/net/opieirc/ircmisc.cpp1
-rw-r--r--noncore/net/opieirc/ircservertab.cpp1
-rw-r--r--noncore/net/opieirc/ircsettings.cpp3
-rw-r--r--noncore/net/opieirc/irctab.cpp1
-rw-r--r--noncore/net/opieirc/main.cpp1
-rw-r--r--noncore/net/opieirc/mainwindow.cpp2
8 files changed, 0 insertions, 12 deletions
diff --git a/noncore/net/opieirc/ircchannellist.cpp b/noncore/net/opieirc/ircchannellist.cpp
index 566b223..4e13dee 100644
--- a/noncore/net/opieirc/ircchannellist.cpp
+++ b/noncore/net/opieirc/ircchannellist.cpp
@@ -1,26 +1,25 @@
1#include <qpe/resource.h> 1#include <qpe/resource.h>
2#include <qpixmap.h>
3#include "ircchannellist.h" 2#include "ircchannellist.h"
4 3
5IRCChannelList::IRCChannelList(IRCChannel *channel, QWidget *parent, const char *name, WFlags f) : QListBox(parent, name, f) { 4IRCChannelList::IRCChannelList(IRCChannel *channel, QWidget *parent, const char *name, WFlags f) : QListBox(parent, name, f) {
6 m_channel = channel; 5 m_channel = channel;
7} 6}
8 7
9void IRCChannelList::update() { 8void IRCChannelList::update() {
10 QPixmap op = Resource::loadPixmap("opieirc/op"); 9 QPixmap op = Resource::loadPixmap("opieirc/op");
11 QPixmap hop = Resource::loadPixmap("opieirc/hop"); 10 QPixmap hop = Resource::loadPixmap("opieirc/hop");
12 QPixmap voice = Resource::loadPixmap("opieirc/voice"); 11 QPixmap voice = Resource::loadPixmap("opieirc/voice");
13 QListIterator<IRCChannelPerson> it = m_channel->people(); 12 QListIterator<IRCChannelPerson> it = m_channel->people();
14 clear(); 13 clear();
15 for (; it.current(); ++it) { 14 for (; it.current(); ++it) {
16 IRCChannelPerson *person = it.current(); 15 IRCChannelPerson *person = it.current();
17 if (person->flags & PERSON_FLAG_OP) { 16 if (person->flags & PERSON_FLAG_OP) {
18 insertItem(op, person->person->nick()); 17 insertItem(op, person->person->nick());
19 } else if (person->flags & PERSON_FLAG_HALFOP) { 18 } else if (person->flags & PERSON_FLAG_HALFOP) {
20 insertItem(op, person->person->nick()); 19 insertItem(op, person->person->nick());
21 } else if (person->flags & PERSON_FLAG_VOICE) { 20 } else if (person->flags & PERSON_FLAG_VOICE) {
22 insertItem(voice, person->person->nick()); 21 insertItem(voice, person->person->nick());
23 } else { 22 } else {
24 insertItem(person->person->nick()); 23 insertItem(person->person->nick());
25 } 24 }
26 } 25 }
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp
index 2b8b65e..b0771f6 100644
--- a/noncore/net/opieirc/ircchanneltab.cpp
+++ b/noncore/net/opieirc/ircchanneltab.cpp
@@ -1,27 +1,25 @@
1#include <qpe/qpeapplication.h>
2#include <qpe/resource.h> 1#include <qpe/resource.h>
3#include <qcursor.h>
4#include <qwhatsthis.h> 2#include <qwhatsthis.h>
5#include <qhbox.h> 3#include <qhbox.h>
6#include "ircchanneltab.h" 4#include "ircchanneltab.h"
7#include "ircservertab.h" 5#include "ircservertab.h"
8 6
9IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { 7IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) {
10 m_mainWindow = mainWindow; 8 m_mainWindow = mainWindow;
11 m_parentTab = parentTab; 9 m_parentTab = parentTab;
12 m_channel = channel; 10 m_channel = channel;
13 m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); 11 m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>");
14 QHBox *hbox = new QHBox(this); 12 QHBox *hbox = new QHBox(this);
15 m_textview = new QTextView(hbox); 13 m_textview = new QTextView(hbox);
16 m_textview->setHScrollBarMode(QScrollView::AlwaysOff); 14 m_textview->setHScrollBarMode(QScrollView::AlwaysOff);
17 m_textview->setVScrollBarMode(QScrollView::AlwaysOn); 15 m_textview->setVScrollBarMode(QScrollView::AlwaysOn);
18 m_listVisible = TRUE; 16 m_listVisible = TRUE;
19 m_listButton = new QPushButton(">", m_textview); 17 m_listButton = new QPushButton(">", m_textview);
20 m_textview->setCornerWidget(m_listButton); 18 m_textview->setCornerWidget(m_listButton);
21 m_textview->setTextFormat(RichText); 19 m_textview->setTextFormat(RichText);
22 QWhatsThis::add(m_textview, tr("Channel discussion")); 20 QWhatsThis::add(m_textview, tr("Channel discussion"));
23 connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); 21 connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList()));
24 m_list = new IRCChannelList(m_channel, hbox); 22 m_list = new IRCChannelList(m_channel, hbox);
25 m_list->update(); 23 m_list->update();
26 m_list->setMaximumWidth(LISTWIDTH); 24 m_list->setMaximumWidth(LISTWIDTH);
27 m_field = new IRCHistoryLineEdit(this); 25 m_field = new IRCHistoryLineEdit(this);
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp
index a15a790..22387b3 100644
--- a/noncore/net/opieirc/ircmisc.cpp
+++ b/noncore/net/opieirc/ircmisc.cpp
@@ -1,25 +1,24 @@
1#include <qlayout.h>
2#include <stdio.h> 1#include <stdio.h>
3#include "ircmisc.h" 2#include "ircmisc.h"
4 3
5IRCTabBar::IRCTabBar(QWidget *parent, const char *name) : QTabBar(parent, name) { 4IRCTabBar::IRCTabBar(QWidget *parent, const char *name) : QTabBar(parent, name) {
6} 5}
7 6
8int IRCTabBar::insertTab(QTab *tab, int index) { 7int IRCTabBar::insertTab(QTab *tab, int index) {
9 /* FIXME: find some nicer way to do this */ 8 /* FIXME: find some nicer way to do this */
10 QExtTab *ext = new QExtTab(); 9 QExtTab *ext = new QExtTab();
11 ext->color = black; 10 ext->color = black;
12 ext->label = tab->text(); 11 ext->label = tab->text();
13 ext->r = tab->rect(); 12 ext->r = tab->rect();
14 ext->enabled = tab->isEnabled(); 13 ext->enabled = tab->isEnabled();
15 ext->iconset = tab->iconSet(); 14 ext->iconset = tab->iconSet();
16 delete tab; 15 delete tab;
17 return QTabBar::insertTab(ext, index); 16 return QTabBar::insertTab(ext, index);
18} 17}
19 18
20void IRCTabBar::setTabColor(int index, QColor color) { 19void IRCTabBar::setTabColor(int index, QColor color) {
21 ((QExtTab *)tab(index))->color = color; 20 ((QExtTab *)tab(index))->color = color;
22 update(); 21 update();
23} 22}
24 23
25void IRCTabBar::paintLabel(QPainter* p, const QRect& br, QTab* t, bool focus) const { 24void IRCTabBar::paintLabel(QPainter* p, const QRect& br, QTab* t, bool focus) const {
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp
index 2c28507..d1aab40 100644
--- a/noncore/net/opieirc/ircservertab.cpp
+++ b/noncore/net/opieirc/ircservertab.cpp
@@ -1,25 +1,24 @@
1#include <qpe/config.h>
2#include <qtextstream.h> 1#include <qtextstream.h>
3#include <qwhatsthis.h> 2#include <qwhatsthis.h>
4#include "ircservertab.h" 3#include "ircservertab.h"
5 4
6IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { 5IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) {
7 m_server = server; 6 m_server = server;
8 m_session = new IRCSession(&m_server); 7 m_session = new IRCSession(&m_server);
9 m_mainWindow = mainWindow; 8 m_mainWindow = mainWindow;
10 m_close = FALSE; 9 m_close = FALSE;
11 m_lines = 0; 10 m_lines = 0;
12 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); 11 m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>");
13 m_textview = new QTextView(this); 12 m_textview = new QTextView(this);
14 m_textview->setHScrollBarMode(QScrollView::AlwaysOff); 13 m_textview->setHScrollBarMode(QScrollView::AlwaysOff);
15 m_textview->setVScrollBarMode(QScrollView::AlwaysOn); 14 m_textview->setVScrollBarMode(QScrollView::AlwaysOn);
16 m_textview->setTextFormat(RichText); 15 m_textview->setTextFormat(RichText);
17 QWhatsThis::add(m_textview, tr("Server messages")); 16 QWhatsThis::add(m_textview, tr("Server messages"));
18 m_layout->add(m_textview); 17 m_layout->add(m_textview);
19 m_field = new IRCHistoryLineEdit(this); 18 m_field = new IRCHistoryLineEdit(this);
20 QWhatsThis::add(m_field, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); 19 QWhatsThis::add(m_field, tr("Type commands here. A list of available commands can be found inside the OpieIRC help"));
21 m_layout->add(m_field); 20 m_layout->add(m_field);
22 connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); 21 connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand()));
23 m_field->setFocus(); 22 m_field->setFocus();
24 connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); 23 connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput)));
25 connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); 24 connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling()));
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index 70d5445..2862296 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -1,33 +1,30 @@
1#include <opie/ocolorbutton.h> 1#include <opie/ocolorbutton.h>
2#include <opie/otabwidget.h> 2#include <opie/otabwidget.h>
3#include <qlayout.h>
4#include <qvalidator.h> 3#include <qvalidator.h>
5#include <qscrollview.h>
6#include <qwhatsthis.h> 4#include <qwhatsthis.h>
7#include "ircsettings.h" 5#include "ircsettings.h"
8#include "irctab.h" 6#include "irctab.h"
9#include "ircmisc.h"
10 7
11IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) { 8IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
12 setCaption(tr("Settings") ); 9 setCaption(tr("Settings") );
13 m_config = new Config("OpieIRC"); 10 m_config = new Config("OpieIRC");
14 m_config->setGroup("OpieIRC"); 11 m_config->setGroup("OpieIRC");
15 QHBoxLayout *l = new QHBoxLayout(this, 2, 2); 12 QHBoxLayout *l = new QHBoxLayout(this, 2, 2);
16 OTabWidget *tw = new OTabWidget(this); 13 OTabWidget *tw = new OTabWidget(this);
17 l->addWidget(tw); 14 l->addWidget(tw);
18 /* General Configuration */ 15 /* General Configuration */
19 QWidget *genwidget = new QWidget(tw); 16 QWidget *genwidget = new QWidget(tw);
20 QGridLayout *layout = new QGridLayout(genwidget, 1, 2, 5, 0); 17 QGridLayout *layout = new QGridLayout(genwidget, 1, 2, 5, 0);
21 QLabel *label = new QLabel(tr("Lines displayed :"), genwidget); 18 QLabel *label = new QLabel(tr("Lines displayed :"), genwidget);
22 layout->addWidget(label, 0, 0); 19 layout->addWidget(label, 0, 0);
23 m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), genwidget); 20 m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), genwidget);
24 QWhatsThis::add(m_lines, tr("Amount of lines to be displayed in chats before old lines get deleted - this is necessary to restrain memory consumption. Set to 0 if you don't need this")); 21 QWhatsThis::add(m_lines, tr("Amount of lines to be displayed in chats before old lines get deleted - this is necessary to restrain memory consumption. Set to 0 if you don't need this"));
25 QIntValidator *validator = new QIntValidator(this); 22 QIntValidator *validator = new QIntValidator(this);
26 validator->setTop(10000); 23 validator->setTop(10000);
27 validator->setBottom(0); 24 validator->setBottom(0);
28 m_lines->setValidator(validator); 25 m_lines->setValidator(validator);
29 layout->addWidget(m_lines, 0, 1); 26 layout->addWidget(m_lines, 0, 1);
30 tw->addTab(genwidget, "opieirc/settings", tr("General")); 27 tw->addTab(genwidget, "opieirc/settings", tr("General"));
31 28
32 /* Color configuration */ 29 /* Color configuration */
33 QScrollView *view = new QScrollView(this); 30 QScrollView *view = new QScrollView(this);
diff --git a/noncore/net/opieirc/irctab.cpp b/noncore/net/opieirc/irctab.cpp
index 8a869d6..3351c3b 100644
--- a/noncore/net/opieirc/irctab.cpp
+++ b/noncore/net/opieirc/irctab.cpp
@@ -1,26 +1,25 @@
1#include <qpe/resource.h> 1#include <qpe/resource.h>
2#include <qpixmap.h>
3#include <qpushbutton.h> 2#include <qpushbutton.h>
4#include <qwhatsthis.h> 3#include <qwhatsthis.h>
5#include "irctab.h" 4#include "irctab.h"
6 5
7QString IRCTab::m_errorColor; 6QString IRCTab::m_errorColor;
8QString IRCTab::m_serverColor; 7QString IRCTab::m_serverColor;
9QString IRCTab::m_textColor; 8QString IRCTab::m_textColor;
10QString IRCTab::m_backgroundColor; 9QString IRCTab::m_backgroundColor;
11QString IRCTab::m_selfColor; 10QString IRCTab::m_selfColor;
12QString IRCTab::m_otherColor; 11QString IRCTab::m_otherColor;
13QString IRCTab::m_notificationColor; 12QString IRCTab::m_notificationColor;
14int IRCTab::m_maxLines; 13int IRCTab::m_maxLines;
15 14
16IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { 15IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) {
17 m_layout = new QVBoxLayout(this); 16 m_layout = new QVBoxLayout(this);
18 QHBoxLayout *descLayout = new QHBoxLayout(m_layout); 17 QHBoxLayout *descLayout = new QHBoxLayout(m_layout);
19 descLayout->setMargin(5); 18 descLayout->setMargin(5);
20 m_description = new QLabel(tr("Missing description"), this); 19 m_description = new QLabel(tr("Missing description"), this);
21 QWhatsThis::add(m_description, tr("Description of the tab's content")); 20 QWhatsThis::add(m_description, tr("Description of the tab's content"));
22 descLayout->addWidget(m_description); 21 descLayout->addWidget(m_description);
23 descLayout->setStretchFactor(m_description, 5); 22 descLayout->setStretchFactor(m_description, 5);
24 QPushButton *close = new QPushButton(this); 23 QPushButton *close = new QPushButton(this);
25 QWhatsThis::add(close, tr("Close this tab")); 24 QWhatsThis::add(close, tr("Close this tab"));
26 close->setPixmap(Resource::loadPixmap("close")); 25 close->setPixmap(Resource::loadPixmap("close"));
diff --git a/noncore/net/opieirc/main.cpp b/noncore/net/opieirc/main.cpp
index 39acfcc..da38024 100644
--- a/noncore/net/opieirc/main.cpp
+++ b/noncore/net/opieirc/main.cpp
@@ -1,7 +1,6 @@
1#include <qpe/qpeapplication.h>
2#include "mainwindow.h" 1#include "mainwindow.h"
3 2
4#include <opie/oapplicationfactory.h> 3#include <opie/oapplicationfactory.h>
5 4
6 5
7OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) 6OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index be6f8ed..7414154 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -1,28 +1,26 @@
1#include <qmenubar.h> 1#include <qmenubar.h>
2#include <qpe/resource.h> 2#include <qpe/resource.h>
3#include <qpe/config.h>
4#include <qpopupmenu.h>
5#include <qwhatsthis.h> 3#include <qwhatsthis.h>
6 4
7#include "mainwindow.h" 5#include "mainwindow.h"
8#include "ircservertab.h" 6#include "ircservertab.h"
9#include "ircserverlist.h" 7#include "ircserverlist.h"
10#include "ircsettings.h" 8#include "ircsettings.h"
11 9
12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 10MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
13 setCaption(tr("IRC Client")); 11 setCaption(tr("IRC Client"));
14 m_tabWidget = new IRCTabWidget(this); 12 m_tabWidget = new IRCTabWidget(this);
15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); 13 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here"));
16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *))); 14 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *)));
17 setCentralWidget(m_tabWidget); 15 setCentralWidget(m_tabWidget);
18 setToolBarsMovable(FALSE); 16 setToolBarsMovable(FALSE);
19 QMenuBar *menuBar = new QMenuBar(this); 17 QMenuBar *menuBar = new QMenuBar(this);
20 QPopupMenu *irc = new QPopupMenu(this); 18 QPopupMenu *irc = new QPopupMenu(this);
21 menuBar->insertItem(tr("IRC"), irc); 19 menuBar->insertItem(tr("IRC"), irc);
22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); 20 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0);
23 connect(a, SIGNAL(activated()), this, SLOT(newConnection())); 21 connect(a, SIGNAL(activated()), this, SLOT(newConnection()));
24 a->setWhatsThis(tr("Create a new connection to an IRC server")); 22 a->setWhatsThis(tr("Create a new connection to an IRC server"));
25 a->addTo(irc); 23 a->addTo(irc);
26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); 24 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0);
27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); 25 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
28 connect(a, SIGNAL(activated()), this, SLOT(settings())); 26 connect(a, SIGNAL(activated()), this, SLOT(settings()));