summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/view/kateview.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.cpp37
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.h2
3 files changed, 30 insertions, 11 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
@@ -2337,25 +2337,25 @@ void KateView::configDialog()
// indent options
indentConfig->getData(this);
// select options
selectConfig->getData(this);
// edit options
editConfig->getData(this);
// spell checker
hlManager->setHlDataList(hlDataList);
hlManager->setDefaults(defaultStyleList);
hlPage->saveData();
}
- delete kd;
+// delete kd;
#endif
}
int KateView::getHl() {
return myDoc->highlightNum();
}
void KateView::setDontChangeHlOnSave()
{
myDoc->setDontChangeHlOnSave();
}
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
@@ -37,24 +37,26 @@
#include <qwhatsthis.h>
#include <qstringlist.h>
#include <klocale.h>
#include <kcolorbtn.h>
#include <qcombobox.h>
#include <kglobal.h>
#include <qvbox.h>
#include <qspinbox.h>
#include <kfontdialog.h>
#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 )
, 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 );
@@ -516,41 +518,56 @@ void ColorConfig::setColors(QColor *colors)
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 );
-#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
+// QString familyStr = cfg. readEntry ( "FontFamily", "Helvetica" );
+// QString styleStr = cfg. readEntry ( "FontStyle", "Regular" );
+// int size = cfg. readNumEntry ( "FontSize", 10 );
+// OFontSelector *m_fontselect;
+
+ 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_fontchooser->setFont (font);
+//#if 0
+m_fontselect->setFont (font);
myFont = font;
-#endif
+//#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 60f30bd..2ce5a11 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.h
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.h
@@ -22,24 +22,25 @@
#define _KWDIALOG_H_
class QCheckBox;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QSpinBox;
class KColorButton;
class QComboBox;
#include <kdialogbase.h>
+#include <opie/ofontselector.h>
#include "kateview.h"
class SearchDialog : public KDialogBase
{
Q_OBJECT
public:
SearchDialog( QWidget *parent, QStringList &searchFor, QStringList &replaceWith, int flags );
QString getSearchFor();
QString getReplaceWith();
int getFlags();
void setSearchText( const QString &searchstr );
@@ -174,21 +175,22 @@ 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:
+ OFontSelector *m_fontselect;
// class KFontChooser *m_fontchooser;
QFont myFont;
private slots:
void slotFontSelected( const QFont &font );
};
#endif //_KWDIALOG_H_