summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/helpme.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/helpme.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/helpme.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-gutenbrowser/helpme.cpp b/noncore/apps/opie-gutenbrowser/helpme.cpp
index 53e0236..0e23114 100644
--- a/noncore/apps/opie-gutenbrowser/helpme.cpp
+++ b/noncore/apps/opie-gutenbrowser/helpme.cpp
@@ -1,127 +1,127 @@
1/*************************************************************************** 1/***************************************************************************
2 helpme.cpp - description 2 helpme.cpp - description
3 ------------------- 3 -------------------
4 begin : Tue Jul 25 2000 4 begin : Tue Jul 25 2000
5 begin : Sat Dec 4 1999 5 begin : Sat Dec 4 1999
6 copyright : (C) 2000 -2004 by llornkcor 6 copyright : (C) 2000 -2004 by llornkcor
7 email : ljp@llornkcor.com 7 email : ljp@llornkcor.com
8 ***************************************************************************/ 8 ***************************************************************************/
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include "helpme.h" 18#include "helpme.h"
19#include "helpwindow.h" 19#include "helpwindow.h"
20 20
21/* OPIE */ 21/* OPIE */
22#include <qpe/qcopenvelope_qws.h> 22#include <qpe/qcopenvelope_qws.h>
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24#include <opie2/odebug.h> 24#include <opie2/odebug.h>
25 25
26/* QT */ 26/* QT */
27#include <qprogressdialog.h> 27#include <qprogressdialog.h>
28#include <qlayout.h> 28#include <qlayout.h>
29 29
30/* STD */ 30/* STD */
31#include <sys/stat.h> 31#include <sys/stat.h>
32#include <unistd.h> 32#include <unistd.h>
33 33
34HelpMe::HelpMe(QWidget *parent, QString name ) : QDialog(parent,name) 34HelpMe::HelpMe(QWidget *parent, QString name ) : QDialog(parent,name)
35{ 35{
36 local_library = ( QDir::homeDirPath ())+"/Applications/gutenbrowser/"; 36 local_library = ( QDir::homeDirPath ())+"/Applications/gutenbrowser/";
37 setCaption(tr("Gutenbrowser About " VERSION)); 37 setCaption(tr("Gutenbrowser About " VERSION));
38 38
39 QGridLayout *layout = new QGridLayout( this ); 39 QGridLayout *layout = new QGridLayout( this );
40 layout->setSpacing( 4 ); 40 layout->setSpacing( 4 );
41 layout->setMargin( 4 ); 41 layout->setMargin( 4 );
42 42
43 Edit = new QMultiLineEdit(this, ""); 43 Edit = new QMultiLineEdit(this, "");
44 Edit->setReadOnly(true); 44 Edit->setReadOnly(true);
45 Edit->append(tr("Based on gutenbook.pl, available from http://www.gutenbook.org")); 45 Edit->append(tr("Based on gutenbook.pl, available from http://www.gutenbook.org"));
46 Edit->append(tr("Much appreciation to Lee Burgess,")); 46 Edit->append(tr("Much appreciation to Lee Burgess,"));
47 Edit->append(tr("for the original idea and concept of gutenbook.\n")); 47 Edit->append(tr("for the original idea and concept of gutenbook.\n"));
48 Edit->append(tr("A list of current Gutenberg ftp sites is at http://promo.net/pg/index.html\n")); 48 Edit->append(tr("A list of current Gutenberg ftp sites is at http://promo.net/pg/index.html\n"));
49 Edit->append(tr("For bug reports, comments or questions about Gutenbrowser, email")); 49 Edit->append(tr("For bug reports, comments or questions about Gutenbrowser, email"));
50 Edit->append(tr("ljp@llornkcor.com\n")); 50 Edit->append(tr("ljp@llornkcor.com\n"));
51 Edit->append(tr("\nMade using Qt, Qt Embedded, and Qtopia, a cross platform development API\nhttp://www.trolltech.com\n\n")); 51 Edit->append(tr("\nMade using Qt, Qt Embedded, and Qtopia, a cross platform development API\nhttp://www.trolltech.com\n\n"));
52 Edit->append(tr("Arnold's Laws of Documentation:")); 52 Edit->append(tr("Arnold's Laws of Documentation:"));
53 Edit->append(tr("(1) If it should exist, it doesn't.")); 53 Edit->append(tr("(1) If it should exist, it doesn't."));
54 Edit->append(tr("(2) If it does exist, it's out of date.")); 54 Edit->append(tr("(2) If it does exist, it's out of date."));
55 Edit->append(tr("(3) Only documentation for")); 55 Edit->append(tr("(3) Only documentation for"));
56 Edit->append(tr("useless programs transcends the")); 56 Edit->append(tr("useless programs transcends the"));
57 Edit->append(tr("first two laws.\n")); 57 Edit->append(tr("first two laws.\n"));
58 Edit->append(tr("Everything is temporary, anyway....\n :o)")); 58 Edit->append(tr("Everything is temporary, anyway....\n :o)"));
59 Edit->setWordWrap(QMultiLineEdit::WidgetWidth); 59 Edit->setWordWrap(QMultiLineEdit::WidgetWidth);
60 QString pixDir; 60 QString pixDir;
61 pixDir=QPEApplication::qpeDir()+"/pics/"; 61 pixDir=QPEApplication::qpeDir()+"pics/";
62 QPushButton *help; 62 QPushButton *help;
63 help = new QPushButton(this); 63 help = new QPushButton(this);
64 help->setPixmap( QPixmap( pixDir+"gutenbrowser/help.png")); 64 help->setPixmap( QPixmap( pixDir+"gutenbrowser/help.png"));
65 help->setText("Help"); 65 help->setText("Help");
66 connect( help,SIGNAL(clicked()),this,SLOT( help() )); 66 connect( help,SIGNAL(clicked()),this,SLOT( help() ));
67 67
68/* QPushButton *ok; 68/* QPushButton *ok;
69 ok = new QPushButton(this); 69 ok = new QPushButton(this);
70 ok->setPixmap( QPixmap( pixDir+"/gutenbrowser/exit.png")); 70 ok->setPixmap( QPixmap( pixDir+"/gutenbrowser/exit.png"));
71 ok->setText("ok"); 71 ok->setText("ok");
72 connect(ok,SIGNAL(clicked()),this,SLOT(accept() )); 72 connect(ok,SIGNAL(clicked()),this,SLOT(accept() ));
73*/ 73*/
74 help->setFixedHeight(25); 74 help->setFixedHeight(25);
75// ok->setFixedHeight(25); 75// ok->setFixedHeight(25);
76 76
77// layout->addMultiCellWidget( ok, 0, 0, 4, 4 ); 77// layout->addMultiCellWidget( ok, 0, 0, 4, 4 );
78 layout->addMultiCellWidget( help, 0, 0, 4, 4 ); 78 layout->addMultiCellWidget( help, 0, 0, 4, 4 );
79 layout->addMultiCellWidget( Edit, 1, 1, 0, 4 ); 79 layout->addMultiCellWidget( Edit, 1, 1, 0, 4 );
80} 80}
81 81
82HelpMe::~HelpMe() 82HelpMe::~HelpMe()
83{ 83{
84//delete Edit; 84//delete Edit;
85 85
86} 86}
87 87
88void HelpMe::goToURL() 88void HelpMe::goToURL()
89{ 89{
90 90
91 url = "http://www.llornkcor.com/"; 91 url = "http://www.llornkcor.com/";
92 goGetit( url); 92 goGetit( url);
93} 93}
94 94
95void HelpMe::goToURL2() 95void HelpMe::goToURL2()
96{ 96{
97 url = "http://www.gutenberg.org"; 97 url = "http://www.gutenberg.org";
98 goGetit( url); 98 goGetit( url);
99} 99}
100 100
101void HelpMe::goToURL3() 101void HelpMe::goToURL3()
102{ 102{
103 url = "http://www.gutenbook.org"; 103 url = "http://www.gutenbook.org";
104 goGetit( url); 104 goGetit( url);
105} 105}
106 106
107void HelpMe::goGetit( QString url) 107void HelpMe::goGetit( QString url)
108{ 108{
109 HelpWindow *help = new HelpWindow( url, ".", 0, "gutenbrowser"); 109 HelpWindow *help = new HelpWindow( url, ".", 0, "gutenbrowser");
110 help->setCaption("Qt Example - Helpviewer"); 110 help->setCaption("Qt Example - Helpviewer");
111 help->showMaximized(); 111 help->showMaximized();
112 help->show(); 112 help->show();
113} 113}
114 114
115void HelpMe::help() 115void HelpMe::help()
116{ 116{
117 QString msg ; 117 QString msg ;
118 msg=QPEApplication::qpeDir()+"help/html/gutenbrowser-index.html"; // or where ever this ends up to be 118 msg=QPEApplication::qpeDir()+"help/html/gutenbrowser-index.html"; // or where ever this ends up to be
119odebug << msg << oendl; 119odebug << msg << oendl;
120 QString url = "file://"+msg; 120 QString url = "file://"+msg;
121 goGetit( url); 121 goGetit( url);
122 122
123// QCopEnvelope e("QPE/Application/helpbrowser", "setDocument(QString)" ); 123// QCopEnvelope e("QPE/Application/helpbrowser", "setDocument(QString)" );
124// e << msg; 124// e << msg;
125 125
126// goGetit( msg); 126// goGetit( msg);
127} 127}