summaryrefslogtreecommitdiff
path: root/noncore/net
authormickeyl <mickeyl>2003-12-07 13:51:01 (UTC)
committer mickeyl <mickeyl>2003-12-07 13:51:01 (UTC)
commitc648101ca50a9782911b58b5158b31e1d0427ab3 (patch) (unidiff)
tree0fcf5801e23d95e071c7f1b62230c5b15c6256ea /noncore/net
parent2d793ca674944241480f6939814e3f61d0a0e0fb (diff)
downloadopie-c648101ca50a9782911b58b5158b31e1d0427ab3.zip
opie-c648101ca50a9782911b58b5158b31e1d0427ab3.tar.gz
opie-c648101ca50a9782911b58b5158b31e1d0427ab3.tar.bz2
s/QPEMenuBar/QMenuBar:
- remove usage of deprecated classses - makes it easier to migrate to OMenuBar in the future
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp2
-rw-r--r--noncore/net/opieftp/opieftp.h2
-rw-r--r--noncore/net/opieirc/mainwindow.cpp2
-rw-r--r--noncore/net/wellenreiter/TODO15
4 files changed, 16 insertions, 5 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index ee7d32f..48629bf 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -1,167 +1,167 @@
1/*************************************************************************** 1/***************************************************************************
2 opieftp.cpp 2 opieftp.cpp
3 ------------------- 3 -------------------
4** Created: Sat Mar 9 23:33:09 2002 4** Created: Sat Mar 9 23:33:09 2002
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12//#define DEVELOPERS_VERSION 12//#define DEVELOPERS_VERSION
13 13
14#include "opieftp.h" 14#include "opieftp.h"
15 15
16extern "C" { 16extern "C" {
17#include "../ftplib/ftplib.h" 17#include "../ftplib/ftplib.h"
18} 18}
19 19
20#include "inputDialog.h" 20#include "inputDialog.h"
21 21
22#include <qpe/qpemenubar.h> 22#include <qpe/qpemenubar.h>
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/mimetype.h> 26#include <qpe/mimetype.h>
27 27
28#include <qtextstream.h> 28#include <qtextstream.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qcombobox.h> 31#include <qcombobox.h>
32#include <qlistview.h> 32#include <qlistview.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qprogressbar.h> 34#include <qprogressbar.h>
35#include <qspinbox.h> 35#include <qspinbox.h>
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qlayout.h> 37#include <qlayout.h>
38#include <qmessagebox.h> 38#include <qmessagebox.h>
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qlistbox.h> 40#include <qlistbox.h>
41 41
42#include <unistd.h> 42#include <unistd.h>
43#include <stdlib.h> 43#include <stdlib.h>
44 44
45 45
46QProgressBar *ProgressBar; 46QProgressBar *ProgressBar;
47static netbuf *conn=NULL; 47static netbuf *conn=NULL;
48 48
49static int log_progress(netbuf *, int xfered, void *) 49static int log_progress(netbuf *, int xfered, void *)
50{ 50{
51// int fsz = *(int *)arg; 51// int fsz = *(int *)arg;
52// int pct = (xfered * 100) / fsz; 52// int pct = (xfered * 100) / fsz;
53// printf("%3d%%\r", pct); 53// printf("%3d%%\r", pct);
54// fflush(stdout); 54// fflush(stdout);
55 ProgressBar->setProgress(xfered); 55 ProgressBar->setProgress(xfered);
56 qApp->processEvents(); 56 qApp->processEvents();
57 return 1; 57 return 1;
58} 58}
59 59
60OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) 60OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
61 : QMainWindow( parent, name, fl ) 61 : QMainWindow( parent, name, fl )
62{ 62{
63 setCaption( tr( "OpieFtp" ) ); 63 setCaption( tr( "OpieFtp" ) );
64 fuckeduphack=FALSE; 64 fuckeduphack=FALSE;
65 QGridLayout *layout = new QGridLayout( this ); 65 QGridLayout *layout = new QGridLayout( this );
66 layout->setSpacing( 2); 66 layout->setSpacing( 2);
67 layout->setMargin( 2); 67 layout->setMargin( 2);
68 68
69 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 69 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
70 70
71 QPEMenuBar *menuBar = new QPEMenuBar(this); 71 QMenuBar *menuBar = new QMenuBar(this);
72// QPEToolBar *menuBar = new QPEToolBar(this); 72// QPEToolBar *menuBar = new QPEToolBar(this);
73// menuBar->setHorizontalStretchable( TRUE ); 73// menuBar->setHorizontalStretchable( TRUE );
74 74
75 QWMatrix matrix; 75 QWMatrix matrix;
76 QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); 76 QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
77 matrix.scale( .4, .4); 77 matrix.scale( .4, .4);
78 unknownXpm = pix.xForm(matrix); 78 unknownXpm = pix.xForm(matrix);
79 79
80 connectionMenu = new QPopupMenu( this ); 80 connectionMenu = new QPopupMenu( this );
81 localMenu = new QPopupMenu( this ); 81 localMenu = new QPopupMenu( this );
82 remoteMenu = new QPopupMenu( this ); 82 remoteMenu = new QPopupMenu( this );
83 tabMenu = new QPopupMenu( this ); 83 tabMenu = new QPopupMenu( this );
84 84
85 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); 85 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
86 86
87 menuBar->insertItem( tr( "Connection" ), connectionMenu); 87 menuBar->insertItem( tr( "Connection" ), connectionMenu);
88// menuBar->insertItem( tr( "Local" ), localMenu); 88// menuBar->insertItem( tr( "Local" ), localMenu);
89// menuBar->insertItem( tr( "Remote" ), remoteMenu); 89// menuBar->insertItem( tr( "Remote" ), remoteMenu);
90 menuBar->insertItem( tr( "View" ), tabMenu); 90 menuBar->insertItem( tr( "View" ), tabMenu);
91 91
92 tabMenu->insertItem( tr( "Local" ), localMenu); 92 tabMenu->insertItem( tr( "Local" ), localMenu);
93 tabMenu->insertItem( tr( "Remote" ), remoteMenu); 93 tabMenu->insertItem( tr( "Remote" ), remoteMenu);
94 94
95 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); 95 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
96 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); 96 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
97 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); 97 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
98 98
99 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 99 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
100 localMenu->insertSeparator(); 100 localMenu->insertSeparator();
101 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); 101 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() ));
102 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 102 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
103 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 103 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
104 localMenu->insertSeparator(); 104 localMenu->insertSeparator();
105 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 105 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
106 localMenu->setCheckable(TRUE); 106 localMenu->setCheckable(TRUE);
107 107
108 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 108 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
109 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 109 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
110 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 110 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
111 remoteMenu->insertSeparator(); 111 remoteMenu->insertSeparator();
112 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 112 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
113 113
114 tabMenu->insertSeparator(); 114 tabMenu->insertSeparator();
115 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 115 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
116 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 116 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
117 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 117 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
118 tabMenu->insertSeparator(); 118 tabMenu->insertSeparator();
119// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 119// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
120 tabMenu->setCheckable(TRUE); 120 tabMenu->setCheckable(TRUE);
121 121
122 122
123 123
124 cdUpButton = new QToolButton( this,"cdUpButton"); 124 cdUpButton = new QToolButton( this,"cdUpButton");
125 cdUpButton->setPixmap(Resource::loadPixmap("up")); 125 cdUpButton->setPixmap(Resource::loadPixmap("up"));
126 cdUpButton ->setFixedSize( QSize( 20, 20 ) ); 126 cdUpButton ->setFixedSize( QSize( 20, 20 ) );
127 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); 127 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
128 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); 128 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 );
129 cdUpButton->hide(); 129 cdUpButton->hide();
130 130
131// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); 131// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton");
132// docButton->setFixedSize( QSize( 20, 20 ) ); 132// docButton->setFixedSize( QSize( 20, 20 ) );
133// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); 133// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
134// docButton->setFlat(TRUE); 134// docButton->setFlat(TRUE);
135// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); 135// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 );
136 136
137 homeButton = new QToolButton(this,"homeButton"); 137 homeButton = new QToolButton(this,"homeButton");
138 homeButton->setPixmap( Resource::loadPixmap("home")); 138 homeButton->setPixmap( Resource::loadPixmap("home"));
139 homeButton->setFixedSize( QSize( 20, 20 ) ); 139 homeButton->setFixedSize( QSize( 20, 20 ) );
140 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); 140 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
141 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); 141 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4);
142 homeButton->hide(); 142 homeButton->hide();
143 143
144 TabWidget = new QTabWidget( this, "TabWidget" ); 144 TabWidget = new QTabWidget( this, "TabWidget" );
145 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); 145 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 );
146 146
147// TabWidget->setTabShape(QTabWidget::Triangular); 147// TabWidget->setTabShape(QTabWidget::Triangular);
148 148
149 tab = new QWidget( TabWidget, "tab" ); 149 tab = new QWidget( TabWidget, "tab" );
150 tabLayout = new QGridLayout( tab ); 150 tabLayout = new QGridLayout( tab );
151 tabLayout->setSpacing( 2); 151 tabLayout->setSpacing( 2);
152 tabLayout->setMargin( 2); 152 tabLayout->setMargin( 2);
153 153
154 Local_View = new QListView( tab, "Local_View" ); 154 Local_View = new QListView( tab, "Local_View" );
155// Local_View->setResizePolicy( QListView::AutoOneFit ); 155// Local_View->setResizePolicy( QListView::AutoOneFit );
156 Local_View->addColumn( tr("File"),150); 156 Local_View->addColumn( tr("File"),150);
157 Local_View->addColumn( tr("Date"),-1); 157 Local_View->addColumn( tr("Date"),-1);
158 Local_View->setColumnAlignment(1,QListView::AlignRight); 158 Local_View->setColumnAlignment(1,QListView::AlignRight);
159 Local_View->addColumn( tr("Size"),-1); 159 Local_View->addColumn( tr("Size"),-1);
160 Local_View->setColumnAlignment(2,QListView::AlignRight); 160 Local_View->setColumnAlignment(2,QListView::AlignRight);
161 Local_View->setAllColumnsShowFocus(TRUE); 161 Local_View->setAllColumnsShowFocus(TRUE);
162 162
163 Local_View->setMultiSelection( TRUE); 163 Local_View->setMultiSelection( TRUE);
164 Local_View->setSelectionMode(QListView::Extended); 164 Local_View->setSelectionMode(QListView::Extended);
165 Local_View->setFocusPolicy(QWidget::ClickFocus); 165 Local_View->setFocusPolicy(QWidget::ClickFocus);
166 166
167 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); 167 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index 7bd615a..f58778a 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -1,131 +1,131 @@
1/*************************************************************************** 1/***************************************************************************
2 opieftp.h 2 opieftp.h
3 ------------------- 3 -------------------
4** Created: Sat Mar 9 23:33:09 2002 4** Created: Sat Mar 9 23:33:09 2002
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12#ifndef OPIEFTP_H 12#ifndef OPIEFTP_H
13#define OPIEFTP_H 13#define OPIEFTP_H
14 14
15#include <qvariant.h> 15#include <qvariant.h>
16#include <qdialog.h> 16#include <qdialog.h>
17#include <qmainwindow.h> 17#include <qmainwindow.h>
18#include <qdir.h> 18#include <qdir.h>
19#include <qstring.h> 19#include <qstring.h>
20#include <qpoint.h> 20#include <qpoint.h>
21#include <qpixmap.h> 21#include <qpixmap.h>
22 22
23class QVBoxLayout; 23class QVBoxLayout;
24class QHBoxLayout; 24class QHBoxLayout;
25class QGridLayout; 25class QGridLayout;
26class QComboBox; 26class QComboBox;
27class QListView; 27class QListView;
28class QListViewItem; 28class QListViewItem;
29class QLabel; 29class QLabel;
30class QProgressBar; 30class QProgressBar;
31class QSpinBox; 31class QSpinBox;
32class QTabWidget; 32class QTabWidget;
33class QWidget; 33class QWidget;
34class QPEToolBar; 34class QPEToolBar;
35class QPEMenuBar; 35class QMenuBar;
36class QPopupMenu; 36class QPopupMenu;
37class QFile; 37class QFile;
38class QLineEdit; 38class QLineEdit;
39class QPushButton; 39class QPushButton;
40class QToolButton; 40class QToolButton;
41class QStringList; 41class QStringList;
42class QListBox; 42class QListBox;
43class QTimer; 43class QTimer;
44 44
45class OpieFtp : public QMainWindow 45class OpieFtp : public QMainWindow
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48 48
49public: 49public:
50 OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 50 OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
51 ~OpieFtp(); 51 ~OpieFtp();
52 52
53 static QString appName() { return QString::fromLatin1("opieftp"); } 53 static QString appName() { return QString::fromLatin1("opieftp"); }
54 QTabWidget *TabWidget; 54 QTabWidget *TabWidget;
55 QWidget *tab, *tab_2, *tab_3; 55 QWidget *tab, *tab_2, *tab_3;
56 QListView *Local_View, *Remote_View; 56 QListView *Local_View, *Remote_View;
57 QListBox *serverListView; 57 QListBox *serverListView;
58 58
59 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo; 59 QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo;
60 QLineEdit *PasswordEdit, *remotePath; 60 QLineEdit *PasswordEdit, *remotePath;
61 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; 61 QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;;
62 QSpinBox* PortSpinBox; 62 QSpinBox* PortSpinBox;
63 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu; 63 QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu;
64 QDir currentDir; 64 QDir currentDir;
65 QString currentRemoteDir; 65 QString currentRemoteDir;
66 QString filterStr; 66 QString filterStr;
67 QListViewItem * item; 67 QListViewItem * item;
68 QPushButton *connectServerBtn, *newServerButton;// 68 QPushButton *connectServerBtn, *newServerButton;//
69 QToolButton *cdUpButton, *homeButton, *docButton; 69 QToolButton *cdUpButton, *homeButton, *docButton;
70 bool b; 70 bool b;
71 int currentServerConfig; 71 int currentServerConfig;
72protected slots: 72protected slots:
73 void timerOut(); 73 void timerOut();
74 void upDir(); 74 void upDir();
75 void homeButtonPushed(); 75 void homeButtonPushed();
76 void docButtonPushed(); 76 void docButtonPushed();
77 void doAbout(); 77 void doAbout();
78 78
79 void serverComboEdited(const QString & ); 79 void serverComboEdited(const QString & );
80 void UsernameComboBoxEdited(const QString & ); 80 void UsernameComboBoxEdited(const QString & );
81 void PasswordEditEdited(const QString & ); 81 void PasswordEditEdited(const QString & );
82 82
83 void showLocalMenu( QListViewItem *); 83 void showLocalMenu( QListViewItem *);
84 void showRemoteMenu( QListViewItem *); 84 void showRemoteMenu( QListViewItem *);
85 void doLocalCd(); 85 void doLocalCd();
86 void doRemoteCd(); 86 void doRemoteCd();
87 void localUpload(); 87 void localUpload();
88 void remoteDownload(); 88 void remoteDownload();
89 void newConnection(); 89 void newConnection();
90 void connector(); 90 void connector();
91 void disConnector(); 91 void disConnector();
92 void populateLocalView(); 92 void populateLocalView();
93 bool populateRemoteView(); 93 bool populateRemoteView();
94 void showHidden(); 94 void showHidden();
95 void writeConfig(); 95 void writeConfig();
96 void readConfig(); 96 void readConfig();
97 void localListClicked(QListViewItem *); 97 void localListClicked(QListViewItem *);
98 void remoteListClicked(QListViewItem *); 98 void remoteListClicked(QListViewItem *);
99 void ListPressed( int, QListViewItem *, const QPoint&, int); 99 void ListPressed( int, QListViewItem *, const QPoint&, int);
100 void RemoteListPressed( int, QListViewItem *, const QPoint&, int); 100 void RemoteListPressed( int, QListViewItem *, const QPoint&, int);
101 void localMakDir(); 101 void localMakDir();
102 void localDelete(); 102 void localDelete();
103 void remoteMakDir(); 103 void remoteMakDir();
104 void remoteDelete(); 104 void remoteDelete();
105 105
106 bool remoteDirList(const QString &); 106 bool remoteDirList(const QString &);
107 bool remoteChDir(const QString &); 107 bool remoteChDir(const QString &);
108 108
109 void tabChanged(QWidget*); 109 void tabChanged(QWidget*);
110 void cleanUp(); 110 void cleanUp();
111 111
112 void remoteRename(); 112 void remoteRename();
113 void localRename(); 113 void localRename();
114 114
115 void currentPathComboChanged(); 115 void currentPathComboChanged();
116 void currentPathComboActivated(const QString &); 116 void currentPathComboActivated(const QString &);
117 void switchToLocalTab(); 117 void switchToLocalTab();
118 void switchToRemoteTab(); 118 void switchToRemoteTab();
119 void switchToConfigTab(); 119 void switchToConfigTab();
120 120
121 void fillCombos(); 121 void fillCombos();
122 void clearCombos(); 122 void clearCombos();
123 void fillRemoteCombo(const QString&); 123 void fillRemoteCombo(const QString&);
124 void fillCombo(const QString &); 124 void fillCombo(const QString &);
125 void serverComboSelected(int); 125 void serverComboSelected(int);
126 void deleteServer(); 126 void deleteServer();
127 void connectorBtnToggled(bool); 127 void connectorBtnToggled(bool);
128 void NewServer(); 128 void NewServer();
129 void serverListClicked( const QString &); 129 void serverListClicked( const QString &);
130 130
131protected: 131protected:
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 8f76cdd..95fbdcd 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -1,93 +1,93 @@
1#include <qpe/qpemenubar.h> 1#include <qpe/qpemenubar.h>
2#include <qpe/resource.h> 2#include <qpe/resource.h>
3#include <qpe/config.h> 3#include <qpe/config.h>
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qwhatsthis.h> 5#include <qwhatsthis.h>
6 6
7#include "mainwindow.h" 7#include "mainwindow.h"
8#include "ircservertab.h" 8#include "ircservertab.h"
9#include "ircserverlist.h" 9#include "ircserverlist.h"
10#include "ircsettings.h" 10#include "ircsettings.h"
11 11
12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
13 setCaption(tr("IRC Client")); 13 setCaption(tr("IRC Client"));
14 m_tabWidget = new IRCTabWidget(this); 14 m_tabWidget = new IRCTabWidget(this);
15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); 15 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 *))); 16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *)));
17 setCentralWidget(m_tabWidget); 17 setCentralWidget(m_tabWidget);
18 setToolBarsMovable(FALSE); 18 setToolBarsMovable(FALSE);
19 QPEMenuBar *menuBar = new QPEMenuBar(this); 19 QMenuBar *menuBar = new QMenuBar(this);
20 QPopupMenu *irc = new QPopupMenu(this); 20 QPopupMenu *irc = new QPopupMenu(this);
21 menuBar->insertItem(tr("IRC"), irc); 21 menuBar->insertItem(tr("IRC"), irc);
22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); 22 QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0);
23 connect(a, SIGNAL(activated()), this, SLOT(newConnection())); 23 connect(a, SIGNAL(activated()), this, SLOT(newConnection()));
24 a->setWhatsThis(tr("Create a new connection to an IRC server")); 24 a->setWhatsThis(tr("Create a new connection to an IRC server"));
25 a->addTo(irc); 25 a->addTo(irc);
26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); 26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0);
27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); 27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
28 connect(a, SIGNAL(activated()), this, SLOT(settings())); 28 connect(a, SIGNAL(activated()), this, SLOT(settings()));
29 a->addTo(irc); 29 a->addTo(irc);
30 loadSettings(); 30 loadSettings();
31} 31}
32 32
33/*IRCTabWidget MainWindow::getTabWidget(){ 33/*IRCTabWidget MainWindow::getTabWidget(){
34 return m_tabWidget; 34 return m_tabWidget;
35} */ 35} */
36 36
37void MainWindow::loadSettings() { 37void MainWindow::loadSettings() {
38 Config config("OpieIRC"); 38 Config config("OpieIRC");
39 config.setGroup("OpieIRC"); 39 config.setGroup("OpieIRC");
40 IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); 40 IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF");
41 IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); 41 IRCTab::m_textColor = config.readEntry("TextColor", "#000000");
42 IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); 42 IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000");
43 IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); 43 IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000");
44 IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); 44 IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB");
45 IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); 45 IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF");
46 IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); 46 IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300");
47 IRCTab::m_maxLines = config.readNumEntry("Lines", 100); 47 IRCTab::m_maxLines = config.readNumEntry("Lines", 100);
48} 48}
49 49
50void MainWindow::selected(QWidget *) { 50void MainWindow::selected(QWidget *) {
51 m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); 51 m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black);
52 emit updateScroll(); 52 emit updateScroll();
53} 53}
54 54
55void MainWindow::addTab(IRCTab *tab) { 55void MainWindow::addTab(IRCTab *tab) {
56 connect(tab, SIGNAL(changed(IRCTab *)), this, SLOT(changeEvent(IRCTab *))); 56 connect(tab, SIGNAL(changed(IRCTab *)), this, SLOT(changeEvent(IRCTab *)));
57 m_tabWidget->addTab(tab, tab->title()); 57 m_tabWidget->addTab(tab, tab->title());
58 m_tabWidget->showPage(tab); 58 m_tabWidget->showPage(tab);
59 tab->setID(m_tabWidget->currentPageIndex()); 59 tab->setID(m_tabWidget->currentPageIndex());
60 m_tabs.append(tab); 60 m_tabs.append(tab);
61} 61}
62 62
63void MainWindow::changeEvent(IRCTab *tab) { 63void MainWindow::changeEvent(IRCTab *tab) {
64 if (tab->id() != m_tabWidget->currentPageIndex()) 64 if (tab->id() != m_tabWidget->currentPageIndex())
65 m_tabWidget->setTabColor(tab->id(), blue); 65 m_tabWidget->setTabColor(tab->id(), blue);
66} 66}
67 67
68void MainWindow::killTab(IRCTab *tab) { 68void MainWindow::killTab(IRCTab *tab) {
69 m_tabWidget->removePage(tab); 69 m_tabWidget->removePage(tab);
70 m_tabs.remove(tab); 70 m_tabs.remove(tab);
71 /* there might be nicer ways to do this .. */ 71 /* there might be nicer ways to do this .. */
72 delete tab; 72 delete tab;
73} 73}
74 74
75void MainWindow::newConnection() { 75void MainWindow::newConnection() {
76 IRCServerList list(this, "ServerList", TRUE); 76 IRCServerList list(this, "ServerList", TRUE);
77 if (list.exec() == QDialog::Accepted && list.hasServer()) { 77 if (list.exec() == QDialog::Accepted && list.hasServer()) {
78 IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget); 78 IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget);
79 addTab(serverTab); 79 addTab(serverTab);
80 serverTab->doConnect(); 80 serverTab->doConnect();
81 } 81 }
82} 82}
83 83
84void MainWindow::settings() { 84void MainWindow::settings() {
85 IRCSettings settings(this, "Settings", TRUE); 85 IRCSettings settings(this, "Settings", TRUE);
86 if (settings.exec() == QDialog::Accepted) { 86 if (settings.exec() == QDialog::Accepted) {
87 QListIterator<IRCTab> it(m_tabs); 87 QListIterator<IRCTab> it(m_tabs);
88 for (; it.current(); ++it) { 88 for (; it.current(); ++it) {
89 /* Inform all tabs about the new settings */ 89 /* Inform all tabs about the new settings */
90 it.current()->settingsChanged(); 90 it.current()->settingsChanged();
91 } 91 }
92 } 92 }
93} 93}
diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO
index a1d5bee..0336417 100644
--- a/noncore/net/wellenreiter/TODO
+++ b/noncore/net/wellenreiter/TODO
@@ -1,4 +1,15 @@
1- save configuration settings
2- beep over headphone / customizable 1- beep over headphone / customizable
3- autoshow new nets - maybe in other color or more contrast
4 2
3- identification of probe requests
4 i.e. other sniffers around
5
6- decloaking of falsely reported zero-length SSIDs
7
8- option to run skript on
9 - new net
10 - new station
11 - <whatever>
12
13- adaptive hopping scheme !
14
15-