From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/irc/ui/Makefile.am | 12 + kopete/protocols/irc/ui/channellist.cpp | 346 ++++++++ kopete/protocols/irc/ui/channellist.h | 80 ++ kopete/protocols/irc/ui/channellistdialog.cpp | 61 ++ kopete/protocols/irc/ui/channellistdialog.h | 45 + kopete/protocols/irc/ui/empty.cpp | 1 + kopete/protocols/irc/ui/ircadd.ui | 163 ++++ kopete/protocols/irc/ui/irceditaccount.ui | 1022 ++++++++++++++++++++++ kopete/protocols/irc/ui/irceditaccountwidget.cpp | 282 ++++++ kopete/protocols/irc/ui/irceditaccountwidget.h | 60 ++ kopete/protocols/irc/ui/networkconfig.ui | 382 ++++++++ kopete/protocols/irc/ui/networkconfig.ui.h | 26 + 12 files changed, 2480 insertions(+) create mode 100644 kopete/protocols/irc/ui/Makefile.am create mode 100644 kopete/protocols/irc/ui/channellist.cpp create mode 100644 kopete/protocols/irc/ui/channellist.h create mode 100644 kopete/protocols/irc/ui/channellistdialog.cpp create mode 100644 kopete/protocols/irc/ui/channellistdialog.h create mode 100644 kopete/protocols/irc/ui/empty.cpp create mode 100644 kopete/protocols/irc/ui/ircadd.ui create mode 100644 kopete/protocols/irc/ui/irceditaccount.ui create mode 100644 kopete/protocols/irc/ui/irceditaccountwidget.cpp create mode 100644 kopete/protocols/irc/ui/irceditaccountwidget.h create mode 100644 kopete/protocols/irc/ui/networkconfig.ui create mode 100644 kopete/protocols/irc/ui/networkconfig.ui.h (limited to 'kopete/protocols/irc/ui') diff --git a/kopete/protocols/irc/ui/Makefile.am b/kopete/protocols/irc/ui/Makefile.am new file mode 100644 index 00000000..854a7398 --- /dev/null +++ b/kopete/protocols/irc/ui/Makefile.am @@ -0,0 +1,12 @@ +METASOURCES = AUTO + +noinst_LTLIBRARIES = libkopeteircui.la +AM_CPPFLAGS = $(KOPETE_INCLUDES) \ + -I$(srcdir)/..\ + -I$(srcdir)/../libkirc \ + $(all_includes) + + +libkopeteircui_la_SOURCES = ircadd.ui empty.cpp irceditaccountwidget.cpp \ + irceditaccount.ui channellist.cpp channellistdialog.cpp networkconfig.ui +EXTRA_DIST = ircadd.ui ircprefs.ui empty.cpp diff --git a/kopete/protocols/irc/ui/channellist.cpp b/kopete/protocols/irc/ui/channellist.cpp new file mode 100644 index 00000000..5c66ede0 --- /dev/null +++ b/kopete/protocols/irc/ui/channellist.cpp @@ -0,0 +1,346 @@ +/* + channellist.cpp - IRC Channel Search Widget + + Copyright (c) 2004 by Jason Keirstead + + Kopete (c) 2002-2004 by the Kopete developers + + ************************************************************************* + * * + * 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 option) any later version. * + * * + ************************************************************************* +*/ + +#include "channellist.h" + +#include "kircengine.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class ChannelListItem : public KListViewItem +{ + public: + ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 ); + virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + + private: + KListView *parentList; +}; + +ChannelListItem::ChannelListItem( KListView *parent, QString arg1, QString arg2, QString arg3 ) : + KListViewItem( parent, parent->lastItem() ), parentList( parent ) +{ + setText(0, arg1); + setText(1, arg2); + setText(2, arg3); +} + +int ChannelListItem::compare( QListViewItem *i, int col, bool ascending ) const +{ + if( col == 1 ) + { + if( text(1).toUInt() < i->text(1).toUInt() ) + return -1; + else if ( text(1).toUInt() == i->text(1).toUInt() ) + return 0; + else + return 1; + } + else + return QListViewItem::compare( i, col, ascending ); +} + +void ChannelListItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +{ + QPixmap back( width, height() ); + QPainter paint( &back ); + //KListViewItem::paintCell( &paint, cg, column, width, align ); + // PASTED FROM KLISTVIEWITEM: + // set the alternate cell background colour if necessary + QColorGroup _cg = cg; + if (isAlternate()) + if (listView()->viewport()->backgroundMode()==Qt::FixedColor) + _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); + else + _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); + // PASTED FROM QLISTVIEWITEM + { + QPainter *p = &paint; + + QListView *lv = listView(); + if ( !lv ) + return; + QFontMetrics fm( p->fontMetrics() ); + + // any text we render is done by the Components, not by this class, so make sure we've nothing to write + QString t; + + // removed text truncating code from Qt - we do that differently, further on + + int marg = lv->itemMargin(); + int r = marg; + // const QPixmap * icon = pixmap( column ); + + const BackgroundMode bgmode = lv->viewport()->backgroundMode(); + const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); + + if ( _cg.brush( crole ) != lv->colorGroup().brush( crole ) ) + p->fillRect( 0, 0, width, height(), _cg.brush( crole ) ); + else + { + // all copied from QListView::paintEmptyArea + + //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); + QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader + QStyle::SFlags how = QStyle::Style_Default; + if ( lv->isEnabled() ) + how |= QStyle::Style_Enabled; + + lv->style().drawComplexControl( QStyle::CC_ListView, + p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(), + how, QStyle::SC_ListView, QStyle::SC_None, + opt ); + } + + + + if ( isSelected() && + (column == 0 || lv->allColumnsShowFocus()) ) { + p->fillRect( r - marg, 0, width - r + marg, height(), + _cg.brush( QColorGroup::Highlight ) ); + // removed text pen setting code from Qt + } + + // removed icon drawing code from Qt + + // draw the tree gubbins + if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) { + int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin(); + textheight = QMAX( textheight, QApplication::globalStrut().height() ); + if ( textheight % 2 > 0 ) + textheight++; + if ( textheight < height() ) { + int w = lv->treeStepSize() / 2; + lv->style().drawComplexControl( QStyle::CC_ListView, p, lv, + QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, + lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default, + QStyle::SC_ListViewExpand, + (uint)QStyle::SC_All, QStyleOption( this ) ); + } + } + } + // END OF PASTE + + + //do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02 + if ( isSelected() ) + _cg.setColor(QColorGroup::Text , _cg.highlightedText() ); + + QSimpleRichText myrichtext( text(column), paint.font() ); + myrichtext.draw( &paint, 0, 0, paint.window(), _cg ); + + paint.end(); + p->drawPixmap( 0, 0, back ); +} + +ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine ) + : QWidget( parent ), m_engine( engine ) +{ + ChannelListLayout = new QVBoxLayout( this, 11, 6, "ChannelListLayout"); + + layout72_2 = new QHBoxLayout( 0, 0, 6, "layout72_2"); + + textLabel1_2 = new QLabel( this, "textLabel1_2" ); + layout72_2->addWidget( textLabel1_2 ); + + channelSearch = new QLineEdit( this, "channelSearch" ); + layout72_2->addWidget( channelSearch ); + + numUsers = new QSpinBox( 0, 32767, 1, this, "num_users" ); + numUsers->setSuffix( i18n(" members") ); + layout72_2->addWidget( numUsers ); + + mSearchButton = new QPushButton( this, "mSearchButton" ); + layout72_2->addWidget( mSearchButton ); + ChannelListLayout->addLayout( layout72_2 ); + + mChannelList = new KListView( this, "mChannelList" ); + mChannelList->addColumn( i18n( "Channel" ) ); + mChannelList->addColumn( i18n( "Users" ) ); + mChannelList->header()->setResizeEnabled( FALSE, mChannelList->header()->count() - 1 ); + mChannelList->addColumn( i18n( "Topic" ) ); + mChannelList->setAllColumnsShowFocus( TRUE ); + mChannelList->setShowSortIndicator( TRUE ); + ChannelListLayout->addWidget( mChannelList ); + + clearWState( WState_Polished ); + + textLabel1_2->setText( i18n( "Search for:" ) ); + QToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) ); + QToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) ); + QWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) ); + QWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) ); + QToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) ); + QWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here. For instance, you may type 'linux' to find channels that have something to do with linux." ) ); + mSearchButton->setText( i18n( "S&earch" ) ); + QToolTip::add( mSearchButton, i18n( "Perform a channel search." ) ); + QWhatsThis::add( mSearchButton, i18n( "Perform a channel search. Please be patient, as this can be slow depending on the number of channels on the server." ) ); + QToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) ); + mChannelList->header()->setLabel( 0, i18n( "Channel" ) ); + mChannelList->header()->setLabel( 1, i18n( "Users" ) ); + mChannelList->header()->setLabel( 2, i18n( "Topic" ) ); + + // signals and slots connections + connect( mChannelList, SIGNAL( doubleClicked(QListViewItem*) ), + this, SLOT( slotItemDoubleClicked(QListViewItem*) ) ); + + connect( mSearchButton, SIGNAL( clicked() ), this, SLOT( search() ) ); + + connect( mChannelList, SIGNAL( selectionChanged( QListViewItem*) ), this, + SLOT( slotItemSelected( QListViewItem *) ) ); + + connect( m_engine, SIGNAL( incomingListedChan( const QString &, uint, const QString & ) ), + this, SLOT( slotChannelListed( const QString &, uint, const QString & ) ) ); + + connect( m_engine, SIGNAL( incomingEndOfList() ), this, SLOT( slotListEnd() ) ); + + connect( m_engine, SIGNAL( statusChanged(KIRC::Engine::Status) ), + this, SLOT( slotStatusChanged(KIRC::Engine::Status) ) ); + + show(); +} + +void ChannelList::slotItemDoubleClicked( QListViewItem *i ) +{ + emit channelDoubleClicked( i->text(0) ); +} + +void ChannelList::slotItemSelected( QListViewItem *i ) +{ + emit channelSelected( i->text(0) ); +} + +void ChannelList::slotStatusChanged(KIRC::Engine::Status newStatus) +{ + switch(newStatus) { + case KIRC::Engine::Connected: + this->reset(); + break; + case KIRC::Engine::Disconnected: + if (mSearching) { + KMessageBox::queuedMessageBox( + this, KMessageBox::Error, + i18n("You have been disconnected from the IRC server."), + i18n("Disconnected"), 0 + ); + } + + slotListEnd(); + break; + default: + break; + } +} + +void ChannelList::reset() +{ + channelCache.clear(); + clear(); +} + +void ChannelList::clear() +{ + mChannelList->clear(); + channelSearch->clear(); + channelSearch->setFocus(); +} + +void ChannelList::search() +{ + if( m_engine->isConnected() || !channelCache.isEmpty() ) + { + mChannelList->clear(); + mChannelList->setSorting( -1 ); + mSearchButton->setEnabled(false); + mSearch = channelSearch->text(); + mSearching = true; + mUsers = numUsers->value(); + + if( channelCache.isEmpty() ) + m_engine->list(); + else + { + cacheIterator = channelCache.begin(); + slotSearchCache(); + } + } + else + { + KMessageBox::queuedMessageBox( + this, KMessageBox::Error, + i18n("You must be connected to the IRC server to perform a channel listing."), + i18n("Not Connected"), 0 + ); + } +} + +void ChannelList::slotChannelListed( const QString &channel, uint users, const QString &topic ) +{ + checkSearchResult( channel, users, topic ); + channelCache.insert( channel, QPair< uint, QString >( users, topic ) ); +} + +void ChannelList::checkSearchResult( const QString &channel, uint users, const QString &topic ) +{ + if( ( mUsers == 0 || mUsers <= users ) && + ( mSearch.isEmpty() || channel.contains( mSearch, false ) || topic.contains( mSearch, false ) ) + ) + { + new ChannelListItem( mChannelList, channel, QString::number(users), topic ); + } +} + +void ChannelList::slotSearchCache() +{ + if( cacheIterator != channelCache.end() ) + { + checkSearchResult( cacheIterator.key(), cacheIterator.data().first, cacheIterator.data().second ); + ++cacheIterator; + QTimer::singleShot( 0, this, SLOT( slotSearchCache() ) ); + } + else + { + slotListEnd(); + } +} + +void ChannelList::slotListEnd() +{ + mChannelList->setSorting(0, true); + mSearchButton->setEnabled(true); + mSearching = false; +} + +#include "channellist.moc" diff --git a/kopete/protocols/irc/ui/channellist.h b/kopete/protocols/irc/ui/channellist.h new file mode 100644 index 00000000..c6f435a0 --- /dev/null +++ b/kopete/protocols/irc/ui/channellist.h @@ -0,0 +1,80 @@ + /* + channellist.h - IRC Channel Search Widget + + Copyright (c) 2004 by Jason Keirstead + + Kopete (c) 2004 by the Kopete developers + + ************************************************************************* + * * + * 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 option) any later version. * + * * + ************************************************************************* +*/ + +#ifndef CHANNELLIST_H +#define CHANNELLIST_H + +#include +#include +#include + +#include "kircengine.h" + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QLabel; +class QLineEdit; +class QPushButton; +class KListView; +class QSpinBox; +class QListViewItem; + +class ChannelList + : public QWidget +{ + Q_OBJECT + + public: + ChannelList( QWidget *parent, KIRC::Engine *engine ); + + public slots: + void search(); + void reset(); + void clear(); + + signals: + void channelDoubleClicked( const QString &channel ); + void channelSelected( const QString &channel ); + + private slots: + void slotItemDoubleClicked( QListViewItem * i ); + void slotItemSelected( QListViewItem * i ); + void slotChannelListed( const QString & channel, uint users, const QString & topic ); + void slotListEnd(); + void slotSearchCache(); + void slotStatusChanged( KIRC::Engine::Status ); + + private: + void checkSearchResult( const QString & channel, uint users, const QString & topic ); + + QLabel* textLabel1_2; + QLineEdit* channelSearch; + QSpinBox* numUsers; + QPushButton* mSearchButton; + KListView* mChannelList; + QVBoxLayout* ChannelListLayout; + QHBoxLayout* layout72_2; + KIRC::Engine *m_engine; + bool mSearching; + QString mSearch; + uint mUsers; + QMap< QString, QPair< uint, QString > > channelCache; + QMap< QString, QPair< uint, QString > >::const_iterator cacheIterator; +}; + +#endif diff --git a/kopete/protocols/irc/ui/channellistdialog.cpp b/kopete/protocols/irc/ui/channellistdialog.cpp new file mode 100644 index 00000000..46128730 --- /dev/null +++ b/kopete/protocols/irc/ui/channellistdialog.cpp @@ -0,0 +1,61 @@ +/* + channellistdialog.cpp - IRC Channel Search Dialog + + Copyright (c) 2004 by Jason Keirstead + Copyright (c) 2005 by Michel Hermier + + Kopete (c) 2002-2005 by the Kopete developers + + ************************************************************************* + * * + * 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 option) any later version. * + * * + ************************************************************************* +*/ + +#include "channellistdialog.h" + +#include "kircengine.h" + +#include "kopeteuiglobal.h" + +#include "qlayout.h" + +ChannelListDialog::ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan) + : KDialogBase(Kopete::UI::Global::mainWidget(), "channel_list_widget", false, caption, Close) +{ + m_engine = engine; + m_list = new ChannelList( this, engine ); + + connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ), + target, slotJoinChan ); + + connect( m_list, SIGNAL( channelDoubleClicked( const QString & ) ), + this, SLOT( slotChannelDoubleClicked( const QString & ) ) ); + + new QHBoxLayout( m_list, 0, spacingHint() ); + + setInitialSize( QSize( 500, 400 ) ); + setMainWidget( m_list ); + show(); +} + +void ChannelListDialog::clear() +{ + m_list->clear(); +} + +void ChannelListDialog::search() +{ + m_list->search(); +} + +void ChannelListDialog::slotChannelDoubleClicked( const QString & ) +{ + close(); +} + +#include "channellistdialog.moc" diff --git a/kopete/protocols/irc/ui/channellistdialog.h b/kopete/protocols/irc/ui/channellistdialog.h new file mode 100644 index 00000000..2bb85f5b --- /dev/null +++ b/kopete/protocols/irc/ui/channellistdialog.h @@ -0,0 +1,45 @@ + /* + channellist.h - IRC Channel Search Widget + + Copyright (c) 2004 by Jason Keirstead + + Kopete (c) 2004 by the Kopete developers + + ************************************************************************* + * * + * 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 option) any later version. * + * * + ************************************************************************* +*/ + +#ifndef CHANNELLISTDIALOG_H +#define CHANNELLISTDIALOG_H + +#include "channellist.h" + +#include "kdialogbase.h" + +class ChannelListDialog + : public KDialogBase +{ + Q_OBJECT + + public: + ChannelListDialog(KIRC::Engine *engine, const QString &caption, QObject *target, const char* slotJoinChan); + + void clear(); + + void search(); + + private slots: + void slotChannelDoubleClicked( const QString & ); + + private: + KIRC::Engine *m_engine; + ChannelList *m_list; +}; + +#endif diff --git a/kopete/protocols/irc/ui/empty.cpp b/kopete/protocols/irc/ui/empty.cpp new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/kopete/protocols/irc/ui/empty.cpp @@ -0,0 +1 @@ + diff --git a/kopete/protocols/irc/ui/ircadd.ui b/kopete/protocols/irc/ui/ircadd.ui new file mode 100644 index 00000000..f1025112 --- /dev/null +++ b/kopete/protocols/irc/ui/ircadd.ui @@ -0,0 +1,163 @@ + +ircAddUI + + + ircAddUI + + + + 0 + 0 + 389 + 350 + + + + + unnamed + + + 0 + + + 6 + + + + tabWidget3 + + + + tab + + + &Add Contact + + + + unnamed + + + 6 + + + 6 + + + + layout70 + + + + unnamed + + + + TextLabel1 + + + N&ickname/channel to add: + + + addID + + + The name of the IRC contact or channel you would like to add. + + + The name of the IRC contact or channel you would like to add. You may type simply the text of a person's nickname, or you may type a channel name, preceded by a pound sign ('#'). + + + + + addID + + + The name of the IRC contact or channel you would like to add. + + + The name of the IRC contact or channel you would like to add. You may type simply the text of a person's nickname, or you may type a channel name, preceded by a pound sign ('#') + + + + + + + textLabel3 + + + <i>(for example: joe_bob or #somechannel)</i> + + + AlignVCenter|AlignRight + + + + + spacer25 + + + Vertical + + + Expanding + + + + 20 + 110 + + + + + + + + tab + + + &Search Channels + + + + unnamed + + + + hbox + + + + + + + + + + QHBox +
qhbox.h
+ + -1 + -1 + + 0 + + 5 + 5 + 0 + 0 + + image0 +
+
+ + + 789c9d97c76e24490e86effd1442f3d65870d2451a0ce6206f5adeb4cc620f8c34f2553225b5a4c1befb46927fe6a1d4c0ccac4287fa8a0c26834193f5dbb785b3fd9d856fbf7d799ec9ecba5ea8afe469e15bf3727ffffeeffffcf1e797af49b2d0ffc7d142f2f55f5fbe1ecc16ea85dde9a4ed81290045faa77ca49cf4ab67ba1e3953969173651ab9d4fdf1c8a27c3872ad7c3c72d3b32c2a67c3f3444636fbef23eb7e590267e68fcc4656395d8dacf6d938ef97eaef289781cddebdb2846fccff44b989ba58e3411f3dc75158e6df1d3889539517ca49bf54fe43398d1dec4f46567f685fd9c539f43fc025f80c1c3ce8d93f28e77185f8bf0c6cfae4c0b5f9c3c6e5c0542a4b5876fe13708df39d2bd7716372aa8c93c4e4723bb2f977aadc26ceec4bdb7310e6b0bfab9c2445ecd49f1370694cebca65d260ffa6711a41aef14d24e94cee6be3348e0ae5e9c8765f07ca3e8db17f0f9c825794eb3489351fe9bb7217e4969f29388bd51ee9fda5715a19730696b852fea95c6471647ca95cf64bcf43e0cef4657b647bfe6acf213d6bb32f9a9f5992b5a64f9a8f990b6cf9ecc15d6cf9acf6b2da55a8a75cb973dee4b2d1b38b5c05de02434e87e01aacfb351df5bebddea74b5c67f9c795711ea15e357e2ecde358fb87efc0a867df8cac728a074e62e527706afb59f3cf6583be5c28bb3c35f693812d1fbdc6dbe57966fec932d899ffa4f7e38adca17e34beaeca4b9c271a18f1d5fc739257b0d70d9c68be7bed7fcee7827ab91cd8e4740cf6b19d4ffb87ab07b9bf516e72d4a3ac821b9cef6e60d84f47367ded2fae1d9f7704f6163f79000ffde27660f387ed3c5dbf54dfeebb0bf6acbe6b706bfa5ef32f8f8b18f5bf0f463f20edb77956a4e68fbc80b3c4facd163847be6bfde72ec86dbeac82715fbc0286be683cf3bc081d44f7df80d344fb0b6b7de64581fb916765297263d6fccd9b7ee97e566e8b06cfdb1f59cf2bda2f8bbc2c11df0c5c41aefdb328ca22b1feb0012eedbce24736f91b18fb796d64eb87cb60817dcdafb07d906bfd14d22f659d8785ef97b2f6d7b2df6ef1d6fb2babaac6f92e8c25b27ecc1f239b7f3a5fca5a8678ea7c2d9bc0e6ef1238b3fca2c7814d5f4cbf9334b5f833384bed3c7a5f5514f4adbe2ec07962e7590457f06f6f649b977afe2a16f42f5e070bfc591e18f7a5f1a812a9e0df39d827da4fbd8c6ccfd7785569bf945f953371a9d5a3de67950bfa2d75c63eb2fb15bdcfaaf011e6c7263846bf8f4636f91618f3c7d3c0f047fb69550efab2074e12bd6fd27957553ec33c5b043bcc7f9d0795f818fdb501a3df8ae673e507ff69021eea37063bc45ffb73550736ff36c0a84f3e0317a86f8b5f139e6ffe1f821de6d9127898ff3be00a7c3ab2cd03e3d697560ff40016e47b3bb2e96bbd559d8f32bbff4b7065f193042c98873acf240af6adbf3c83c5f2954bb0c7bcd77c107d81d2fdebc63e33ff640aaecc9e1c8151df5c803dfaadc64b52dfa03ed64636ffb4ff4b2867f453ede7227586fcd3f9264ded91fffafe236d5da37fe83c91ceb7b9e5b7f6731ff92ed7f747d6fbf7e185cf58347e3e6932e47b3430fa893edf87d795c2fc3f003b67f5f902cec17abfde0dfa3c053b3c5ffb832fc2eb8fddcf233887fc195c801f46b6f3cdc02558fba72f7d2d1a7f7e321ee58fe0cad86bbff24dd3e2fe74fef836b0c6eb60d62fa6bf5e07b3419f853dd7dc70fb8bd5f1255fd90ed30f9f3c5ff30ddff21ddff384a7fcc08ffcc4cf61cdf8855ff9e79c7e1db4dff89d3f7891977899577895d7789d377893b7f83b6fcfe937bc13b477798ff7f9800ff928ac633ee11f7cca6761d7f99c7e1b3cb908da11c7413be1943376e153cc39175c72f549ff9e17c31744429e6a6aa8a58e2ee98aaee9866e7f617fc24b7417a4f734a1293dd0233dd133cd8285177aa5f9f3b63ca5377aa78f607b919668995682e62aadd17ab0b1419b9ff41f682b48bed336edd02eed05ed7d5ea3033a0cdf1ed1f127fd273ae123fa41a774a6b685cee982228a837e42e927fd47caf8985c38651eb40b2ac38e4a5842658a97fab33fd248cb87d2c9a55cc9b5dcc82d1fc99ddccb44a6f230af2f8ff224cf417f262ff22a3fe54ddee543166549966545567f617f4dd66523dc6b2c9bb225df655b7682f692ecca9eeccfe97772c09b722847722c27c1f3eb70f66bf9116c9fca999ccbc59cfe25bf4a143a5ef8992561324a78bd92522acf9ebc78efe7cf7b153276db37bef59dbff457fedadff85b7f27abfede4ffcd4cf9ff76faeff4fffefeff8c7f5fedfdfbffc0fa355c495 + + + + addID + tabWidget3 + + +
diff --git a/kopete/protocols/irc/ui/irceditaccount.ui b/kopete/protocols/irc/ui/irceditaccount.ui new file mode 100644 index 00000000..682e9be9 --- /dev/null +++ b/kopete/protocols/irc/ui/irceditaccount.ui @@ -0,0 +1,1022 @@ + +IRCEditAccountBase + + + IRCEditAccountBase + + + + 0 + 0 + 689 + 528 + + + + + 3 + 3 + 0 + 0 + + + + + 440 + 575 + + + + + unnamed + + + + tabWidget2 + + + + 3 + 3 + 0 + 0 + + + + + tab + + + B&asic Setup + + + + unnamed + + + + spacer8 + + + Vertical + + + Expanding + + + + 20 + 150 + + + + + + textLabel3 + + + + 3 + 1 + 0 + 0 + + + + + 32767 + 32767 + + + + <p><b>Note:</b> Most IRC servers do not require a password, and only a nickname is required to connect</p> + + + WordBreak|AlignTop + + + + + groupBox59 + + + GroupBoxPanel + + + Sunken + + + Account Information + + + + unnamed + + + + textLabel4 + + + N&ickname: + + + mNickName + + + This is the name that everyone will see everytime you say something + + + + + textLabel1_2 + + + Alternate ni&ckname: + + + mAltNickname + + + When the nickname is already in use when connecting, this name will be used instead + + + + + mNickName + + + + 7 + 0 + 0 + 0 + + + + This is the name that everyone will see everytime you say something + + + The alias you would like to use on IRC. You may change this once online with the /nick command. + + + + + mAltNickname + + + When the nickname is already in use when connecting, this name will be used instead + + + When the nickname is already in use when connecting, this name will be used instead + + + + + mPasswordWidget + + + + + m_realNameLabel + + + &Real name: + + + m_realNameLineEdit + + + + + textLabel5 + + + &Username: + + + mUserName + + + The username you would prefer to use on IRC, if your system does not have identd support. Leave blank to use your system account name. + + + + + mUserName + + + + 7 + 0 + 0 + 0 + + + + Normal + + + The username you would prefer to use on IRC, if your system does not have identd support. Leave blank to use your system account name. + + + The username you would prefer to use on IRC, if your system does not have identd support. Leave blank to use your system account name. + + + + + m_realNameLineEdit + + + + 7 + 0 + 0 + 0 + + + + Normal + + + The username you would prefer to use on IRC, if your system does not have identd support. + + + The username you would prefer to use on IRC, if your system does not have identd support. Leave blank to use your system account name. + + + + + + + + + TabPage + + + Connection + + + + unnamed + + + + layout21 + + + + unnamed + + + + layout19 + + + + unnamed + + + + description + + + + + + + + spacer11 + + + Horizontal + + + Expanding + + + + 161 + 20 + + + + + + + + layout20 + + + + unnamed + + + + network + + + + + editButton + + + &Edit... + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 392 + 20 + + + + + + + + textLabel1_3 + + + &Network: + + + network + + + + + + + groupBox1 + + + + 3 + 0 + 0 + 0 + + + + Connection Preferences + + + + unnamed + + + + preferSSL + + + &Prefer SSL-based connections + + + + + autoConnect + + + E&xclude from connect all + + + If you check that case, the account will not be connected when you press the "Connect All" button, or at startup even if you selected to automatically connect at startup + + + + + layout25 + + + + unnamed + + + + textLabel1_2_2 + + + Default &charset: + + + charset + + + + + charset + + + + + spacer6_2 + + + Horizontal + + + Expanding + + + + 141 + 20 + + + + + + + + + + groupBox5 + + + Default Messages + + + + unnamed + + + + textLabel1 + + + &Part message: + + + partMessage + + + + + textLabel2 + + + &Quit message: + + + quitMessage + + + + + partMessage + + + The message you want people to see when you part a channel without giving a reason. Leave this field blank to use the Kopete default message. + + + The message you want people to see when you part a channel without giving a reason. Leave this field blank to use the Kopete default message. + + + + + quitMessage + + + The message you want people to see when you disconnect from IRC without giving a reason. Leave this field blank to use the Kopete default message. + + + The message you want people to see when you disconnect from IRC without giving a reason. Leave this field blank to use the Kopete default message. + + + + + + + spacer72 + + + Vertical + + + Expanding + + + + 20 + 150 + + + + + + + + tab + + + A&dvanced Configuration + + + + unnamed + + + + groupBox7 + + + Message Destinations + + + + unnamed + + + + autoShowAnonWindows + + + Auto-show anonymous windows + + + + + autoShowServerWindow + + + Auto-show the server window + + + + + layout19 + + + + unnamed + + + + textLabel1_4 + + + Server messages: + + + + + textLabel4_3 + + + Server notices: + + + + + + Active Window + + + + + Server Window + + + + + Anonymous Window + + + + + KNotify + + + + + Ignore + + + + serverNotices + + + 1 + + + + + + Active Window + + + + + Server Window + + + + + Anonymous Window + + + + + KNotify + + + + + Ignore + + + + serverMessages + + + 1 + + + + + + + layout23 + + + + unnamed + + + + textLabel3_3 + + + Error messages: + + + + + + Active Window + + + + + Server Window + + + + + Anonymous Window + + + + + KNotify + + + + + Ignore + + + + informationReplies + + + + + textLabel2_2 + + + Information replies: + + + + + + Active Window + + + + + Server Window + + + + + Anonymous Window + + + + + KNotify + + + + + Ignore + + + + errorMessages + + + + + + + + + groupBox6 + + + + 3 + 3 + 0 + 0 + + + + + 0 + 130 + + + + Custom CTCP Replies + + + + unnamed + + + + + CTCP + + + true + + + true + + + + + Reply + + + true + + + true + + + + ctcpList + + + + 7 + 2 + 0 + 0 + + + + false + + + Accept + + + true + + + true + + + You can use this dialog to add custom replies for when people send CTCP requests to you. You can also use this dialog to override the built-in replies for VERSION, USERINFO, and CLIENTINFO. + + + + + layout153 + + + + unnamed + + + + textLabel3_2 + + + &CTCP: + + + newCTCP + + + + + newCTCP + + + + + textLabel4_2 + + + &Reply: + + + newReply + + + + + newReply + + + + + addReply + + + Add Repl&y + + + + + + + + + groupBox60 + + + + 3 + 3 + 0 + 0 + + + + + 0 + 130 + + + + Run Following Commands on Connect + + + + unnamed + + + + layout29 + + + + unnamed + + + + commandEdit + + + + 3 + 0 + 0 + 0 + + + + + + addButton + + + Add Co&mmand + + + + + + + + Command + + + true + + + true + + + + commandList + + + + 7 + 2 + 0 + 0 + + + + true + + + Accept + + + true + + + true + + + Any commands added here will be run as soon as you are connected to the IRC server. + + + Any commands added here will be run as soon as you are connected to the IRC server. + + + + + + + + + + + + Kopete::UI::PasswordWidget +
kopetepasswordwidget.h
+ + 50 + 50 + + 0 + + 1 + 0 + 0 + 0 + + image0 + changed() +
+
+ + + 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000030149444154388db59531681b5718c77f0e377c070e3c810a3a70e0041eac51852e0a19e45134830a1d9a4c69a04bc8928e990a693a640e1d0c8642b08742321894c1507991b484c890902bb8701a047760c3bd21701fe4201dde49b6a41a32b8df72dcbbeffdbefffbbfefbd5b1b0c07cce266ebe667ae2006c3c1dada0cdc3be87d6e6c35b0d692a409d9c7ec8b20d65ae29398d19b1114e7e3de4ce98b3f5e10dc0053cf0951b4506496e1b964bf7ce6c585d9054c62d01d617ca48be0596553cf496d8f2c8b01c5f795fc93904e85ec4c01a152857a5d9175d0b2805c872080f18595ccc1499a10a225d4e2fbc2877786fe81253ab6c04c8d106e09db5d43ab0d146e5c64d1a23938fb98a185cea1c33eecfd9eba49eb427dcb201e245365f2b7b2fb5b4a3a31dcb927178afe07d86901df870fefa4842aed6f6b74ba42e52b4014d580e1eb9cbd9d94de7e4aad16d2f9be02d805f0b5e532f927a1ffcacea1777f122a8105b164a7c25faf323a5d9f1f1fd600e1e5bec59e2d4b5c7ef5209d0ad17b8b31864e57c0b3e0815ac3ee33253ab664a770ff5185d1a1cb8d2267d3e58aa1dc7d2508cbe597d0e74fdd269aaaf0f52d414c4ea3e9762c996869e42560d7a72e41c4799a2586e74f95e8d8151481fa86efbe7b3398ac58b1a2b8527589f15451ad303ac2293542ad6648a796278f13a27185e4c4754310facb98c53a79e19a3fdc1426ff28c3d7399d1f7cb25343eb96106cf83c790ce9c4f2eb831855c55485663327992eb6dc8a6259874ed700b0b793323cccb9ffa842b30d6133e3e75fea989ac15a8b16ca76b746b0b92278d919774c5b6d48a78697fb29bbcf52468742a32120909c24e899ce67beed5be2db01e22d1e9485bb620e47f9ee9e606a21bd3f5d3744c7e7c54d55e87443867d8b554515ac5db4620e8e4f62263170fd1cdee90aad7640141992891b0f367c9adfe4049bb07d3b7022bd8c687c0978f46684ee084150b65ac1fcca94591b7a90a496e4c095164fb016a2b192a497795cc0f84817aebe25f7bf70ccc54a575c555c03f78ffa5fc0570d1f0c076bff0232285a09643cc7ce0000000049454e44ae426082 + + + + tabWidget2 + mNickName + mAltNickname + mUserName + m_realNameLineEdit + network + editButton + preferSSL + autoConnect + charset + partMessage + quitMessage + serverMessages + serverNotices + informationReplies + errorMessages + autoShowServerWindow + autoShowAnonWindows + ctcpList + newCTCP + newReply + addReply + commandList + commandEdit + addButton + + + + klistview.h + +
diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.cpp b/kopete/protocols/irc/ui/irceditaccountwidget.cpp new file mode 100644 index 00000000..4a1e6ed3 --- /dev/null +++ b/kopete/protocols/irc/ui/irceditaccountwidget.cpp @@ -0,0 +1,282 @@ +/* + irceditaccountwidget.cpp - IRC Account Widget + + Copyright (c) 2005 by Tommi Rantala + Copyright (c) 2003 by Olivier Goffart + Copyright (c) 2003 by Jason Keirstead + Kopete (c) 2003-2005 by the Kopete developers + + ************************************************************************* + * * + * 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 option) any later version. * + * * + ************************************************************************* +*/ + +#include "irceditaccountwidget.h" + +#include "ircaccount.h" +#include "ircusercontact.h" +#include "ircprotocol.h" +#include "kcodecaction.h" + +#include "kircengine.h" + +#include "kopetepasswordwidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IRCEditAccountWidget::IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *ident, QWidget *parent, const char * ) + : IRCEditAccountBase(parent), KopeteEditAccountWidget(ident) +{ + mProtocol = proto; + + // default charset/encoding for new accounts: utf-8, see http://www.iana.org/assignments/character-sets + int currentCodec = 106; + + if( account() ) + { + QString nickName = account()->mySelf()->nickName(); + QString serverInfo = account()->accountId(); + + mNickName->setText( nickName ); + mAltNickname->setText( account()->altNick() ); + mUserName->setText( account()->userName() ); + m_realNameLineEdit->setText( account()->realName() ); + + partMessage->setText( account()->defaultPart() ); + quitMessage->setText( account()->defaultQuit() ); + if( account()->codec() ) + currentCodec = account()->codec()->mibEnum(); + + mPasswordWidget->load ( &account()->password() ); + + preferSSL->setChecked(account()->configGroup()->readBoolEntry("PreferSSL")); + autoShowServerWindow->setChecked( account()->configGroup()->readBoolEntry("AutoShowServerWindow") ); + autoConnect->setChecked( static_cast(account())->excludeConnect() ); + + KConfigGroup *config = account()->configGroup(); + + serverNotices->setCurrentItem( config->readNumEntry( "ServerNotices", IRCAccount::ServerWindow ) - 1 ); + serverMessages->setCurrentItem( config->readNumEntry( "ServerMessages", IRCAccount::ServerWindow ) - 1 ); + informationReplies->setCurrentItem( config->readNumEntry( "InformationReplies", IRCAccount::ActiveWindow ) - 1 ); + errorMessages->setCurrentItem( config->readNumEntry( "ErrorMessages", IRCAccount::ActiveWindow ) - 1 ); + + QStringList cmds = account()->connectCommands(); + for( QStringList::Iterator i = cmds.begin(); i != cmds.end(); ++i ) + new QListViewItem( commandList, *i ); + + const QMap< QString, QString > replies = account()->customCtcpReplies(); + for( QMap< QString, QString >::ConstIterator it = replies.begin(); it != replies.end(); ++it ) + new QListViewItem( ctcpList, it.key(), it.data() ); + } + + mUserName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^\\s]*$"), mUserName ) ); + mNickName->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mNickName ) ); + mAltNickname->setValidator( new QRegExpValidator( QString::fromLatin1("^[^#+&][^\\s]*$"), mAltNickname ) ); + + charset->insertStringList( KCodecAction::supportedEncodings() ); + + for (int i = 0; i < charset->count(); ++i) { + QString encoding = KGlobal::charsets()->encodingForName(charset->text(i)); + + if (KGlobal::charsets()->codecForName(encoding)->mibEnum() == currentCodec) { + charset->setCurrentItem( i ); + break; + } + } + + connect( commandList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), + this, SLOT( slotCommandContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); + + connect( ctcpList, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), + this, SLOT( slotCtcpContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); + + connect( addButton, SIGNAL( clicked() ), this, SLOT( slotAddCommand() ) ); + connect( editButton, SIGNAL( clicked() ), this, SLOT(slotEditNetworks() ) ); + connect( addReply, SIGNAL( clicked() ), this, SLOT( slotAddCtcp() ) ); + + connect( network, SIGNAL( activated( const QString & ) ), + this, SLOT( slotUpdateNetworkDescription( const QString &) ) ); + + connect( IRCProtocol::protocol(), SIGNAL( networkConfigUpdated( const QString & ) ), + this, SLOT( slotUpdateNetworks( const QString & ) ) ); + + slotUpdateNetworks( QString::null ); +} + +IRCEditAccountWidget::~IRCEditAccountWidget() +{ +} + +IRCAccount *IRCEditAccountWidget::account () +{ + return dynamic_cast(KopeteEditAccountWidget::account () ); +} + +void IRCEditAccountWidget::slotUpdateNetworks( const QString & selectedNetwork ) +{ + network->clear(); + + uint i = 0; + QStringList keys; + for( QDictIterator it( IRCProtocol::protocol()->networks() ); it.current(); ++it ) + keys.append( it.currentKey() ); + + keys.sort(); + + QStringList::Iterator end = keys.end(); + for( QStringList::Iterator it = keys.begin(); it != end; ++it ) + { + IRCNetwork * current = IRCProtocol::protocol()->networks()[*it]; + network->insertItem( current->name ); + if ( ( account() && account()->networkName() == current->name ) || current->name == selectedNetwork ) + { + network->setCurrentItem( i ); + description->setText( current->description ); + } + ++i; + } +} + +void IRCEditAccountWidget::slotEditNetworks() +{ + IRCProtocol::protocol()->editNetworks( network->currentText() ); +} + +void IRCEditAccountWidget::slotUpdateNetworkDescription( const QString &network ) +{ + description->setText( + IRCProtocol::protocol()->networks()[ network ]->description + ); +} + +void IRCEditAccountWidget::slotCommandContextMenu( KListView *, QListViewItem *item, const QPoint &p ) +{ + QPopupMenu popup; + popup.insertItem( i18n("Remove Command"), 1 ); + if( popup.exec( p ) == 1 ) + delete item; +} + +void IRCEditAccountWidget::slotCtcpContextMenu( KListView *, QListViewItem *item, const QPoint &p ) +{ + QPopupMenu popup; + popup.insertItem( i18n("Remove CTCP Reply"), 1 ); + if( popup.exec( p ) == 1 ) + delete item; +} + +void IRCEditAccountWidget::slotAddCommand() +{ + if ( !commandEdit->text().isEmpty() ) + { + new QListViewItem( commandList, commandEdit->text() ); + commandEdit->clear(); + } +} + +void IRCEditAccountWidget::slotAddCtcp() +{ + if ( !newCTCP->text().isEmpty() && !newReply->text().isEmpty() ) + { + new QListViewItem( ctcpList, newCTCP->text(), newReply->text() ); + newCTCP->clear(); + newReply->clear(); + } +} + +QString IRCEditAccountWidget::generateAccountId( const QString &network ) +{ + KConfig *config = KGlobal::config(); + QString nextId = network; + + uint accountNumber = 1; + while( config->hasGroup( QString("Account_%1_%2").arg( m_protocol->pluginId() ).arg( nextId ) ) ) + { + nextId = QString::fromLatin1("%1_%2").arg( network ).arg( ++accountNumber ); + } + kdDebug( 14120 ) << k_funcinfo << " ID IS: " << nextId << endl; + return nextId; +} + +Kopete::Account *IRCEditAccountWidget::apply() +{ + QString nickName = mNickName->text(); + QString networkName = network->currentText(); + + if( !account() ) + { + setAccount( new IRCAccount( mProtocol, generateAccountId(networkName), QString::null, networkName, nickName ) ); + + } + else + { + account()->setNickName( nickName ); + account()->setNetwork( networkName ); + } + + mPasswordWidget->save( &account()->password() ); + + account()->setAltNick( mAltNickname->text() ); + account()->setUserName( mUserName->text() ); + account()->setRealName( m_realNameLineEdit->text() ); + account()->setDefaultPart( partMessage->text() ); + account()->setDefaultQuit( quitMessage->text() ); + account()->setAutoShowServerWindow( autoShowServerWindow->isChecked() ); + account()->setExcludeConnect( autoConnect->isChecked() ); + account()->setMessageDestinations( serverNotices->currentItem() + 1, serverMessages->currentItem() + 1, + informationReplies->currentItem() + 1, errorMessages->currentItem() + 1 + ); + + account()->configGroup()->writeEntry("PreferSSL", preferSSL->isChecked()); + + QStringList cmds; + for( QListViewItem *i = commandList->firstChild(); i; i = i->nextSibling() ) + cmds.append( i->text(0) ); + + QMap< QString, QString > replies; + for( QListViewItem *i = ctcpList->firstChild(); i; i = i->nextSibling() ) + replies[ i->text(0) ] = i->text(1); + + account()->setCustomCtcpReplies( replies ); + account()->setConnectCommands( cmds ); + + KCharsets *c = KGlobal::charsets(); + account()->setCodec( c->codecForName( c->encodingForName( charset->currentText() ) ) ); + + return account(); +} + + +bool IRCEditAccountWidget::validateData() +{ + if( mNickName->text().isEmpty() ) + KMessageBox::sorry(this, i18n("You must enter a nickname."), i18n("Kopete")); + else + return true; + + return false; +} + +#include "irceditaccountwidget.moc" diff --git a/kopete/protocols/irc/ui/irceditaccountwidget.h b/kopete/protocols/irc/ui/irceditaccountwidget.h new file mode 100644 index 00000000..365acaf3 --- /dev/null +++ b/kopete/protocols/irc/ui/irceditaccountwidget.h @@ -0,0 +1,60 @@ +/* + irceditaccountwidget.h - IRC Account Widget + + Kopete (c) 2003 by the Kopete developers + + ************************************************************************* + * * + * 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 option) any later version. * + * * + ************************************************************************* +*/ + + + +#ifndef IRCEDITACCOUNTWIDEGET_H +#define IRCEDITACCOUNTWIDEGET_H + +#include "editaccountwidget.h" +#include "irceditaccount.h" + +class IRCProtocol; +class IRCAccount; +class KListView; +class QListViewItem; + +class IRCEditAccountWidget : public IRCEditAccountBase, public KopeteEditAccountWidget +{ + Q_OBJECT + + public: + IRCEditAccountWidget(IRCProtocol *proto, IRCAccount *, QWidget *parent=0, const char *name=0); + ~IRCEditAccountWidget(); + + IRCAccount *account(); + virtual bool validateData(); + virtual Kopete::Account *apply(); + + private slots: + void slotCommandContextMenu( KListView*, QListViewItem*, const QPoint & ); + void slotCtcpContextMenu( KListView*, QListViewItem*, const QPoint & ); + void slotAddCommand(); + void slotAddCtcp(); + void slotEditNetworks(); + void slotUpdateNetworks( const QString & ); + void slotUpdateNetworkDescription( const QString & ); + + private: + void readNetworks(); + QString generateAccountId( const QString &network ); + + IRCProtocol *mProtocol; +}; + +#endif + +// vim: set noet ts=4 sts=4 sw=4: + diff --git a/kopete/protocols/irc/ui/networkconfig.ui b/kopete/protocols/irc/ui/networkconfig.ui new file mode 100644 index 00000000..d1000e37 --- /dev/null +++ b/kopete/protocols/irc/ui/networkconfig.ui @@ -0,0 +1,382 @@ + +NetworkConfig + + + NetworkConfig + + + + 0 + 0 + 670 + 468 + + + + Network Configuration + + + + unnamed + + + + description + + + + + textLabel10 + + + + 1 + 5 + 0 + 0 + + + + &Description: + + + description + + + + + groupBox2 + + + + 3 + 3 + 0 + 0 + + + + 4 + + + Host Con&figuration + + + + unnamed + + + + hostList + + + + 3 + 3 + 0 + 0 + + + + The IRC servers associated with this network + + + The IRC servers associated with this network. Use the up and down buttons to alter the order in which connections are attempted. + + + + + password + + + Password + + + Most IRC servers do not require a password + + + + + textLabel6 + + + Por&t: + + + port + + + + + port + + + 65536 + + + 1 + + + 6667 + + + + + textLabel4 + + + &Password: + + + password + + + + + textLabel5 + + + &Host: + + + host + + + + + host + + + true + + + + + + + + useSSL + + + Use SS&L + + + Check this to enable SSL for this connection + + + + + removeHost + + + + 1 + 0 + 0 + 0 + + + + &Remove + + + + + newHost + + + + 1 + 0 + 0 + 0 + + + + &New... + + + + + spacer3 + + + Horizontal + + + Expanding + + + + 210 + 20 + + + + + + downButton + + + false + + + Down + + + Move this server down + + + Move this server down in connection attempt priority + + + + + spacer4 + + + Vertical + + + Expanding + + + + 20 + 151 + + + + + + upButton + + + false + + + Up + + + Move this server up + + + Move this server up in connection attempt priority + + + + + + + cancelButton + + + &Cancel + + + + + saveButton + + + &Save + + + + + newNetwork + + + Ne&w + + + + + networkList + + + + 3 + 7 + 0 + 0 + + + + + + spacer5 + + + Horizontal + + + Expanding + + + + 260 + 20 + + + + + + renameNetwork + + + Rena&me... + + + + + removeNetwork + + + Remo&ve + + + + + + + cancelButton + clicked() + NetworkConfig + reject() + + + saveButton + clicked() + NetworkConfig + accept() + + + + networkList + newNetwork + renameNetwork + removeNetwork + description + hostList + upButton + downButton + host + port + password + useSSL + newHost + removeHost + saveButton + cancelButton + + + accepted() + rejected() + + + accept() + reject() + + + diff --git a/kopete/protocols/irc/ui/networkconfig.ui.h b/kopete/protocols/irc/ui/networkconfig.ui.h new file mode 100644 index 00000000..7716e75f --- /dev/null +++ b/kopete/protocols/irc/ui/networkconfig.ui.h @@ -0,0 +1,26 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename functions or slots use +** Qt Designer which will update this file, preserving your code. Create an +** init() function in place of a constructor, and a destroy() function in +** place of a destructor. +*****************************************************************************/ + + + + + + +void NetworkConfig::accept() +{ + emit accepted(); + QDialog::accept(); +} + + +void NetworkConfig::reject() +{ + emit rejected(); + QDialog::reject(); +} -- cgit v1.2.1