summaryrefslogtreecommitdiffstats
path: root/kdeui/kfontdialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /kdeui/kfontdialog.cpp
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/kfontdialog.cpp')
-rw-r--r--kdeui/kfontdialog.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kdeui/kfontdialog.cpp b/kdeui/kfontdialog.cpp
index 4044c7b68..c64892d8a 100644
--- a/kdeui/kfontdialog.cpp
+++ b/kdeui/kfontdialog.cpp
@@ -66,7 +66,7 @@ static int minimumListWidth( const TQListBox *list )
}
if( w == 0 ) { w = 40; }
w += list->frameWidth() * 2;
- w += list->verticalScrollBar()->sizeHint().width();
+ w += list->verticalScrollBar()->tqsizeHint().width();
return w;
}
@@ -284,7 +284,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name,
connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)),
TQT_SLOT(size_chosen_slot(const TQString&)) );
- sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt.
+ sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(10)), true); // default to 10pt.
row ++;
@@ -295,7 +295,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name,
//i18n: This is a classical test phrase. (It contains all letters from A to Z.)
sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() );
- sampleEdit->setAlignment(Qt::AlignCenter);
+ sampleEdit->tqsetAlignment(Qt::AlignCenter);
gridLayout->addMultiCellWidget(sampleEdit, 4, 4, 0, 2);
TQString sampleEditWhatsThisText =
i18n("This sample text illustrates the current settings. "
@@ -331,8 +331,8 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name,
setSizeIsRelative( *sizeIsRelativeState );
KConfig *config = KGlobal::config();
- KConfigGroupSaver saver(config, TQString::fromLatin1("General"));
- showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false));
+ KConfigGroupSaver saver(config, TQString::tqfromLatin1("General"));
+ showXLFDArea(config->readBoolEntry(TQString::tqfromLatin1("fontSelectorShowXLFD"), false));
}
KFontChooser::~KFontChooser()
@@ -403,9 +403,9 @@ TQButton::ToggleState KFontChooser::sizeIsRelative() const
: TQButton::NoChange;
}
-TQSize KFontChooser::sizeHint( void ) const
+TQSize KFontChooser::tqsizeHint( void ) const
{
- return minimumSizeHint();
+ return tqminimumSizeHint();
}
@@ -464,18 +464,18 @@ void KFontChooser::toggled_checkbox()
void KFontChooser::family_chosen_slot(const TQString& family)
{
TQFontDatabase dbase;
- TQStringList styles = TQStringList(dbase.styles(family));
+ TQStringList styles = TQStringList(dbase.tqstyles(family));
styleListBox->clear();
currentStyles.clear();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
TQString style = *it;
- int pos = style.find("Plain");
+ int pos = style.tqfind("Plain");
if(pos >=0) style = style.replace(pos,5,i18n("Regular"));
- pos = style.find("Normal");
+ pos = style.tqfind("Normal");
if(pos >=0) style = style.replace(pos,6,i18n("Regular"));
- pos = style.find("Oblique");
+ pos = style.tqfind("Oblique");
if(pos >=0) style = style.replace(pos,7,i18n("Italic"));
- if(!styleListBox->findItem(style)) {
+ if(!styleListBox->tqfindItem(style)) {
styleListBox->insertItem(i18n(style.utf8()));
currentStyles.insert(i18n(style.utf8()), *it);
}
@@ -486,9 +486,9 @@ void KFontChooser::family_chosen_slot(const TQString& family)
}
styleListBox->blockSignals(true);
- TQListBoxItem *item = styleListBox->findItem(selectedStyle);
+ TQListBoxItem *item = styleListBox->tqfindItem(selectedStyle);
if (item)
- styleListBox->setSelected(styleListBox->findItem(selectedStyle), true);
+ styleListBox->setSelected(styleListBox->tqfindItem(selectedStyle), true);
else
styleListBox->setSelected(0, true);
styleListBox->blockSignals(false);
@@ -526,7 +526,7 @@ void KFontChooser::style_chosen_slot(const TQString& style)
fillSizeList();
} else { // is bitmap font.
//sampleEdit->setPaletteBackgroundPixmap( BitmapPixmap ); // TODO
- TQValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]);
+ TQValueList<int> sizes = dbase.tqsmoothSizes(familyListBox->currentText(), currentStyles[currentStyle]);
if(sizes.count() > 0) {
TQValueList<int>::iterator it;
diff=1000;
@@ -538,7 +538,7 @@ void KFontChooser::style_chosen_slot(const TQString& style)
fillSizeList();
}
sizeListBox->blockSignals(true);
- sizeListBox->setSelected(sizeListBox->findItem(TQString::number(selectedSize)), true);
+ sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(selectedSize)), true);
sizeListBox->blockSignals(false);
sizeListBox->ensureCurrentVisible();
@@ -565,7 +565,7 @@ void KFontChooser::setupDisplay()
{
// Calling familyListBox->setCurrentItem() causes the value of selFont
// to change, so we save the family, style and size beforehand.
- TQString family = selFont.family().lower();
+ TQString family = TQString(selFont.family()).lower();
int style = (selFont.bold() ? 2 : 0) + (selFont.italic() ? 1 : 0);
int size = selFont.pointSize();
if (size == -1)
@@ -587,7 +587,7 @@ void KFontChooser::setupDisplay()
{
if (family.contains('['))
{
- family = family.left(family.find('[')).stripWhiteSpace();
+ family = family.left(family.tqfind('[')).stripWhiteSpace();
for (i = 0; i < numEntries; i++) {
if (family == familyListBox->text(i).lower()) {
familyListBox->setCurrentItem(i);
@@ -641,7 +641,7 @@ void KFontChooser::setupDisplay()
void KFontChooser::getFontList( TQStringList &list, uint fontListCriteria)
{
TQFontDatabase dbase;
- TQStringList lstSys(dbase.families());
+ TQStringList lstSys(dbase.tqfamilies());
// if we have criteria; then check fonts before adding
if (fontListCriteria)
@@ -681,13 +681,13 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont )
if ( !ptr )
return;
- TQString font = TQString::fromLatin1(ptr + 1);
+ TQString font = TQString::tqfromLatin1(ptr + 1);
int pos;
- if ( ( pos = font.find( '-' ) ) > 0 ) {
+ if ( ( pos = font.tqfind( '-' ) ) > 0 ) {
font.truncate( pos );
- if ( font.find( TQString::fromLatin1("open look"), 0, false ) >= 0 )
+ if ( font.tqfind( TQString::tqfromLatin1("open look"), 0, false ) >= 0 )
return;
TQStringList::Iterator it = list.begin();
@@ -711,11 +711,11 @@ void KFontChooser::showXLFDArea(bool show)
{
if( show )
{
- xlfdEdit->parentWidget()->show();
+ xlfdEdit->tqparentWidget()->show();
}
else
{
- xlfdEdit->parentWidget()->hide();
+ xlfdEdit->tqparentWidget()->hide();
}
}