summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-12-22 18:24:31 (UTC)
committer llornkcor <llornkcor>2002-12-22 18:24:31 (UTC)
commit3ae485ccb47ca618bc00d96a0e81c978a1cfbdaf (patch) (side-by-side diff)
treef4a50457221d593f258d2f3f3d55c7b47a7b976d
parentc82ed38520b4038678ab0ab0c9f0ba147d8791ea (diff)
downloadopie-3ae485ccb47ca618bc00d96a0e81c978a1cfbdaf.zip
opie-3ae485ccb47ca618bc00d96a0e81c978a1cfbdaf.tar.gz
opie-3ae485ccb47ca618bc00d96a0e81c978a1cfbdaf.tar.bz2
use ofontselector, and temp fix for dialog crash
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/view/kateview.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.cpp35
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.h2
3 files changed, 29 insertions, 10 deletions
diff --git a/noncore/apps/tinykate/libkate/view/kateview.cpp b/noncore/apps/tinykate/libkate/view/kateview.cpp
index 6453458..63e941f 100644
--- a/noncore/apps/tinykate/libkate/view/kateview.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateview.cpp
@@ -2346,7 +2346,7 @@ void KateView::configDialog()
hlPage->saveData();
}
- delete kd;
+// delete kd;
#endif
}
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
index a311042..6a19e01 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
@@ -46,6 +46,8 @@
#include "../document/katedocument.h"
#include "kateviewdialog.h"
+#include <opie/ofontselector.h>
+
SearchDialog::SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags )
: KDialogBase( parent, 0L, true, i18n( "Find Text" ), Ok | Cancel, Ok )
@@ -525,13 +527,28 @@ FontConfig::FontConfig( QWidget *parent, char *name )
{
// sizemanagment
QGridLayout *grid = new QGridLayout( this, 1, 1 );
-#if 0
- m_fontchooser = new KFontChooser ( this );
- m_fontchooser->enableColumn(KFontChooser::StyleList, false);
- grid->addWidget( m_fontchooser, 0, 0);
+// QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" );
+// QString styleStr = cfg. readEntry ( "FontStyle", "Regular" );
+// int size = cfg. readNumEntry ( "FontSize", 10 );
+// OFontSelector *m_fontselect;
- connect (m_fontchooser, SIGNAL (fontSelected( const QFont & )), this, SLOT (slotFontSelected( const QFont & )));
-#endif
+ 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()
@@ -540,10 +557,10 @@ FontConfig::~FontConfig()
void FontConfig::setFont ( const QFont &font )
{
-#if 0
- m_fontchooser->setFont (font);
+//#if 0
+m_fontselect->setFont (font);
myFont = font;
-#endif
+//#endif
}
void FontConfig::slotFontSelected( const QFont &font )
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.h b/noncore/apps/tinykate/libkate/view/kateviewdialog.h
index 60f30bd..2ce5a11 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.h
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.h
@@ -31,6 +31,7 @@ class KColorButton;
class QComboBox;
#include <kdialogbase.h>
+#include <opie/ofontselector.h>
#include "kateview.h"
class SearchDialog : public KDialogBase
@@ -183,6 +184,7 @@ public:
QFont getFont ( ) { return myFont; };
private:
+ OFontSelector *m_fontselect;
// class KFontChooser *m_fontchooser;
QFont myFont;