summaryrefslogtreecommitdiff
path: root/noncore/net/ubrowser
authormickeyl <mickeyl>2003-10-29 18:18:19 (UTC)
committer mickeyl <mickeyl>2003-10-29 18:18:19 (UTC)
commit1af1f1d9f398d38a2bc666cd2edff5725da7a770 (patch) (unidiff)
treeb3bb0d90cafc1e933b5b9297a7b2669ce3b184ea /noncore/net/ubrowser
parent35615947e11575a61456c8483e7f6d67fe59d5ed (diff)
downloadopie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.zip
opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.gz
opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.bz2
mrege noncore/net/*
Diffstat (limited to 'noncore/net/ubrowser') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/ubrowser/main.cpp13
-rw-r--r--noncore/net/ubrowser/mainview.cpp2
-rw-r--r--noncore/net/ubrowser/mainview.h3
-rw-r--r--noncore/net/ubrowser/ubrowser.pro4
4 files changed, 8 insertions, 14 deletions
diff --git a/noncore/net/ubrowser/main.cpp b/noncore/net/ubrowser/main.cpp
index e4a873d..0488cfd 100644
--- a/noncore/net/ubrowser/main.cpp
+++ b/noncore/net/ubrowser/main.cpp
@@ -1,29 +1,24 @@
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/qpeapplication.h> 17#include <qpe/qpeapplication.h>
18 18
19#include "mainview.h" 19#include "mainview.h"
20 20
21int main( int argc, char **argv ) 21#include <opie/oapplicationfactory.h>
22{ 22
23 QPEApplication a( argc, argv ); 23OPIE_EXPORT_APP( OApplicationFactory<MainView> )
24 MainView w; 24
25
26 //a.setMainWidget( &w );
27 a.showMainDocumentWidget( &w );
28 return a.exec();
29}
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp
index 9302f05..0d3f171 100644
--- a/noncore/net/ubrowser/mainview.cpp
+++ b/noncore/net/ubrowser/mainview.cpp
@@ -1,44 +1,44 @@
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 17
18#include "mainview.h" 18#include "mainview.h"
19 19
20MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name) 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 QPEToolBar *toolbar = new QPEToolBar(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()) );
diff --git a/noncore/net/ubrowser/mainview.h b/noncore/net/ubrowser/mainview.h
index 20e2c70..cc63729 100644
--- a/noncore/net/ubrowser/mainview.h
+++ b/noncore/net/ubrowser/mainview.h
@@ -15,38 +15,39 @@ Software 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 <qpe/qpetoolbar.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 MainView(QWidget *parent=0, const char *name=0); 39 static QString appName() { return QString::fromLatin1("ubrowser"); }
40 MainView(QWidget *parent=0, const char *name=0, WFlags fl = 0);
40public slots: 41public slots:
41 void goClicked(); 42 void goClicked();
42 void textChanged(); 43 void textChanged();
43 void setDocument( const QString& applnk_filename ); 44 void setDocument( const QString& applnk_filename );
44private: 45private:
45 QToolButton *back; 46 QToolButton *back;
46 QToolButton *forward; 47 QToolButton *forward;
47 QToolButton *home; 48 QToolButton *home;
48 QToolButton *go; 49 QToolButton *go;
49 QComboBox *location; 50 QComboBox *location;
50 QTextBrowser *browser; 51 QTextBrowser *browser;
51 HttpFactory *http; 52 HttpFactory *http;
52}; 53};
diff --git a/noncore/net/ubrowser/ubrowser.pro b/noncore/net/ubrowser/ubrowser.pro
index a6943dd..ed00047 100644
--- a/noncore/net/ubrowser/ubrowser.pro
+++ b/noncore/net/ubrowser/ubrowser.pro
@@ -1,13 +1,11 @@
1 TEMPLATE=app 1 CONFIG +=qt warn_on release quick-app
2 CONFIG +=qt warn_on release
3 DESTDIR =../../../bin
4 HEADERS = mainview.h httpfactory.h 2 HEADERS = mainview.h httpfactory.h
5 SOURCES = main.cpp mainview.cpp httpfactory.cpp 3 SOURCES = main.cpp mainview.cpp httpfactory.cpp
6 INCLUDEPATH+=../../../include 4 INCLUDEPATH+=../../../include
7 DEPENDPATH+=../../../include 5 DEPENDPATH+=../../../include
8 LIBS += -lqpe 6 LIBS += -lqpe
9TARGET = ubrowser 7TARGET = ubrowser
10 8
11 9
12 10
13include ( $(OPIEDIR)/include.pro ) 11include ( $(OPIEDIR)/include.pro )