summaryrefslogtreecommitdiff
path: root/noncore/net/ubrowser/mainview.cpp
Unidiff
Diffstat (limited to 'noncore/net/ubrowser/mainview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/ubrowser/mainview.cpp2
1 files changed, 1 insertions, 1 deletions
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