summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp
index a226258..9473ba9 100644
--- a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp
+++ b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp
@@ -11,12 +11,13 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
//#include "gutenbrowserData.h"
#include "gutenbrowser.h"
+#include "multiline_ex.h"
/* OPIE */
#include <opie2/odebug.h>
#include <qpe/config.h>
#include <qpe/fontdatabase.h>
#include <qpe/menubutton.h>
@@ -58,13 +59,13 @@ void Gutenbrowser::initConfig() {
// msg = "chmod 755 " + local_library+"pix";
// system(msg);
// }
// #endif
}
- // odebug << "init file is " << iniFile << "" << oendl;
+ qDebug("init file is " + iniFile );;
#ifdef Q_WS_QWS
useSplitter=FALSE;
Config config("Gutenbrowser");
config.setGroup( "General" );
@@ -148,27 +149,27 @@ void Gutenbrowser::initConfig() {
config.setGroup("General");
QString qExit;
qExit=config.readEntry("queryExit","TRUE");
if(qExit=="TRUE") {
b_queryExit=TRUE;
-// odebug << "Please query before leaving the library." << oendl;
+qDebug("lease query before leaving the library.");;
} else {
-// odebug << "Please DO NOT query before leaving the library." << oendl;
+ qDebug("Please DO NOT query before leaving the library.");
b_queryExit=FALSE;
}
// bookmarks
// config.setGroup("Titles");
// QString tmpTitle=config.readEntry(file_name,"");
}// end initConfig()
void Gutenbrowser::initMenuBar()
{
-// odebug << "Starting menu init." << oendl;
+ qDebug("Starting menu init.");
// menuBar entry fileMenu
menubar = new QPEMenuBar(this);
fileMenu=new QPopupMenu();
fileMenu->insertItem(Resource::loadPixmap("gutenbrowser/openbook"),
"Open Local Library...", this, SLOT( OpenBtn()) );
@@ -208,17 +209,16 @@ void Gutenbrowser::initMenuBar()
topLayout->addLayout( menu, 0);
}
void Gutenbrowser::initButtonBar()
{
-//odebug << "Starting buttonbar init." << oendl;
+ qDebug("Starting buttonbar init.");
OpenButton = new QPushButton( this, "OpenButton" );
OpenButton->setFocusPolicy( QWidget::TabFocus );
-
LibraryButton = new QPushButton( this, "LibraryButton" );
LibraryButton->setFocusPolicy( QWidget::TabFocus );
BackButton = new QPushButton( this, "BackButton" );
BackButton->setFocusPolicy( QWidget::TabFocus );
BackButton->setAutoRepeat(TRUE);
@@ -242,13 +242,12 @@ void Gutenbrowser::initButtonBar()
lastBmkButton->setPopup(bookmarksMenu);
dictionaryButton = new QPushButton( this, "dictionaryButton" );
dictionaryButton->setFocusPolicy( QWidget::TabFocus );
InfoBar = new QPushButton( this, "Info_Bar" );
-// odebug << "Infobar" << oendl;
// if(!useSplitter) {
buttonsHidden=FALSE;
buttons2->setSpacing(2);
buttons2->addWidget(OpenButton, 0, AlignCenter);
buttons2->addWidget(LibraryButton, 0, AlignCenter);
@@ -259,49 +258,48 @@ void Gutenbrowser::initButtonBar()
buttons2->addWidget(lastBmkButton, 0, AlignCenter);
buttons2->addWidget(dictionaryButton, 0, AlignCenter);
buttons2->addWidget(InfoBar, 0, AlignCenter);
topLayout->setSpacing(0);
topLayout->addLayout( buttons2,0);
-
}
/* STATUSBAR*/
void Gutenbrowser::initStatusBar()
{
+ qDebug("statusbar");
// #ifndef Q_WS_QWS
// statusBar = new QStatusBar( this, "Status Bar");
// statusBar->message(IDS_STATUS_DEFAULT, 2000);
// #endif
}
void Gutenbrowser::initView()
{
// set the main widget here
// QFont defaultFont( "charter", 10, 50, 0 );
Lview = new MultiLine_Ex(this);
-
Config cfg("Gutenbrowser");
cfg.setGroup("Font");
FontDatabase fdb;
- QFont defaultFont=Lview->font();
+ QFont defaultFont = Lview->font();
QFontInfo fontInfo(defaultFont);
QString family = cfg.readEntry("Family", fontInfo.family());
QString style = cfg.readEntry("Style", fdb.styleString(defaultFont));
int i_size = cfg.readNumEntry("Size", fontInfo.pointSize()/10);
QString charSet = cfg.readEntry("CharSet", QFont::encodingName( fontInfo.charSet()) );
defaultFont = fdb.font(family,style,i_size,charSet);
- QString italic=cfg.readEntry("Italic","FALSE");
+ QString italic = cfg.readEntry("Italic","FALSE");
if(italic=="TRUE") {
- odebug << "Set Italic font" << oendl;
- defaultFont = fdb.font(family,"Regular",i_size,charSet); //workaround
+ qDebug("Set Italic font");;
+ defaultFont = fdb.font( family, "Regular", i_size,charSet); //workaround
defaultFont.setItalic(TRUE);
}
Lview->setFont( defaultFont);
update();
@@ -309,13 +307,13 @@ void Gutenbrowser::initView()
if( cfg.readBoolEntry("WordWrap", 1)) {
Lview->setWordWrap(QMultiLineEdit::WidgetWidth);
useWrap=true;
} else {
Lview->setWordWrap(QMultiLineEdit::NoWrap);
- useWrap=false;
+ useWrap = false;
}
mainList = new QListBox(this,"mainlist");
// QPEApplication::setStylusOperation( mainList->viewport(),QPEApplication::RightOnHold);
// mainList->showMaximized();
// mainList->setGeometry(2,30,230,160);
@@ -326,7 +324,8 @@ void Gutenbrowser::initView()
if(!showMainList) {
Lview->setText( "\nThis is gutenbrowser for the Sharp Zaurus.\nMake your self at home, sit back, relax and read something great. ");
} else
Lview->hide();
topLayout->addLayout( edits, 0);
+ qDebug("end initView");
}