summaryrefslogtreecommitdiff
path: root/noncore/net
authormickeyl <mickeyl>2003-12-07 14:06:21 (UTC)
committer mickeyl <mickeyl>2003-12-07 14:06:21 (UTC)
commit4518f62746143246d29eb9f08030e241ac33eeb7 (patch) (unidiff)
treebeda04d2c1ddadefd4d0dc2bb18774a15da03bf2 /noncore/net
parentc648101ca50a9782911b58b5158b31e1d0427ab3 (diff)
downloadopie-4518f62746143246d29eb9f08030e241ac33eeb7.zip
opie-4518f62746143246d29eb9f08030e241ac33eeb7.tar.gz
opie-4518f62746143246d29eb9f08030e241ac33eeb7.tar.bz2
s/QPEToolBar/QToolBar:
- remove usage of deprecated classses - makes it easier to migrate to OToolBar in the future
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp4
-rw-r--r--noncore/net/opieftp/opieftp.h2
-rw-r--r--noncore/net/opieirc/mainwindow.cpp2
-rw-r--r--noncore/net/ubrowser/mainview.cpp2
-rw-r--r--noncore/net/ubrowser/mainview.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 48629bf..3250627 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -1,46 +1,46 @@
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 <qmenubar.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;
@@ -48,49 +48,49 @@ static 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 QMenuBar *menuBar = new QMenuBar(this); 71 QMenuBar *menuBar = new QMenuBar(this);
72// QPEToolBar *menuBar = new QPEToolBar(this); 72// QToolBar *menuBar = new QToolBar(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() ));
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h
index f58778a..076a906 100644
--- a/noncore/net/opieftp/opieftp.h
+++ b/noncore/net/opieftp/opieftp.h
@@ -10,49 +10,49 @@
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 QToolBar;
35class QMenuBar; 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
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index 95fbdcd..be6f8ed 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -1,25 +1,25 @@
1#include <qpe/qpemenubar.h> 1#include <qmenubar.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 QMenuBar *menuBar = new QMenuBar(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);
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp
index 0d3f171..f299b54 100644
--- a/noncore/net/ubrowser/mainview.cpp
+++ b/noncore/net/ubrowser/mainview.cpp
@@ -3,49 +3,49 @@ Opie-uBrowser. a very small web browser, using on QTextBrowser for html display
3Copyright (C) 2002 Thomas Stephens 3Copyright (C) 2002 Thomas Stephens
4 4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later 6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7version. 7version.
8 8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/ 15*/
16 16
17 17
18#include "mainview.h" 18#include "mainview.h"
19 19
20MainView::MainView(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) 20MainView::MainView(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl)
21{ 21{
22 setIcon( Resource::loadPixmap( "remote" ) ); 22 setIcon( Resource::loadPixmap( "remote" ) );
23 setCaption(tr("uBrowser")); 23 setCaption(tr("uBrowser"));
24 24
25 setToolBarsMovable( false ); 25 setToolBarsMovable( false );
26 26
27 QPEToolBar *toolbar = new QPEToolBar(this, "toolbar"); 27 QToolBar *toolbar = new QToolBar(this, "toolbar");
28 back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back"); 28 back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back");
29 forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward"); 29 forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward");
30 home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home"); 30 home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home");
31 location = new QComboBox(true, toolbar, "location"); 31 location = new QComboBox(true, toolbar, "location");
32 go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go"); 32 go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go");
33 33
34 toolbar->setStretchableWidget(location); 34 toolbar->setStretchableWidget(location);
35 toolbar->setHorizontalStretchable(true); 35 toolbar->setHorizontalStretchable(true);
36 location->setAutoCompletion( true ); 36 location->setAutoCompletion( true );
37 37
38 addToolBar(toolbar); 38 addToolBar(toolbar);
39 39
40 browser = new QTextBrowser(this, "browser"); 40 browser = new QTextBrowser(this, "browser");
41 setCentralWidget(browser); 41 setCentralWidget(browser);
42 42
43//make the button take you to the location 43//make the button take you to the location
44 connect(go, SIGNAL(clicked()), this, SLOT(goClicked()) ); 44 connect(go, SIGNAL(clicked()), this, SLOT(goClicked()) );
45 connect(location->lineEdit(), SIGNAL(returnPressed()), this, SLOT(goClicked()) ); 45 connect(location->lineEdit(), SIGNAL(returnPressed()), this, SLOT(goClicked()) );
46 46
47//make back, forward and home do their thing (isnt QTextBrowser great?) 47//make back, forward and home do their thing (isnt QTextBrowser great?)
48 connect(back, SIGNAL(clicked()), browser, SLOT(backward()) ); 48 connect(back, SIGNAL(clicked()), browser, SLOT(backward()) );
49 connect(forward, SIGNAL(clicked()), browser, SLOT(forward()) ); 49 connect(forward, SIGNAL(clicked()), browser, SLOT(forward()) );
50 connect(home, SIGNAL(clicked()), browser, SLOT(home()) ); 50 connect(home, SIGNAL(clicked()), browser, SLOT(home()) );
51 51
diff --git a/noncore/net/ubrowser/mainview.h b/noncore/net/ubrowser/mainview.h
index cc63729..7ce890c 100644
--- a/noncore/net/ubrowser/mainview.h
+++ b/noncore/net/ubrowser/mainview.h
@@ -1,42 +1,42 @@
1/* 1/*
2Opie-uBrowser. a very small web browser, using on QTextBrowser for html display/parsing 2Opie-uBrowser. a very small web browser, using on QTextBrowser for html display/parsing
3Copyright (C) 2002 Thomas Stephens 3Copyright (C) 2002 Thomas Stephens
4 4
5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public 5This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later 6License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7version. 7version.
8 8
9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 9This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11Public License for more details. 11Public License for more details.
12 12
13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free 13You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 14Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15*/ 15*/
16 16
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18#include <qpe/qpetoolbar.h> 18#include <qtoolbar.h>
19#include <qpe/applnk.h> 19#include <qpe/applnk.h>
20 20
21#include <qapplication.h> 21#include <qapplication.h>
22#include <qmainwindow.h> 22#include <qmainwindow.h>
23#include <qwidget.h> 23#include <qwidget.h>
24#include <qtextbrowser.h> 24#include <qtextbrowser.h>
25#include <qtoolbutton.h> 25#include <qtoolbutton.h>
26#include <qcombobox.h> 26#include <qcombobox.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qdir.h> 29#include <qdir.h>
30 30
31#include <stdio.h> 31#include <stdio.h>
32 32
33#include "httpfactory.h" 33#include "httpfactory.h"
34 34
35class MainView : public QMainWindow 35class MainView : public QMainWindow
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38public: 38public:
39 static QString appName() { return QString::fromLatin1("ubrowser"); } 39 static QString appName() { return QString::fromLatin1("ubrowser"); }
40 MainView(QWidget *parent=0, const char *name=0, WFlags fl = 0); 40 MainView(QWidget *parent=0, const char *name=0, WFlags fl = 0);
41public slots: 41public slots:
42 void goClicked(); 42 void goClicked();