summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/libkate') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katedialogs.cpp6
-rw-r--r--noncore/apps/tinykate/libkate/document/katedocument.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/view/kateviewdialog.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedialogs.cpp b/noncore/apps/tinykate/libkate/document/katedialogs.cpp
index 2f0ed7b..f4edd7e 100644
--- a/noncore/apps/tinykate/libkate/document/katedialogs.cpp
+++ b/noncore/apps/tinykate/libkate/document/katedialogs.cpp
@@ -1,162 +1,162 @@
/***************************************************************************
katedialogs.cpp - description
-------------------
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. *
* *
***************************************************************************/
#include "katedialogs.h"
#include <klocale.h>
#include <kdebug.h>
#include <qgroupbox.h>
#include <qvgroupbox.h>
#include <qhgroupbox.h>
#include <qhbox.h>
#include <qvbox.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qwidgetstack.h>
#include <qlabel.h>
#include <qlistview.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qcheckbox.h>
//FIXME #include <kcharsets.h>
#include <kglobal.h>
#include <qmap.h>
#include <kmessagebox.h>
#include <kstddirs.h>
/*******************************************************************************************************************
* Context Editor *
*******************************************************************************************************************/
StyleChanger::StyleChanger( QWidget *parent )
: QWidget(parent)
{
QLabel *label;
QGridLayout *glay = new QGridLayout( this, 4, 3, 0, KDialog::spacingHint() );
CHECK_PTR(glay);
glay->addColSpacing( 1, KDialog::spacingHint() ); // Looks better
glay->setColStretch( 2, 10 );
col = new KColorButton(this);
CHECK_PTR(col);
- connect(col,SIGNAL(changed(const QColor &)),this,SLOT(changed()));
+ connect(col,SIGNAL(changed(const QColor&)),this,SLOT(changed()));
label = new QLabel(col,i18n("Normal:"),this);
CHECK_PTR(label);
glay->addWidget(label,0,0);
glay->addWidget(col,1,0);
selCol = new KColorButton(this);
CHECK_PTR(selCol);
- connect(selCol,SIGNAL(changed(const QColor &)),this,SLOT(changed()));
+ connect(selCol,SIGNAL(changed(const QColor&)),this,SLOT(changed()));
label = new QLabel(selCol,i18n("Selected:"),this);
CHECK_PTR(label);
glay->addWidget(label,2,0);
glay->addWidget(selCol,3,0);
bold = new QCheckBox(i18n("Bold"),this);
CHECK_PTR(bold);
connect(bold,SIGNAL(clicked()),SLOT(changed()));
glay->addWidget(bold,1,2);
italic = new QCheckBox(i18n("Italic"),this);
CHECK_PTR(italic);
connect(italic,SIGNAL(clicked()),SLOT(changed()));
glay->addWidget(italic,2,2);
}
void StyleChanger::setRef(ItemStyle *s) {
style = s;
col->setColor(style->col);
selCol->setColor(style->selCol);
bold->setChecked(style->bold);
italic->setChecked(style->italic);
}
void StyleChanger::setEnabled(bool enable) {
col->setEnabled(enable);
selCol->setEnabled(enable);
bold->setEnabled(enable);
italic->setEnabled(enable);
}
void StyleChanger::changed() {
if (style) {
style->col = col->color();
style->selCol = selCol->color();
style->bold = bold->isChecked();
style->italic = italic->isChecked();
}
}
HighlightDialog::HighlightDialog( HlManager *hlManager, ItemStyleList *styleList,
HlDataList *highlightDataList,
int hlNumber, QWidget *parent,
const char *name, bool modal )
:KDialogBase(parent,name,modal,i18n("Highlight Settings"), Ok|Cancel, Ok)
{
// QVBox *page = makeVBoxMainWidget();
QFrame *page=addPage("FIXME");
(new QVBoxLayout(page))->setAutoAdd(true);
content=new HighlightDialogPage(hlManager,styleList,highlightDataList,hlNumber,page);
}
void HighlightDialog::done(int r)
{
kdDebug(13010)<<"HighlightDialod done"<<endl;
content->saveData();
KDialogBase::done(r);
}
HighlightDialogPage::HighlightDialogPage(HlManager *hlManager, ItemStyleList *styleList,
HlDataList* highlightDataList,
int hlNumber,QWidget *parent, const char *name)
:QTabWidget(parent,name),defaultItemStyleList(styleList),hlData(0L)
{
// defaults =========================================================
QFrame *page1 = new QFrame(this);
addTab(page1,i18n("&Defaults"));
QGridLayout *grid = new QGridLayout(page1, 1, 1);
QVGroupBox *dvbox1 = new QVGroupBox( i18n("Default Item Styles"), page1 );
/*QLabel *label = */new QLabel( i18n("Item:"), dvbox1 );
QComboBox *styleCombo = new QComboBox( false, dvbox1 );
defaultStyleChanger = new StyleChanger( dvbox1 );
for( int i = 0; i < hlManager->defaultStyles(); i++ ) {
styleCombo->insertItem(hlManager->defaultStyleName(i));
}
connect(styleCombo, SIGNAL(activated(int)), this, SLOT(defaultChanged(int)));
grid->addWidget(dvbox1, 0,0);
defaultChanged(0);
// highlight modes =====================================================
QFrame *page2 = new QFrame(this);
addTab(page2,i18n("&Highlight Modes"));
//grid = new QGridLayout(page2,2,2);
QVBoxLayout *bl=new QVBoxLayout(page2);
bl->setAutoAdd(true);
QHGroupBox *hbox1 = new QHGroupBox( i18n("Config Select"), page2 );
@@ -193,193 +193,193 @@ HighlightDialogPage::HighlightDialogPage(HlManager *hlManager, ItemStyleList *st
styleDefault = new QCheckBox(i18n("Default"), vbox2 );
connect(styleDefault,SIGNAL(clicked()),SLOT(changed()));
styleChanger = new StyleChanger( vbox2 );
hlDataList = highlightDataList;
hlChanged(hlNumber);
}
void HighlightDialogPage::defaultChanged(int z)
{
defaultStyleChanger->setRef(defaultItemStyleList->at(z));
}
void HighlightDialogPage::hlChanged(int z)
{
writeback();
hlData = hlDataList->at(z);
wildcards->setText(hlData->wildcards);
mimetypes->setText(hlData->mimetypes);
itemCombo->clear();
for (ItemData *itemData = hlData->itemDataList.first(); itemData != 0L;
itemData = hlData->itemDataList.next()) {
kdDebug(13010) << itemData->name << endl;
itemCombo->insertItem(i18n(itemData->name.latin1()));
}
itemChanged(0);
}
void HighlightDialogPage::itemChanged(int z)
{
itemData = hlData->itemDataList.at(z);
styleDefault->setChecked(itemData->defStyle);
styleChanger->setRef(itemData);
}
void HighlightDialogPage::changed()
{
itemData->defStyle = styleDefault->isChecked();
}
void HighlightDialogPage::writeback() {
if (hlData) {
hlData->wildcards = wildcards->text();
hlData->mimetypes = mimetypes->text();
}
}
void HighlightDialogPage::saveData() {
kdDebug(13010)<<"HighlightDialogPage::saveData()"<<endl;
writeback();
}
void HighlightDialogPage::hlEdit() {
HlEditDialog diag(0,0,"hlEdit", true,hlData);
diag.show();
}
void HighlightDialogPage::hlNew() {
HlEditDialog diag(0,0,"hlEdit",true,0);
diag.show();
}
HlEditDialog::HlEditDialog(HlManager *,QWidget *parent, const char *name, bool modal,HlData *data)
:KDialogBase(KDialogBase::Swallow, i18n("Highlight Conditions"), Ok|Cancel, Ok, parent, name, modal)
{
currentItem=0;
transTableCnt=0;
QHBox *wid=new QHBox(this);
QVBox *lbox=new QVBox(wid);
contextList=new KListView(lbox);
contextList->setRootIsDecorated(true);
contextList->addColumn(i18n("Syntax structure"));
contextList->setSorting(-1);
QHBox *bbox=new QHBox(lbox);
QPushButton *addContext=new QPushButton(i18n("New Context"),bbox);
QPushButton *addItem=new QPushButton(i18n("New Item"),bbox);
QVGroupBox *opt = new QVGroupBox( i18n("Options"), wid);
stack=new QWidgetStack(opt);
initContextOptions(contextOptions=new QVBox(stack));
stack->addWidget(contextOptions,HlEContext);
initItemOptions(itemOptions=new QVBox(stack));
stack->addWidget(itemOptions,HlEItem);
stack->raiseWidget(HlEContext);
setMainWidget(wid);
if (data!=0) loadFromDocument(data);
else newDocument();
- connect(contextList,SIGNAL(currentChanged( QListViewItem*)),this,SLOT(currentSelectionChanged ( QListViewItem * )));
+ connect(contextList,SIGNAL(currentChanged(QListViewItem*)),this,SLOT(currentSelectionChanged(QListViewItem*)));
connect(addContext,SIGNAL(clicked()),this,SLOT(contextAddNew()));
connect(addItem,SIGNAL(clicked()),this,SLOT(ItemAddNew()));
}
void HlEditDialog::newDocument()
{
KStandardDirs *dirs = KGlobal::dirs();
QStringList list=dirs->findAllResources("data","kate/syntax/syntax.template",false,true);
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
HlData data("","",*it);
loadFromDocument(&data);
return;
}
KMessageBox::error(this,i18n("Can't find template file"));
}
void HlEditDialog::initContextOptions(QVBox *co)
{
if( co!=0)
{
QHBox *tmp = new QHBox(co);
(void) new QLabel(i18n("Description:"),tmp);
ContextDescr=new QLineEdit(tmp);
tmp= new QHBox(co);
(void) new QLabel(i18n("Attribute:"),tmp);
ContextAttribute=new QComboBox(tmp);
tmp= new QHBox(co);
(void) new QLabel(i18n("LineEnd:"),tmp);
ContextLineEnd = new QComboBox(tmp);
connect(ContextDescr,SIGNAL(textChanged(const QString&)),this,SLOT(contextDescrChanged(const QString&)));
connect(ContextLineEnd,SIGNAL(activated(int)),this,SLOT(contextLineEndChanged(int)));
connect(ContextAttribute,SIGNAL(activated(int)),this,SLOT(contextAttributeChanged(int)));
}
else
kdDebug(13010)<<"initContextOptions: Widget is 0"<<endl;
}
void HlEditDialog::insertTranslationList(QString tag, QString trans,int length)
{
ItemInfo data(trans,length);
id2tag.insert(transTableCnt,tag);
id2info.insert(transTableCnt,data);
tag2id.insert(tag,transTableCnt);
transTableCnt++;
}
void HlEditDialog::initItemOptions(QVBox *co)
{
if (co!=0)
{
QHBox *tmp = new QHBox(co);
(void) new QLabel(i18n("Type:"),tmp);
ItemType = new QComboBox(tmp);
tmp= new QHBox(co);
(void) new QLabel(i18n("Parameter:"),tmp);
ItemParameter= new QLineEdit(tmp);
tmp= new QHBox(co);
(void) new QLabel(i18n("Attribute:"),tmp);
ItemAttribute= new QComboBox(tmp);
(void) new QLabel(i18n("Context switch:"),tmp);
ItemContext = new QComboBox(tmp);
co->setSpacing(15);
QPushButton *delItem=new QPushButton(i18n("Delete this item"),co);
/* init translation lists */
insertTranslationList("CharDetect","CharDetect",1);
insertTranslationList("2CharDetect","2CharDetect",2);
insertTranslationList("RangeDetect","RangeDetect",2);
insertTranslationList("StringDetect","StringDetect",-1);
insertTranslationList("AnyChar","AnyChar",-1);
insertTranslationList("RegExpr","RegExpr",-1);
insertTranslationList("Int","Int",0);
insertTranslationList("Float","Float",0);
insertTranslationList("keyword","keyword",0);
insertTranslationList("dataType","dataType",0);
ItemType->clear();
for (int i=0; i<transTableCnt; i++) ItemType->insertItem(id2info[i].trans_i18n);
connect(ItemType,SIGNAL(activated(int)),this,SLOT(ItemTypeChanged(int)));
connect(ItemParameter,SIGNAL(textChanged(const QString&)),this,SLOT(ItemParameterChanged(const QString&)));
connect(ItemAttribute,SIGNAL(activated(int)),this,SLOT(ItemAttributeChanged(int)));
connect(ItemContext,SIGNAL(activated(int)),this,SLOT(ItemContextChanged(int)));
}
else
kdDebug(13010)<<"initItemOptions: Widget is 0"<<endl;
}
void HlEditDialog::loadFromDocument(HlData *hl)
{
struct syntaxContextData *data;
QListViewItem *last=0,*lastsub=0;
HlManager::self()->syntax->setIdentifier(hl->identifier);
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp
index f05e21a..0c742d7 100644
--- a/noncore/apps/tinykate/libkate/document/katedocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp
@@ -75,193 +75,193 @@
#include "../view/kateview.h"
#include "katebuffer.h"
#include "katetextline.h"
#include "katecmd.h"
KateAction::KateAction(Action a, PointStruc &cursor, int len, const QString &text)
: action(a), cursor(cursor), len(len), text(text) {
}
KateActionGroup::KateActionGroup(PointStruc &aStart, int type)
: start(aStart), action(0L), undoType(type) {
}
KateActionGroup::~KateActionGroup() {
KateAction *current, *next;
current = action;
while (current) {
next = current->next;
delete current;
current = next;
}
}
void KateActionGroup::insertAction(KateAction *a) {
a->next = action;
action = a;
}
const char * KateActionGroup::typeName(int type)
{
// return a short text description of the given undo group type suitable for a menu
// not the lack of i18n's, the caller is expected to handle translation
switch (type) {
case ugPaste : return "Paste Text";
case ugDelBlock : return "Selection Overwrite";
case ugIndent : return "Indent";
case ugUnindent : return "Unindent";
case ugComment : return "Comment";
case ugUncomment : return "Uncomment";
case ugReplace : return "Text Replace";
case ugSpell : return "Spell Check";
case ugInsChar : return "Typing";
case ugDelChar : return "Delete Text";
case ugInsLine : return "New Line";
case ugDelLine : return "Delete Line";
}
return "";
}
const int KateDocument::maxAttribs = 32;
QStringList KateDocument::searchForList = QStringList();
QStringList KateDocument::replaceWithList = QStringList();
uint KateDocument::uniqueID = 0;
QPtrDict<KateDocument::KateDocPrivate>* KateDocument::d_ptr = 0;
KateDocument::KateDocument(bool bSingleViewMode, bool bBrowserView,
QWidget *parentWidget, const char *widgetName,
QObject *, const char *)
: Kate::Document (),
myFont(KGlobalSettings::generalFont()), myFontBold(KGlobalSettings::generalFont()), myFontItalic(KGlobalSettings::generalFont()), myFontBI(KGlobalSettings::generalFont()),
myFontMetrics (myFont), myFontMetricsBold (myFontBold), myFontMetricsItalic (myFontItalic), myFontMetricsBI (myFontBI),
hlManager(HlManager::self ())
{
d(this)->hlSetByUser = false;
PreHighlightedTill=0;
RequestPreHighlightTill=0;
m_bSingleViewMode=bSingleViewMode;
m_bBrowserView = bBrowserView;
m_url = QString::null;
// NOTE: QFont::CharSet doesn't provide all the charsets KDE supports
// (esp. it doesn't distinguish between UTF-8 and iso10646-1)
myEncoding = QString::fromLatin1(QTextCodec::codecForLocale()->name());
maxLength = -1;
setFont (KGlobalSettings::generalFont());
myDocID = uniqueID;
uniqueID++;
myDocName = QString ("");
fileInfo = new QFileInfo ();
myCmd = new KateCmd (this);
- connect(this,SIGNAL(modifiedChanged ()),this,SLOT(slotModChanged ()));
+ connect(this,SIGNAL(modifiedChanged()),this,SLOT(slotModChanged()));
buffer = new KWBuffer;
connect(buffer, SIGNAL(linesChanged(int)), this, SLOT(slotBufferChanged()));
// connect(buffer, SIGNAL(textChanged()), this, SIGNAL(textChanged()));
connect(buffer, SIGNAL(needHighlight(long,long)),this,SLOT(slotBufferHighlight(long,long)));
colors[0] = KGlobalSettings::baseColor();
colors[1] = KGlobalSettings::highlightColor();
m_attribs = new Attribute[maxAttribs];
m_highlight = 0L;
tabChars = 8;
m_singleSelection = false;
newDocGeometry = false;
readOnly = false;
newDoc = false;
modified = false;
undoList.setAutoDelete(true);
undoState = 0;
undoSteps = 50;
pseudoModal = 0L;
clear();
setHighlight(0); //calls updateFontData()
// if the user changes the highlight with the dialog, notify the doc
connect(hlManager,SIGNAL(changed()),SLOT(hlChanged()));
newDocGeometry = false;
readConfig();
setReadOnly(false);
}
void KateDocument::setDontChangeHlOnSave()
{
d(this)->hlSetByUser = true;
}
void KateDocument::setFont (QFont font)
{
kdDebug()<<"Kate:: setFont"<<endl;
int oldwidth=myFontMetrics.width('W'); //Quick & Dirty Hack (by JoWenn) //Remove in KDE 3.0
myFont = font;
myFontBold = QFont (font);
myFontBold.setBold (true);
myFontItalic = QFont (font);
myFontItalic.setItalic (true);
myFontBI = QFont (font);
myFontBI.setBold (true);
myFontBI.setItalic (true);
myFontMetrics = CachedFontMetrics (myFont);
myFontMetricsBold = CachedFontMetrics (myFontBold);
myFontMetricsItalic = CachedFontMetrics (myFontItalic);
myFontMetricsBI = CachedFontMetrics (myFontBI);
int newwidth=myFontMetrics.width('W'); //Quick & Dirty Hack (by JoWenn) //Remove in KDE 3.0
maxLength=maxLength*(float)newwidth/(float)oldwidth; //Quick & Dirty Hack (by JoWenn) //Remove in KDE 3.0
updateFontData();
updateViews(); //Quick & Dirty Hack (by JoWenn) //Remove in KDE 3.0
}
long KateDocument::needPreHighlight(long till)
{
int max=numLines()-1;
if (till>max)
{
till=max;
}
if (PreHighlightedTill>=till) return -1;
long tmp=RequestPreHighlightTill;
if (RequestPreHighlightTill<till)
{
RequestPreHighlightTill=till;
if (tmp<=PreHighlightedTill) QTimer::singleShot(10,this,SLOT(doPreHighlight()));
}
return RequestPreHighlightTill;
}
void KateDocument::doPreHighlight()
{
int from = PreHighlightedTill;
int till = PreHighlightedTill+200;
int max = numLines()-1;
if (till > max)
diff --git a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
index a85fb87..8e68262 100644
--- a/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateviewdialog.cpp
@@ -442,130 +442,130 @@ EditConfigTab::EditConfigTab(QWidget *parent, KateView *view)
encoding->insertStringList (KGlobal::charsets()->availableEncodingNames());
encoding->setCurrentItem (KGlobal::charsets()->availableEncodingNames().findIndex(view->doc()->encoding()));
#endif
leLayout->addStretch();
// What is this? help
QWhatsThis::add(opt[0], i18n("Word wrap is a feature that causes the editor to automatically start a new line of text and move (wrap) the cursor to the beginning of that new line. KateView will automatically start a new line of text when the current line reaches the length specified by the Wrap Words At: option.<p><b>NOTE:<b> Word Wrap will not change existing lines or wrap them for easy reading as in some applications."));
QWhatsThis::add(e1, i18n("If the Word Wrap option is selected this entry determines the length (in characters) at which the editor will automatically start a new line."));
QWhatsThis::add(opt[1], i18n("KateView will replace any tabs with the number of spaces indicated in the Tab Width: entry."));
QWhatsThis::add(e2, i18n("If the Replace Tabs By Spaces option is selected this entry determines the number of spaces with which the editor will automatically replace tabs."));
QWhatsThis::add(opt[2], i18n("KateView will automatically eliminate extra spaces at the ends of lines of text."));
QWhatsThis::add(opt[3], i18n("When the user types a left bracket ([,(, or {) KateView automatically enters the right bracket (}, ), or ]) to the right of the cursor."));
QWhatsThis::add(opt[4], i18n("Checking this will cause sequences of similar actions to be undone at once."));
QWhatsThis::add(opt[5], i18n("The editor will display a symbol to indicate the presence of a tab in the text."));
QWhatsThis::add(opt[6], i18n("Not yet implemented."));
QWhatsThis::add(opt[7], i18n("If this is selected, the insertion cursor will be moved to the first/last line when pressing the page up/down buttons.<p>If not selected, it will remain at it's relative position in the visible text."));
QWhatsThis::add(e3, i18n("Sets the number of undo/redo steps to record. More steps uses more memory."));
QWhatsThis::add(opt[8], i18n("When on, moving the insertion cursor using the <b>Left</b> and <b>Right</b> keys will go on to previous/next line at beginning/end of the line, similar to most editors.<p>When off, the insertion cursor cannot be moved left of the line start, but it can be moved off the line end, which can be very handy for programmers."));
}
void EditConfigTab::getData(KateView *view)
{
int configFlags, z;
configFlags = view->config();
for (z = 1; z < numFlags; z++) {
configFlags &= ~flags[z];
if (opt[z]->isChecked()) configFlags |= flags[z];
}
view->setConfig(configFlags);
view->setEncoding (encoding->currentText());
view->doc()->setWordWrapAt(e1->value());
view->doc()->setWordWrap (opt[0]->isChecked());
view->setTabWidth(e2->value());
view->setUndoSteps(e3->value());
}
ColorConfig::ColorConfig( QWidget *parent, char *name )
: QWidget( parent, name )
{
QGridLayout *glay = new QGridLayout( this, 6, 2, 0, KDialog::spacingHint());
glay->setColStretch(1,1);
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 &quot;<b>Configure Highlighting</b>&quot; 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-> 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 & )));
+ 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 & )));
+// 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;
}