summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/optionsDialogData.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/apps/opie-gutenbrowser/optionsDialogData.cpp b/noncore/apps/opie-gutenbrowser/optionsDialogData.cpp
index e03fa2c..772926a 100644
--- a/noncore/apps/opie-gutenbrowser/optionsDialogData.cpp
+++ b/noncore/apps/opie-gutenbrowser/optionsDialogData.cpp
@@ -1,171 +1,171 @@
1/*************************************************************************** 1/***************************************************************************
2 optionsDialogData.cpp - description 2 optionsDialogData.cpp - description
3 ------------------- 3 -------------------
4 begin : Tue Jul 25 2000 4 begin : Tue Jul 25 2000
5 copyright : (C) 2000 -2004 by llornkcor 5 copyright : (C) 2000 -2004 by llornkcor
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 ***************************************************************************/ 7 ***************************************************************************/
8/*************************************************************************** 8/***************************************************************************
9 * This program is free software; you can redistribute it and/or modify * 9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by * 10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or * 11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. * 12 * (at your option) any later version. *
13 ***************************************************************************/ 13 ***************************************************************************/
14#include <qpixmap.h> 14#include <qpixmap.h>
15#include "optionsDialog.h" 15#include "optionsDialog.h"
16#include "fontDialog.h" 16#include "fontDialog.h"
17 17
18#include <qlabel.h> 18#include <qlabel.h>
19#include <qpushbutton.h> 19#include <qpushbutton.h>
20#include <qlineedit.h> 20#include <qlineedit.h>
21#include <qcombobox.h> 21#include <qcombobox.h>
22 22
23void optionsDialog::initDialog() 23void optionsDialog::initDialog()
24{ 24{
25 QWidget *d = QApplication::desktop(); 25// QWidget *d = QApplication::desktop();
26 int width = d->width(); 26// int width = d->width();
27 int height = d->height(); 27// int height = d->height();
28 28
29 QGridLayout *layout = new QGridLayout( this ); 29 QGridLayout *layout = new QGridLayout( this );
30 layout->setSpacing(2); 30 layout->setSpacing(2);
31 layout->setMargin(2); 31 layout->setMargin(2);
32 32
33 tabWidget = new QTabWidget( this, "tabWidget" ); 33 tabWidget = new QTabWidget( this, "tabWidget" );
34 layout->addMultiCellWidget( tabWidget, 0, 0, 0, 3); 34 layout->addMultiCellWidget( tabWidget, 0, 0, 0, 3);
35 35
36 Widget2 = new QWidget( tabWidget, "Widget2" ); 36 Widget2 = new QWidget( tabWidget, "Widget2" );
37 37
38 QGridLayout *layout2 = new QGridLayout(Widget2 ); 38 QGridLayout *layout2 = new QGridLayout(Widget2 );
39 layout2->setSpacing(2); 39 layout2->setSpacing(2);
40 layout2->setMargin(2); 40 layout2->setMargin(2);
41 41
42// Http_CheckBox = new QCheckBox( Widget2, "Http_CheckBox" ); 42// Http_CheckBox = new QCheckBox( Widget2, "Http_CheckBox" );
43 43
44 QLabel *downLabel= new QLabel(Widget2,"Label1"); 44 QLabel *downLabel= new QLabel(Widget2,"Label1");
45 downLabel->setText("Download Directory:"); 45 downLabel->setText("Download Directory:");
46 downLabel->setMaximumHeight(30); 46 downLabel->setMaximumHeight(30);
47 47
48 downloadDirEdit = new QLineEdit(Widget2,"downloadDir"); 48 downloadDirEdit = new QLineEdit(Widget2,"downloadDir");
49 49
50// ComboBoxStyle = new QComboBox( FALSE, Widget2, "ComboBoxStyle" ); 50// ComboBoxStyle = new QComboBox( FALSE, Widget2, "ComboBoxStyle" );
51// ComboBoxStyle->insertItem( tr( "styleMetal") ); 51// ComboBoxStyle->insertItem( tr( "styleMetal") );
52// ComboBoxStyle->insertItem( tr( "styleWindows") ); 52// ComboBoxStyle->insertItem( tr( "styleWindows") );
53// ComboBoxStyle->insertItem( tr( "default style") ); 53// ComboBoxStyle->insertItem( tr( "default style") );
54 54
55 cb_queryExit = new QCheckBox( Widget2, "cb_queryExit" ); 55 cb_queryExit = new QCheckBox( Widget2, "cb_queryExit" );
56 cb_queryExit->setText("Query before exit."); 56 cb_queryExit->setText("Query before exit.");
57 57
58 useWordWrap_CheckBox = new QCheckBox( Widget2, "WordWrap_CheckBox" ); 58 useWordWrap_CheckBox = new QCheckBox( Widget2, "WordWrap_CheckBox" );
59 useWordWrap_CheckBox->setText("Use Word Wrap"); 59 useWordWrap_CheckBox->setText("Use Word Wrap");
60// Http_CheckBox->setText("Use pg index instead of ftp library index" ) ; 60// Http_CheckBox->setText("Use pg index instead of ftp library index" ) ;
61 Ftp_CheckBox = new QCheckBox( Widget2, "Ftp_CheckBox" ); 61 Ftp_CheckBox = new QCheckBox( Widget2, "Ftp_CheckBox" );
62 Ftp_CheckBox->setText("Use FTP"); 62 Ftp_CheckBox->setText("Use FTP");
63 Ftp_CheckBox->hide(); 63 Ftp_CheckBox->hide();
64 64
65 layout2->addMultiCellWidget( downLabel, 0, 0, 0, 2); 65 layout2->addMultiCellWidget( downLabel, 0, 0, 0, 2);
66 // downloadDirEdit->setMaximumWidth( 200); 66 // downloadDirEdit->setMaximumWidth( 200);
67 layout2->addMultiCellWidget( downloadDirEdit, 1, 1, 0, 0); 67 layout2->addMultiCellWidget( downloadDirEdit, 1, 1, 0, 0);
68 // layout2->addMultiCellWidget( ComboBoxStyle, 3, 3, 0, 0); 68 // layout2->addMultiCellWidget( ComboBoxStyle, 3, 3, 0, 0);
69 layout2->addMultiCellWidget( cb_queryExit, 2, 2, 0, 1); 69 layout2->addMultiCellWidget( cb_queryExit, 2, 2, 0, 1);
70 layout2->addMultiCellWidget( useWordWrap_CheckBox, 3, 3, 0, 1); 70 layout2->addMultiCellWidget( useWordWrap_CheckBox, 3, 3, 0, 1);
71 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 71 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
72 layout2->addItem( spacer, 4, 0 ); 72 layout2->addItem( spacer, 4, 0 );
73// downloadDirEdit->hide(); 73// downloadDirEdit->hide();
74 74
75////////////////////////////////////////////////////////// 75//////////////////////////////////////////////////////////
76 tabWidget->insertTab( Widget2, tr( "Main" ) ); 76 tabWidget->insertTab( Widget2, tr( "Main" ) );
77 77
78 Widget3 = new QWidget( tabWidget, "Widget3" ); 78 Widget3 = new QWidget( tabWidget, "Widget3" );
79 79
80 QGridLayout *layout3 = new QGridLayout(Widget3 ); 80 QGridLayout *layout3 = new QGridLayout(Widget3 );
81 layout3->setSpacing(2); 81 layout3->setSpacing(2);
82 layout3->setMargin(4); 82 layout3->setMargin(4);
83 83
84 TextLabel3 = new QLabel( Widget3, "TextLabel3" ); 84 TextLabel3 = new QLabel( Widget3, "TextLabel3" );
85 // TextLabel3->setProperty( "text", tr( "Current ftp server:/n" ) ); 85 // TextLabel3->setProperty( "text", tr( "Current ftp server:/n" ) );
86 ftp_QListBox_1 = new QListBox( Widget3, "ftp_QListBox_1" ); 86 ftp_QListBox_1 = new QListBox( Widget3, "ftp_QListBox_1" );
87 ftp_DownloadButton = new QPushButton( Widget3, "ftp_DownloadButton" ); 87 ftp_DownloadButton = new QPushButton( Widget3, "ftp_DownloadButton" );
88 88
89////////////////////////////////////////////////////////// 89//////////////////////////////////////////////////////////
90 tabWidget->insertTab( Widget3, tr( "FTP" ) ); 90 tabWidget->insertTab( Widget3, tr( "FTP" ) );
91 tab = new QWidget( tabWidget, "tab" ); 91 tab = new QWidget( tabWidget, "tab" );
92 92
93 TextLabel3_3 = new QLabel( tab, "TextLabel3_3" ); 93 TextLabel3_3 = new QLabel( tab, "TextLabel3_3" );
94 94
95// TextLabel4 = new QLabel( tab, "TextLabel4" ); 95// TextLabel4 = new QLabel( tab, "TextLabel4" );
96// TextLabel5 = new QLabel( tab, "TextLabel5" ); 96// TextLabel5 = new QLabel( tab, "TextLabel5" );
97 97
98 PushButton_Browse = new QPushButton( tab, "PushButton_Browse" ); 98 PushButton_Browse = new QPushButton( tab, "PushButton_Browse" );
99 99
100 ComboBox1 = new QComboBox( FALSE, tab, "ComboBox1" ); 100 ComboBox1 = new QComboBox( FALSE, tab, "ComboBox1" );
101 101
102 ComboBox1->insertItem( tr( "http://sailor.gutenberg.org" ) ); 102 ComboBox1->insertItem( tr( "http://sailor.gutenberg.org" ) );
103 ComboBox1->insertItem( tr( "http://www.prairienet.org/pg" ) ); 103 ComboBox1->insertItem( tr( "http://www.prairienet.org/pg" ) );
104 104
105 http_ListBox1 = new QListBox( tab, "http_ListBox1" ); 105 http_ListBox1 = new QListBox( tab, "http_ListBox1" );
106 106
107////////////////////////////////////////////////////////// 107//////////////////////////////////////////////////////////
108 tabWidget->insertTab( tab, tr( "HTTP" ) ); 108 tabWidget->insertTab( tab, tr( "HTTP" ) );
109 109
110 QGridLayout *layout4 = new QGridLayout(tab ); 110 QGridLayout *layout4 = new QGridLayout(tab );
111 layout4->setSpacing(2); 111 layout4->setSpacing(2);
112 layout4->setMargin(2); 112 layout4->setMargin(2);
113 113
114 fontDlg = new FontDialog( tabWidget,"FontDialog"); 114 fontDlg = new FontDialog( tabWidget,"FontDialog");
115// fontWidget= new QWidget( tabWidget, "fontWidget" ); 115// fontWidget= new QWidget( tabWidget, "fontWidget" );
116 tabWidget->insertTab( fontDlg,"Font"); 116 tabWidget->insertTab( fontDlg,"Font");
117// fontDlg = new FontDialog( fontWidget,"FontDialog"); 117// fontDlg = new FontDialog( fontWidget,"FontDialog");
118// fontDlg->show(); 118// fontDlg->show();
119 119
120 initConnections(); 120 initConnections();
121 121
122 ftp_DownloadButton->setText("New List"); 122 ftp_DownloadButton->setText("New List");
123 PushButton_Browse->setText("Browse"); 123 PushButton_Browse->setText("Browse");
124 124
125 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; 125 local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/";
126// config = new CConfigFile( local_library+"gutenbrowserrc"); 126// config = new CConfigFile( local_library+"gutenbrowserrc");
127 doOptions(); 127 doOptions();
128 128
129 layout3->addMultiCellWidget( ftp_DownloadButton, 0, 0, 1, 2); 129 layout3->addMultiCellWidget( ftp_DownloadButton, 0, 0, 1, 2);
130 layout3->addMultiCellWidget( TextLabel3, 1, 1, 0, 1); 130 layout3->addMultiCellWidget( TextLabel3, 1, 1, 0, 1);
131 layout3->addMultiCellWidget( ftp_QListBox_1, 2, 2, 0, 2); 131 layout3->addMultiCellWidget( ftp_QListBox_1, 2, 2, 0, 2);
132 132
133 TextLabel3_3->setMaximumHeight(50); 133 TextLabel3_3->setMaximumHeight(50);
134 layout4->addMultiCellWidget( PushButton_Browse, 0, 0, 1, 2); 134 layout4->addMultiCellWidget( PushButton_Browse, 0, 0, 1, 2);
135 layout4->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 1); 135 layout4->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 1);
136 layout4->addMultiCellWidget( http_ListBox1, 2, 3, 0, 2); 136 layout4->addMultiCellWidget( http_ListBox1, 2, 3, 0, 2);
137 layout4->addMultiCellWidget( ComboBox1, 4, 4, 0, 2); 137 layout4->addMultiCellWidget( ComboBox1, 4, 4, 0, 2);
138 setCaption(tr("Gutenbrowser Options")); 138 setCaption(tr("Gutenbrowser Options"));
139} 139}
140 140
141void optionsDialog::initConnections() { 141void optionsDialog::initConnections() {
142 // signals and slots connections 142 // signals and slots connections
143// connect( buttonOk, SIGNAL( clicked() ), this, SLOT( OnExit() ) ); 143// connect( buttonOk, SIGNAL( clicked() ), this, SLOT( OnExit() ) );
144// connect( fontChangeButton, SIGNAL( clicked() ), this, SLOT( changeFonts() ) ); 144// connect( fontChangeButton, SIGNAL( clicked() ), this, SLOT( changeFonts() ) );
145 145
146// connect( s_Browser, SIGNAL( activated(const QString&)), SLOT( goBrowser(const QString&) ) ); 146// connect( s_Browser, SIGNAL( activated(const QString&)), SLOT( goBrowser(const QString&) ) );
147// connect( Http_CheckBox, SIGNAL( clicked()), SLOT( httpCheckB()) ); 147// connect( Http_CheckBox, SIGNAL( clicked()), SLOT( httpCheckB()) );
148// connect( downloadDirEdit, SIGNAL(textChanged(const QString &)),SLOT( lineEditChanged(const QString &) )); 148// connect( downloadDirEdit, SIGNAL(textChanged(const QString &)),SLOT( lineEditChanged(const QString &) ));
149 149
150// connect( Ftp_CheckBox, SIGNAL( clicked()), SLOT( FtpCheckB()) ); 150// connect( Ftp_CheckBox, SIGNAL( clicked()), SLOT( FtpCheckB()) );
151// downloadLineEdit 151// downloadLineEdit
152 152
153// ftpsiteDlg 153// ftpsiteDlg
154 connect( ftp_DownloadButton, SIGNAL( released() ),this, SLOT( getSite() )); 154 connect( ftp_DownloadButton, SIGNAL( released() ),this, SLOT( getSite() ));
155 connect( ftp_QListBox_1, SIGNAL( clicked ( QListBoxItem *)),this, SLOT( getSelection( QListBoxItem *)) ); 155 connect( ftp_QListBox_1, SIGNAL( clicked ( QListBoxItem *)),this, SLOT( getSelection( QListBoxItem *)) );
156 156
157//browserDialog 157//browserDialog
158 connect( http_ListBox1, SIGNAL(highlighted ( int)),this, SLOT(select_title(int)) ); 158 connect( http_ListBox1, SIGNAL(highlighted ( int)),this, SLOT(select_title(int)) );
159 connect( PushButton_Browse, SIGNAL( clicked() ), SLOT( BrowseSelected() ) ); 159 connect( PushButton_Browse, SIGNAL( clicked() ), SLOT( BrowseSelected() ) );
160// connect( ComboBox1,SIGNAL(activated(int)),this,SLOT( setHttp(int))); 160// connect( ComboBox1,SIGNAL(activated(int)),this,SLOT( setHttp(int)));
161 161
162// connect( tabWidget,SIGNAL(currentChanged(QWidget *tabber)),SLOT( onTab( QWidget * tabber)) ); 162// connect( tabWidget,SIGNAL(currentChanged(QWidget *tabber)),SLOT( onTab( QWidget * tabber)) );
163 163
164 connect(cb_queryExit,SIGNAL(clicked()),SLOT( slotQueryExit()) ); 164 connect(cb_queryExit,SIGNAL(clicked()),SLOT( slotQueryExit()) );
165 // connect(ComboBoxStyle,SIGNAL(activated(int)),this,SLOT(setStyle(int))); 165 // connect(ComboBoxStyle,SIGNAL(activated(int)),this,SLOT(setStyle(int)));
166 connect( useWordWrap_CheckBox,SIGNAL( toggled(bool)),SLOT( slotWordWrap(bool)) ); 166 connect( useWordWrap_CheckBox,SIGNAL( toggled(bool)),SLOT( slotWordWrap(bool)) );
167} 167}
168 168
169void optionsDialog::listBoxMainSel( int index) { 169void optionsDialog::listBoxMainSel( int index) {
170 tabWidget->setCurrentPage( index); 170 tabWidget->setCurrentPage( index);
171} 171}