author | zecke <zecke> | 2004-03-14 17:01:11 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 17:01:11 (UTC) |
commit | 64820b76cc9d1c06a6967cd34114f3b95896aaeb (patch) (side-by-side diff) | |
tree | 0d285b9d61392587b38f779688f518070a9e3e7b | |
parent | 52169e2469a1edcca986e9f0404c3ca815d5833b (diff) | |
download | opie-64820b76cc9d1c06a6967cd34114f3b95896aaeb.zip opie-64820b76cc9d1c06a6967cd34114f3b95896aaeb.tar.gz opie-64820b76cc9d1c06a6967cd34114f3b95896aaeb.tar.bz2 |
Only use ODP
6 files changed, 17 insertions, 18 deletions
diff --git a/noncore/apps/opie-reader/config.in b/noncore/apps/opie-reader/config.in index 9f1e02e..8ade941 100644 --- a/noncore/apps/opie-reader/config.in +++ b/noncore/apps/opie-reader/config.in @@ -1,4 +1,4 @@ config OPIE-READER boolean "opie-reader (E-Text reader)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/noncore/apps/qashmoney/config.in b/noncore/apps/qashmoney/config.in index 94c39b6..91739fe 100644 --- a/noncore/apps/qashmoney/config.in +++ b/noncore/apps/qashmoney/config.in @@ -1,4 +1,4 @@ config QASHMONEY boolean "opie-qashmoney (money manager)" default "n" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp index f90a5f8..6059e9b 100644 --- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp +++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp @@ -1,129 +1,129 @@ /*************************************************************************** katesyntaxdocument.cpp - description ------------------- begin : Sat 31 March 2001 copyright : (C) 2001,2002 by Joseph Wenninger email : jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "katesyntaxdocument.h" #include <kateconfig.h> #include <qfile.h> #include <kdebug.h> #include <kstddirs.h> #include <klocale.h> #include <kmessagebox.h> #include <qstringlist.h> #include <kglobal.h> #include <qpe/qpeapplication.h> #include <qdir.h> SyntaxDocument::SyntaxDocument() { m_root=0; currentFile=""; setupModeList(); } void SyntaxDocument::setIdentifier(const QString& identifier) { #warning FIXME delete m_root; - m_root=Opie::XMLElement::load(identifier); + m_root=Opie::Core::XMLElement::load(identifier); if (!m_root) KMessageBox::error( 0L, i18n("Can't open %1").arg(identifier) ); } SyntaxDocument::~SyntaxDocument() { } void SyntaxDocument::setupModeList(bool force) { if (myModeList.count() > 0) return; KateConfig *config=KGlobal::config(); KStandardDirs *dirs = KGlobal::dirs(); // QStringList list=dirs->findAllResources("data","kate/syntax/*.xml",false,true); QString path=QPEApplication::qpeDir() +"share/tinykate/syntax/"; QDir dir(path); QStringList list=dir.entryList("*.xml"); for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { QString Group="Highlighting_Cache"+path+*it; if ((config->hasGroup(Group)) && (!force)) { config->setGroup(Group); syntaxModeListItem *mli=new syntaxModeListItem; mli->name = config->readEntry("name",""); mli->section = config->readEntry("section",""); mli->mimetype = config->readEntry("mimetype",""); mli->extension = config->readEntry("extension",""); mli->identifier = path+*it; myModeList.append(mli); } else { qDebug("Found a description file:"+path+(*it)); setIdentifier(path+(*it)); - Opie::XMLElement *e=m_root; + Opie::Core::XMLElement *e=m_root; if (e) { e=e->firstChild(); qDebug(e->tagName()); if (e->tagName()=="language") { syntaxModeListItem *mli=new syntaxModeListItem; mli->name = e->attribute("name"); mli->section = e->attribute("section"); mli->mimetype = e->attribute("mimetype"); mli->extension = e->attribute("extensions"); qDebug(QString("valid description for: %1/%2").arg(mli->section).arg(mli->name)); if (mli->section.isEmpty()) mli->section=i18n("Other"); mli->identifier = path+(*it); config->setGroup(Group); config->writeEntry("name",mli->name); config->writeEntry("section",mli->section); config->writeEntry("mimetype",mli->mimetype); config->writeEntry("extension",mli->extension); myModeList.append(mli); } } } } config->write(); // config->sync(); } SyntaxModeList SyntaxDocument::modeList() { return myModeList; } bool SyntaxDocument::nextGroup( syntaxContextData* data) { if(!data) return false; if (!data->currentGroup) data->currentGroup=data->parent->firstChild(); else data->currentGroup=data->currentGroup->nextChild(); data->item=0; if (!data->currentGroup) return false; @@ -150,157 +150,157 @@ QString SyntaxDocument::groupItemData( syntaxContextData* data,QString name) { if(!data) return QString::null; if ( (data->item) && (name.isEmpty())) return data->item->tagName(); if (data->item) return data->item->attribute(name); else return QString(); } QString SyntaxDocument::groupData( syntaxContextData* data,QString name) { if(!data) return QString::null; if (data->currentGroup) return data->currentGroup->attribute(name); else return QString(); } void SyntaxDocument::freeGroupInfo( syntaxContextData* data) { if (data) delete data; } syntaxContextData* SyntaxDocument::getSubItems(syntaxContextData* data) { syntaxContextData *retval=new syntaxContextData; retval->parent=0; retval->currentGroup=0; retval->item=0; if (data != 0) { retval->parent=data->currentGroup; retval->currentGroup=data->item; retval->item=0; } return retval; } syntaxContextData* SyntaxDocument::getConfig(const QString& mainGroupName, const QString &Config) { - Opie::XMLElement *e = m_root->firstChild()->firstChild(); + Opie::Core::XMLElement *e = m_root->firstChild()->firstChild(); while (e) { kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (outer loop) " <<endl; if (e->tagName().compare(mainGroupName)==0 ) { - Opie::XMLElement *e1=e->firstChild(); + Opie::Core::XMLElement *e1=e->firstChild(); while (e1) { kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (inner loop) " <<endl; if (e1->tagName()==Config) { syntaxContextData *data=new ( syntaxContextData); data->currentGroup=0; data->parent=0; data->item=e1; return data; } e1=e1->nextChild(); } kdDebug(13010) << "WARNING :returning null 3"<< endl; return 0; } e=e->nextChild(); } kdDebug(13010) << "WARNING :returning null 4" << endl; return 0; } syntaxContextData* SyntaxDocument::getGroupInfo(const QString& mainGroupName, const QString &group) { - Opie::XMLElement *e=m_root->firstChild()->firstChild(); + Opie::Core::XMLElement *e=m_root->firstChild()->firstChild(); while (e) { kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (outer loop) " <<endl; if (e->tagName().compare(mainGroupName)==0 ) { - Opie::XMLElement *e1=e->firstChild(); + Opie::Core::XMLElement *e1=e->firstChild(); while (e1) { kdDebug(13010)<<"in SyntaxDocument::getGroupInfo (inner loop) " <<endl; if (e1->tagName()==group+"s") { syntaxContextData *data=new ( syntaxContextData); data->parent=e1; data->currentGroup=0; data->item=0; return data; } e1=e1->nextChild(); } kdDebug(13010) << "WARNING : getGroupInfo returning null :1 " << endl; return 0; } e=e->nextChild(); } kdDebug(13010) << "WARNING : getGroupInfo returning null :2" << endl; return 0; } QStringList& SyntaxDocument::finddata(const QString& mainGroup,const QString& type,bool clearList) { - Opie::XMLElement *e = m_root->firstChild(); + Opie::Core::XMLElement *e = m_root->firstChild(); if (clearList) m_data.clear(); for(e=e->firstChild(); e; e=e->nextChild()) { if (e->tagName()==mainGroup) { - for (Opie::XMLElement *e1=e->firstChild();e1;e1=e1->nextChild()) + for (Opie::Core::XMLElement *e1=e->firstChild();e1;e1=e1->nextChild()) { if (e1->tagName()!="list") continue; if (e1->attribute("name")==type) { - for (Opie::XMLElement *e2=e1->firstChild();e2;e2=e2->nextChild()) + for (Opie::Core::XMLElement *e2=e1->firstChild();e2;e2=e2->nextChild()) { qDebug("FOUND A LIST ENTRY("+e2->tagName()+"):"+e2->firstChild()->value()); m_data+=e2->firstChild()->value().stripWhiteSpace(); } break; } } break; } } return m_data; } diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.h b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.h index 5eefc77..072f5f0 100644 --- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.h +++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.h @@ -1,73 +1,73 @@ /*************************************************************************** katesyntaxdocument.h - description ------------------- begin : Sat 31 March 2001 copyright : (C) 2001,2002 by Joseph Wenninger email : jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef SYNTAXDOCUMENT_H #define SYNTAXDOCUMENT_H #include <opie2/xmltree.h> #include <qlist.h> #include <qstringlist.h> class syntaxModeListItem { public: QString name; QString section; QString mimetype; QString extension; QString identifier; }; class syntaxContextData { public: - Opie::XMLElement *parent; - Opie::XMLElement *currentGroup; - Opie::XMLElement *item; + Opie::Core::XMLElement *parent; + Opie::Core::XMLElement *currentGroup; + Opie::Core::XMLElement *item; }; typedef QList<syntaxModeListItem> SyntaxModeList; class SyntaxDocument { public: SyntaxDocument(); ~SyntaxDocument(); QStringList& finddata(const QString& mainGroup,const QString& type,bool clearList=true); SyntaxModeList modeList(); syntaxContextData* getGroupInfo(const QString& langName, const QString &group); void freeGroupInfo(syntaxContextData* data); syntaxContextData* getConfig(const QString& mainGroupName, const QString &Config); bool nextItem(syntaxContextData* data); bool nextGroup(syntaxContextData* data); syntaxContextData* getSubItems(syntaxContextData* data); QString groupItemData(syntaxContextData* data,QString name); QString groupData(syntaxContextData* data,QString name); void setIdentifier(const QString& identifier); private: - Opie::XMLElement *m_root; + Opie::Core::XMLElement *m_root; void setupModeList(bool force=false); QString currentFile; SyntaxModeList myModeList; QStringList m_data; }; #endif diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp index c3a0a2e..f82356b 100644 --- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp +++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp @@ -3,97 +3,96 @@ ------------------- copyright : (C) 2001 by The Kate Team (C) 2002 by Joseph Wenninger email : kwrite-devel@kde.org jowenn@kde.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ // Dialogs #include <stdio.h> #include <stdlib.h> #include <qgrid.h> #include <qlabel.h> #include <qlayout.h> #include <qlistbox.h> #include <qgroupbox.h> #include <qlineedit.h> #include <qcheckbox.h> #include <qcollection.h> #include <qpushbutton.h> #include <qobjectlist.h> #include <qradiobutton.h> #include <qwhatsthis.h> #include <qstringlist.h> #include <klocale.h> #include <kcolorbtn.h> #include <kglobal.h> #include <qvbox.h> #include <qspinbox.h> #include <qcombobox.h> #include <kfontdialog.h> #include "../document/katedocument.h" #include "kateviewdialog.h" #include <opie2/ofontselector.h> using namespace Opie::Ui; -using namespace Opie::Ui; SearchDialog::SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags ) : KDialogBase( parent, 0L, true, i18n( "Find Text" ), Ok | Cancel, Ok ) , m_replace( 0L ) { QWidget *page = new QWidget( this ); setMainWidget( page ); QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); m_search = new QComboBox( true, page ); m_search->insertStringList( searchFor ); m_search->setMinimumWidth( m_search->sizeHint().width() ); m_search->lineEdit()->selectAll(); QLabel *label = new QLabel( m_search, i18n( "&Text To Find:" ), page ); m_optRegExp = new QCheckBox( i18n( "Regular Expression" ), page ); topLayout->addWidget( label ); topLayout->addWidget( m_search ); topLayout->addWidget( m_optRegExp ); if( flags & KateView::sfReplace ) { // make it a replace dialog setCaption( i18n( "Replace Text" ) ); m_replace = new QComboBox( true, page ); m_replace->insertStringList( replaceWith ); m_replace->setMinimumWidth( m_search->sizeHint().width() ); label = new QLabel( m_replace, i18n( "&Replace With:" ), page ); //m_optPlaceholders = new QCheckBox( i18n( "&Use Placeholders" ), page ); topLayout->addWidget( label ); topLayout->addWidget( m_replace ); //topLayout->addWidget( m_optPlaceholders ); } QGroupBox *group = new QGroupBox( i18n( "Options" ), page ); topLayout->addWidget( group, 10 ); QGridLayout *gbox = new QGridLayout( group, 5, 2, spacingHint() ); gbox->addRowSpacing( 0, fontMetrics().lineSpacing() ); gbox->setRowStretch( 4, 10 ); m_opt1 = new QCheckBox( i18n( "C&ase Sensitive" ), group ); gbox->addWidget( m_opt1, 1, 0 ); m_opt2 = new QCheckBox(i18n("&Whole Words Only" ), group ); gbox->addWidget( m_opt2, 2, 0 ); m_opt3 = new QCheckBox(i18n("&From Beginning" ), group ); gbox->addWidget( m_opt3, 3, 0 ); @@ -487,87 +486,87 @@ ColorConfig::ColorConfig( QWidget *parent, char *name ) glay->setRowStretch(5,1); QLabel *label; label = new QLabel( i18n("Background:"), this); label->setAlignment( AlignRight|AlignVCenter ); m_back = new KColorButton( this ); glay->addWidget( label, 0, 0 ); glay->addWidget( m_back, 0, 1 ); label = new QLabel( i18n("Selected:"), this); label->setAlignment( AlignRight|AlignVCenter ); m_selected = new KColorButton( this ); glay->addWidget( label, 2, 0 ); glay->addWidget( m_selected, 2, 1 ); // QWhatsThis help QWhatsThis::add(m_back, i18n("Sets the background color of the editing area")); QWhatsThis::add(m_selected, i18n("Sets the background color of the selection. To set the text color for selected text, use the "<b>Configure Highlighting</b>" dialog.")); } ColorConfig::~ColorConfig() { } void ColorConfig::setColors(QColor *colors) { m_back->setColor( colors[0] ); m_selected->setColor( colors[1] ); } void ColorConfig::getColors(QColor *colors) { colors[0] = m_back->color(); colors[1] = m_selected->color(); } FontConfig::FontConfig( QWidget *parent, char *name ) : QWidget( parent, name ) { // sizemanagment QGridLayout *grid = new QGridLayout( this, 1, 1 ); // QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" ); // QString styleStr = cfg. readEntry ( "FontStyle", "Regular" ); // int size = cfg. readNumEntry ( "FontSize", 10 ); // OFontSelector *m_fontselect; - m_fontselect = new Opie::OFontSelector ( false, this, "FontTab" ); + m_fontselect = new OFontSelector ( false, this, "FontTab" ); // m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); // QWhatsThis::add( m_fontselect, // tr( "Select the desired name, style and size of the default font applications will use." ) ); connect( m_fontselect, SIGNAL( fontSelected(const QFont&)), this, SLOT( slotFontSelected(const QFont&))); grid->addWidget( m_fontselect, 0, 0); // #if 0 // m_fontchooser = new KFontChooser ( this ); // m_fontchooser->enableColumn(KFontChooser::StyleList, false); // grid->addWidget( m_fontchooser, 0, 0); // connect (m_fontchooser, SIGNAL (fontSelected(const QFont&)), this, SLOT (slotFontSelected(const QFont&))); // #endif } FontConfig::~FontConfig() { } void FontConfig::setFont ( const QFont &font ) { //#if 0 m_fontselect->setFont (font); myFont = font; //#endif } void FontConfig::slotFontSelected( const QFont &font ) { myFont = font; } diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.h b/noncore/apps/tinykate/libkate/view/kateviewdialog.h index d081152..65f2dca 100644 --- a/noncore/apps/tinykate/libkate/view/kateviewdialog.h +++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.h @@ -139,58 +139,58 @@ class EditConfigTab : public QWidget EditConfigTab(QWidget *parent, KateView *); void getData(KateView *); protected: static const int numFlags = 9; static const int flags[numFlags]; QCheckBox *opt[numFlags]; QComboBox *encoding; QSpinBox *e1; QSpinBox *e2; QSpinBox *e3; }; class ColorConfig : public QWidget { Q_OBJECT public: ColorConfig( QWidget *parent = 0, char *name = 0 ); ~ColorConfig(); void setColors( QColor * ); void getColors( QColor * ); private: KColorButton *m_back; KColorButton *m_selected; }; class FontConfig : public QWidget { Q_OBJECT public: FontConfig( QWidget *parent = 0, char *name = 0 ); ~FontConfig(); void setFont ( const QFont &font ); QFont getFont ( ) { return myFont; }; private: - Opie::Opie::Ui::OFontSelector *m_fontselect; + Opie::Ui::OFontSelector *m_fontselect; // class KFontChooser *m_fontchooser; QFont myFont; private slots: void slotFontSelected( const QFont &font ); }; #endif //_KWDIALOG_H_ |