summaryrefslogtreecommitdiffstats
path: root/quanta/components/csseditor/fontfamilychooser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/components/csseditor/fontfamilychooser.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/csseditor/fontfamilychooser.cpp')
-rw-r--r--quanta/components/csseditor/fontfamilychooser.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/quanta/components/csseditor/fontfamilychooser.cpp b/quanta/components/csseditor/fontfamilychooser.cpp
index d42139f8..9f8da65d 100644
--- a/quanta/components/csseditor/fontfamilychooser.cpp
+++ b/quanta/components/csseditor/fontfamilychooser.cpp
@@ -16,35 +16,35 @@
#include "fontfamilychooser.h"
-#include <qfontdatabase.h>
-#include <qstringlist.h>
-#include <qlistbox.h>
-#include <qfont.h>
+#include <tqfontdatabase.h>
+#include <tqstringlist.h>
+#include <tqlistbox.h>
+#include <tqfont.h>
#include <klocale.h>
-#include <qiconset.h>
-#include <qpixmap.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
#include <kiconloader.h>
#include <kpushbutton.h>
#include <kglobalsettings.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include<kdebug.h>
-fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFamilyChooserS(parent,name){
+fontFamilyChooser::fontFamilyChooser(TQWidget* parent, const char *name) : fontFamilyChooserS(parent,name){
- QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black );
+ TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black );
lePreview->setMinimumHeight( lePreview->fontMetrics().lineSpacing() );
lePreview->setAlignment(Qt::AlignCenter);
- QFont font;
+ TQFont font;
font.setPointSize(20);
lePreview->setFont(font);
lePreview->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
- QFontDatabase fdb;
- QStringList families = fdb.families();
- for ( QStringList::Iterator it = families.begin(); it != families.end(); ++it ) {
+ TQFontDatabase fdb;
+ TQStringList families = fdb.families();
+ for ( TQStringList::Iterator it = families.begin(); it != families.end(); ++it ) {
if( (*it).contains('[') !=0 )
it = families.remove(it);
}
@@ -52,49 +52,49 @@ fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFa
if( families.count() != 0 ) lbAvailable->insertStringList(families);
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("forward"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("forward"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
pbAdd->setIconSet(iconSet);
pbAdd->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- iconSet = SmallIconSet(QString::fromLatin1("back"));
+ iconSet = SmallIconSet(TQString::fromLatin1("back"));
pbRemove->setIconSet(iconSet);
pbRemove->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- iconSet = SmallIconSet(QString::fromLatin1("up"));
+ iconSet = SmallIconSet(TQString::fromLatin1("up"));
pbMoveUp->setIconSet(iconSet);
pbMoveUp->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- iconSet = SmallIconSet(QString::fromLatin1("down"));
+ iconSet = SmallIconSet(TQString::fromLatin1("down"));
pbMoveDown->setIconSet(iconSet);
pbMoveDown->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect(pbAdd, SIGNAL(clicked()), this ,SLOT( addFont() ));
- connect( lbAvailable, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) );
- connect( lbAvailable, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedAvailableFamilyFont( const QString&) ) );
- connect( lbGeneric, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) );
- connect( lbGeneric, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedGenericFamilyFont( const QString&) ) );
- connect( lbSelected, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) );
- connect( lbSelected, SIGNAL( highlighted( int ) ), this, SLOT( setCurrentSelectedFont( int ) ) );
- connect( lbSelected, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedFont( const QString&) ) );
- connect( pbRemove, SIGNAL( clicked() ), this, SLOT( removeFont() ) );
- connect( pbMoveUp, SIGNAL( clicked() ), this, SLOT( moveFontUp() ) );
- connect( pbMoveDown, SIGNAL( clicked() ), this, SLOT( moveFontDown() ) );
+ connect(pbAdd, TQT_SIGNAL(clicked()), this ,TQT_SLOT( addFont() ));
+ connect( lbAvailable, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) );
+ connect( lbAvailable, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedAvailableFamilyFont( const TQString&) ) );
+ connect( lbGeneric, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) );
+ connect( lbGeneric, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedGenericFamilyFont( const TQString&) ) );
+ connect( lbSelected, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) );
+ connect( lbSelected, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( setCurrentSelectedFont( int ) ) );
+ connect( lbSelected, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedFont( const TQString&) ) );
+ connect( pbRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeFont() ) );
+ connect( pbMoveUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveFontUp() ) );
+ connect( pbMoveDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveFontDown() ) );
- QWhatsThis::add(lbAvailable,i18n("These are the names of the available fonts on your system"));
- QWhatsThis::add(lbGeneric,i18n("These are the names of the generic fonts "));
- QWhatsThis::add(lbSelected,i18n("These are the names of the generic fonts you have selected "));
- QWhatsThis::add(pbAdd,i18n("Click this to add a font to your style sheet"));
- QWhatsThis::add(pbRemove,i18n("Click this to remove a font from your style sheet"));
- QWhatsThis::add(pbMoveUp,i18n("Click this to make the font more preferable than the preceeding one"));
- QWhatsThis::add(pbMoveDown,i18n("Click this to make the font less preferable than the following one"));
+ TQWhatsThis::add(lbAvailable,i18n("These are the names of the available fonts on your system"));
+ TQWhatsThis::add(lbGeneric,i18n("These are the names of the generic fonts "));
+ TQWhatsThis::add(lbSelected,i18n("These are the names of the generic fonts you have selected "));
+ TQWhatsThis::add(pbAdd,i18n("Click this to add a font to your style sheet"));
+ TQWhatsThis::add(pbRemove,i18n("Click this to remove a font from your style sheet"));
+ TQWhatsThis::add(pbMoveUp,i18n("Click this to make the font more preferable than the preceeding one"));
+ TQWhatsThis::add(pbMoveDown,i18n("Click this to make the font less preferable than the following one"));
}
fontFamilyChooser::~fontFamilyChooser(){}
-void fontFamilyChooser::updatePreview(const QString& s){
- lePreview->setFont(QFont(s,20));
+void fontFamilyChooser::updatePreview(const TQString& s){
+ lePreview->setFont(TQFont(s,20));
}
void fontFamilyChooser::addFont(){
@@ -107,13 +107,13 @@ void fontFamilyChooser::addFont(){
}
}
-void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const QString& f){
+void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const TQString& f){
m_fontOrigin = available;
m_currentSelectedFont = f;
m_selectedFontMap[f] = available;
}
-void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const QString& f){
+void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const TQString& f){
m_fontOrigin = generic;
m_currentSelectedFont =f;
m_selectedFontMap[f] = generic;
@@ -136,7 +136,7 @@ void fontFamilyChooser::moveFontDown(){
}
void fontFamilyChooser::removeFont(){
- QString dummyFont(m_currentSelectedFont);// since removeItem emits highlighted signal, after
+ TQString dummyFont(m_currentSelectedFont);// since removeItem emits highlighted signal, after
// removeItem call the value of m_currentSelectedFont
// is actually the font after m_currentSelectedFont and so
// we must save m_currentSelectedFont value in dummyFont
@@ -152,20 +152,20 @@ void fontFamilyChooser::removeFont(){
}
-QStringList fontFamilyChooser::fontList(){
- QStringList list;
- QListBoxItem *item = lbSelected->firstItem();
+TQStringList fontFamilyChooser::fontList(){
+ TQStringList list;
+ TQListBoxItem *item = lbSelected->firstItem();
while( item != 0 ){
- if( item->text().contains( QRegExp("\\W") ) ) list.append( "'" + item->text() + "'" );
+ if( item->text().contains( TQRegExp("\\W") ) ) list.append( "'" + item->text() + "'" );
else list.append( item->text() );
item = item->next();
}
return list;
}
-void fontFamilyChooser::setInitialValue(const QString& s){
- QStringList familyList = QStringList::split(",",s);
- for ( QStringList::Iterator it = familyList.begin(); it != familyList.end(); ++it ) {
+void fontFamilyChooser::setInitialValue(const TQString& s){
+ TQStringList familyList = TQStringList::split(",",s);
+ for ( TQStringList::Iterator it = familyList.begin(); it != familyList.end(); ++it ) {
(*it).remove("'");
(*it).remove("\"");
lbSelected->insertItem((*it).stripWhiteSpace());