summaryrefslogtreecommitdiff
authorzecke <zecke>2005-02-19 17:26:15 (UTC)
committer zecke <zecke>2005-02-19 17:26:15 (UTC)
commit112337f13c70f1266430f154d486b6f23ec18488 (patch) (unidiff)
tree6869bbf5f7763b2a56ef690526275cae081dae83
parentb02c537198dad1e53f8c4004a4c08578e431b411 (diff)
downloadopie-112337f13c70f1266430f154d486b6f23ec18488.zip
opie-112337f13c70f1266430f154d486b6f23ec18488.tar.gz
opie-112337f13c70f1266430f154d486b6f23ec18488.tar.bz2
Make use of the platform
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/helpwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/apps/opie-gutenbrowser/helpwindow.cpp b/noncore/apps/opie-gutenbrowser/helpwindow.cpp
index 57b1e74..4bdac02 100644
--- a/noncore/apps/opie-gutenbrowser/helpwindow.cpp
+++ b/noncore/apps/opie-gutenbrowser/helpwindow.cpp
@@ -1,78 +1,81 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2** $Id$
3** 3**
4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
5** 5**
6** This file is part of an example program for Qt. This example 6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation. 7** program may be used, distributed and modified without limitation.
8** 8**
9 copyright : (C) 2000 -2004 by llornkcor 9 copyright : (C) 2000 -2004 by llornkcor
10 email : ljp@llornkcor.com 10 email : ljp@llornkcor.com
11*****************************************************************************/ 11*****************************************************************************/
12 12
13#include "helpwindow.h" 13#include "helpwindow.h"
14
15#include <qpe/global.h>
16
14#include <qstatusbar.h> 17#include <qstatusbar.h>
15 18
16#include <qmenubar.h> 19#include <qmenubar.h>
17#include <qtoolbar.h> 20#include <qtoolbar.h>
18#include <qtoolbutton.h> 21#include <qtoolbutton.h>
19#include <qcombobox.h> 22#include <qcombobox.h>
20 23
21#ifndef QT_NO_FILEDIALOG 24#ifndef QT_NO_FILEDIALOG
22#include <qfiledialog.h> 25#include <qfiledialog.h>
23#endif 26#endif
24 27
25#include <ctype.h> 28#include <ctype.h>
26 29
27HelpWindow::HelpWindow( const QString& home_, const QString&, QWidget* parent, const char *name ) 30HelpWindow::HelpWindow( const QString& home_, const QString&, QWidget* parent, const char *name )
28 : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL() 31 : QMainWindow( parent, name, WDestructiveClose ), pathCombo( 0 ), selectedURL()
29{ 32{
30 QString local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; 33 QString local_library = Global::applicationFileName("gutenbrowser", QString::null);
31// readHistory(); 34// readHistory();
32// readBookmarks(); 35// readBookmarks();
33 36
34 browser = new QTextBrowser( this ); 37 browser = new QTextBrowser( this );
35 QStringList Strlist; 38 QStringList Strlist;
36 Strlist.append( home_); 39 Strlist.append( home_);
37 browser->mimeSourceFactory()->setFilePath( Strlist ); 40 browser->mimeSourceFactory()->setFilePath( Strlist );
38 41
39 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 42 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
40 43
41 connect(browser,SIGNAL(textChanged()),this,SLOT(textChanged())); 44 connect(browser,SIGNAL(textChanged()),this,SLOT(textChanged()));
42 45
43 setCentralWidget( browser ); 46 setCentralWidget( browser );
44 47
45 if ( !home_.isEmpty() ) 48 if ( !home_.isEmpty() )
46 49
47//////////////////////////////// 50////////////////////////////////
48 browser->setSource( home_ ); 51 browser->setSource( home_ );
49 52
50//////////////////////////////// 53////////////////////////////////
51 connect( browser, SIGNAL( highlighted( const QString&) ), 54 connect( browser, SIGNAL( highlighted( const QString&) ),
52 statusBar(), SLOT( message( const QString&)) ); 55 statusBar(), SLOT( message( const QString&)) );
53 56
54// resize( 640,600 ); 57// resize( 640,600 );
55#ifdef Q_WS_QWS 58#ifdef Q_WS_QWS
56 setGeometry( 0,0,236,280); 59 setGeometry( 0,0,236,280);
57#else 60#else
58 setGeometry( 10,30,520,420 ); 61 setGeometry( 10,30,520,420 );
59// resize(520,420); 62// resize(520,420);
60#endif 63#endif
61 64
62 QPopupMenu* file = new QPopupMenu( this ); 65 QPopupMenu* file = new QPopupMenu( this );
63// file->insertItem( tr("&New Window"), this, SLOT( newWindow() ), ALT | Key_N ); 66// file->insertItem( tr("&New Window"), this, SLOT( newWindow() ), ALT | Key_N );
64 file->insertItem( tr("&Open File"), this, SLOT( openFile() ), ALT | Key_O ); 67 file->insertItem( tr("&Open File"), this, SLOT( openFile() ), ALT | Key_O );
65// file->insertItem( tr("&Print"), this, SLOT( print() ), ALT | Key_P ); 68// file->insertItem( tr("&Print"), this, SLOT( print() ), ALT | Key_P );
66 file->insertSeparator(); 69 file->insertSeparator();
67 file->insertItem( tr("&Close"), this, SLOT( close() ), ALT | Key_Q ); 70 file->insertItem( tr("&Close"), this, SLOT( close() ), ALT | Key_Q );
68// file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), ALT | Key_X ); 71// file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), ALT | Key_X );
69 72
70 // The same three icons are used twice each. 73 // The same three icons are used twice each.
71////F FIXME 74////F FIXME
72 QString pixs=(QDir::homeDirPath ()) +"/Applications/gutenbrowser/pix/"; 75 QString pixs=(QDir::homeDirPath ()) +"/Applications/gutenbrowser/pix/";
73 QIconSet icon_back( QPixmap(pixs+"back.png") ); 76 QIconSet icon_back( QPixmap(pixs+"back.png") );
74 QIconSet icon_forward( QPixmap(pixs+"forward.png") ); 77 QIconSet icon_forward( QPixmap(pixs+"forward.png") );
75 QIconSet icon_home( QPixmap(pixs+"home.png") ); 78 QIconSet icon_home( QPixmap(pixs+"home.png") );
76 79
77 QPopupMenu* go = new QPopupMenu( this ); 80 QPopupMenu* go = new QPopupMenu( this );
78 backwardId = go->insertItem( icon_back, tr("&Backward"), browser, SLOT( backward() ), ALT | Key_Left ); 81 backwardId = go->insertItem( icon_back, tr("&Backward"), browser, SLOT( backward() ), ALT | Key_Left );