summaryrefslogtreecommitdiffstats
path: root/quanta/components/csseditor
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
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')
-rw-r--r--quanta/components/csseditor/colorrequester.cpp38
-rw-r--r--quanta/components/csseditor/colorrequester.h14
-rw-r--r--quanta/components/csseditor/colorslider.cpp42
-rw-r--r--quanta/components/csseditor/colorslider.h14
-rw-r--r--quanta/components/csseditor/csseditor.cpp164
-rw-r--r--quanta/components/csseditor/csseditor.h60
-rw-r--r--quanta/components/csseditor/csseditor_globals.cpp20
-rw-r--r--quanta/components/csseditor/csseditor_globals.h22
-rw-r--r--quanta/components/csseditor/cssselector.cpp190
-rw-r--r--quanta/components/csseditor/cssselector.h36
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.cpp40
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.h18
-rw-r--r--quanta/components/csseditor/doubleeditors.cpp46
-rw-r--r--quanta/components/csseditor/doubleeditors.h26
-rw-r--r--quanta/components/csseditor/encodingselector.cpp8
-rw-r--r--quanta/components/csseditor/encodingselector.h6
-rw-r--r--quanta/components/csseditor/fontfamilychooser.cpp100
-rw-r--r--quanta/components/csseditor/fontfamilychooser.h20
-rw-r--r--quanta/components/csseditor/minieditor.h4
-rw-r--r--quanta/components/csseditor/percentageeditor.cpp8
-rw-r--r--quanta/components/csseditor/percentageeditor.h12
-rw-r--r--quanta/components/csseditor/propertysetter.cpp44
-rw-r--r--quanta/components/csseditor/propertysetter.h20
-rw-r--r--quanta/components/csseditor/qmyhighlighter.cpp16
-rw-r--r--quanta/components/csseditor/qmyhighlighter.h8
-rw-r--r--quanta/components/csseditor/shorthandformer.cpp178
-rw-r--r--quanta/components/csseditor/shorthandformer.h70
-rw-r--r--quanta/components/csseditor/specialsb.cpp38
-rw-r--r--quanta/components/csseditor/specialsb.h28
-rw-r--r--quanta/components/csseditor/styleeditor.cpp26
-rw-r--r--quanta/components/csseditor/styleeditor.h4
-rw-r--r--quanta/components/csseditor/stylesheetparser.cpp36
-rw-r--r--quanta/components/csseditor/stylesheetparser.h18
-rw-r--r--quanta/components/csseditor/tlpeditors.cpp66
-rw-r--r--quanta/components/csseditor/tlpeditors.h34
35 files changed, 737 insertions, 737 deletions
diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp
index 1333a48e..d2164b06 100644
--- a/quanta/components/csseditor/colorrequester.cpp
+++ b/quanta/components/csseditor/colorrequester.cpp
@@ -18,8 +18,8 @@
#include <klineedit.h>
#include <kcombobox.h>
#include <kcolordialog.h>
-#include <qtooltip.h>
-#include <qiconset.h>
+#include <tqtooltip.h>
+#include <tqiconset.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kaccel.h>
@@ -30,11 +30,11 @@ class colorRequester::colorRequesterPrivate{
public:
KLineEdit *edit;
colorRequesterPrivate() { edit = 0L; }
- void setText( const QString& text ) { edit->setText( text ); }
- void connectSignals( QObject *receiver ) { connect( edit, SIGNAL( textChanged( const QString& )),receiver, SIGNAL( textChanged( const QString& ))); }
+ void setText( const TQString& text ) { edit->setText( text ); }
+ void connectSignals( TQObject *receiver ) { connect( edit, TQT_SIGNAL( textChanged( const TQString& )),receiver, TQT_SIGNAL( textChanged( const TQString& ))); }
};
-colorRequester::colorRequester(QWidget *parent, const char* name) : miniEditor(parent,name){
+colorRequester::colorRequester(TQWidget *parent, const char* name) : miniEditor(parent,name){
d = new colorRequesterPrivate;
init();
}
@@ -45,7 +45,7 @@ colorRequester::~colorRequester(){
}
void colorRequester::connectToPropertySetter(propertySetter* p){
- connect( this, SIGNAL(textChanged(const QString&)), p, SIGNAL(valueChanged(const QString&)));
+ connect( this, TQT_SIGNAL(textChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&)));
}
void colorRequester::init()
@@ -56,31 +56,31 @@ void colorRequester::init()
d->edit = new KLineEdit( this, "line edit" );
myButton = new KPushButton( this, "kfile button");
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("colorize"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("colorize"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
myButton->setIconSet( iconSet );
myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- QToolTip::add(myButton, i18n("Open color dialog"));
+ TQToolTip::add(myButton, i18n("Open color dialog"));
setSpacing( KDialog::spacingHint() );
- QWidget *widget = (QWidget*) d->edit;
+ TQWidget *widget = (TQWidget*) d->edit;
setFocusProxy( widget );
d->connectSignals( this );
- connect( myButton, SIGNAL( clicked() ), this, SLOT( openColorDialog() ));
- connect( d->edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( setInitialValue(/*const QString&*/ ) ));
+ connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( openColorDialog() ));
+ connect( d->edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( setInitialValue(/*const TQString&*/ ) ));
KAccel *accel = new KAccel( this );
- accel->insert( KStdAccel::Open, this, SLOT( openColorDialog() ));
+ accel->insert( KStdAccel::Open, this, TQT_SLOT( openColorDialog() ));
accel->readSettings();
}
void colorRequester::openColorDialog(){
KColorDialog dlg(this,"dlg",true);
- dlg.setColor(QColor(m_initialValue));
+ dlg.setColor(TQColor(m_initialValue));
if(dlg.exec()){
- QColor myColor(dlg.color());
+ TQColor myColor(dlg.color());
d->edit->setText(myColor.name());
emit textChanged(myColor.name());
}
@@ -90,13 +90,13 @@ KLineEdit * colorRequester::lineEdit() const{
return d->edit;
}
#include <kdebug.h>
-void colorRequester::setInitialValue(/*const QString& s*/){
- QString temp = d->edit->text();
+void colorRequester::setInitialValue(/*const TQString& s*/){
+ TQString temp = d->edit->text();
temp.remove(" ");
if( temp.contains("#") != 0){
temp.remove("#");
if(temp.length() == 3) {
- QString temp2;
+ TQString temp2;
temp2.append(temp[0]);
temp2.append(temp[0]);
temp2.append(temp[1]);
@@ -115,7 +115,7 @@ void colorRequester::setInitialValue(/*const QString& s*/){
if( temp.contains("rgb(") != 0){
temp.remove("rgb(").remove(")");
- QStringList rgbValues = QStringList::split(",",temp);
+ TQStringList rgbValues = TQStringList::split(",",temp);
// bool ok;
int r = rgbValues[0].toInt();
int g = rgbValues[1].toInt();
diff --git a/quanta/components/csseditor/colorrequester.h b/quanta/components/csseditor/colorrequester.h
index e0b4be4f..baf95d86 100644
--- a/quanta/components/csseditor/colorrequester.h
+++ b/quanta/components/csseditor/colorrequester.h
@@ -17,7 +17,7 @@
#define COLORREQUESTER_H
#include <kpushbutton.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include "minieditor.h"
@@ -26,25 +26,25 @@ class KColorDialog;
class colorRequester : public miniEditor{
Q_OBJECT
public:
- colorRequester(QWidget *parent, const char* name=0);
+ colorRequester(TQWidget *parent, const char* name=0);
~colorRequester();
KLineEdit * lineEdit() const;
KPushButton * button() const { return myButton; }
virtual void connectToPropertySetter(propertySetter* p);
- //void setInitialValue(const QString&);
+ //void setInitialValue(const TQString&);
public slots:
void openColorDialog();
- void setInitialValue(/*const QString&*/);
+ void setInitialValue(/*const TQString&*/);
protected:
void init();
signals:
- void selectedColor(QColor);
- void textChanged(const QString&);
+ void selectedColor(TQColor);
+ void textChanged(const TQString&);
private:
mutable KColorDialog * myColorDialog;
KPushButton *myButton;
class colorRequesterPrivate;
colorRequesterPrivate *d;
- QColor m_initialValue;
+ TQColor m_initialValue;
};
#endif
diff --git a/quanta/components/csseditor/colorslider.cpp b/quanta/components/csseditor/colorslider.cpp
index 436c7e21..98019f23 100644
--- a/quanta/components/csseditor/colorslider.cpp
+++ b/quanta/components/csseditor/colorslider.cpp
@@ -15,8 +15,8 @@
* *
***************************************************************************/
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -29,27 +29,27 @@
-colorSlider::colorSlider(const QString& fn,const QString& l,const QString& c,const QString& r,QWidget *parent, const char *name) : miniEditor(parent,name) {
+colorSlider::colorSlider(const TQString& fn,const TQString& l,const TQString& c,const TQString& r,TQWidget *parent, const char *name) : miniEditor(parent,name) {
m_functionName = fn;
- QVBox *leftBox = new QVBox(this);
- QVBox *centerBox = new QVBox(this);
- QVBox *rightBox = new QVBox(this);
- QLabel *leftLabel = new QLabel("<b>" + l +"</b>",leftBox);
- QLabel *centerLabel = new QLabel(("<b>" + c +"</b>"),centerBox);
- QLabel *rightLabel = new QLabel(("<b>" + r +"</b>"),rightBox);
+ TQVBox *leftBox = new TQVBox(this);
+ TQVBox *centerBox = new TQVBox(this);
+ TQVBox *rightBox = new TQVBox(this);
+ TQLabel *leftLabel = new TQLabel("<b>" + l +"</b>",leftBox);
+ TQLabel *centerLabel = new TQLabel(("<b>" + c +"</b>"),centerBox);
+ TQLabel *rightLabel = new TQLabel(("<b>" + r +"</b>"),rightBox);
leftLabel->setAlignment(Qt::AlignHCenter);
centerLabel->setAlignment(Qt::AlignHCenter);
rightLabel->setAlignment(Qt::AlignHCenter);
leftLabel->setTextFormat (Qt::RichText ) ;
centerLabel->setTextFormat ( Qt::RichText ) ;
rightLabel->setTextFormat (Qt::RichText ) ;
- m_leftValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox);
- m_centerValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox);
- m_rightValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox);
+ m_leftValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox);
+ m_centerValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox);
+ m_rightValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox);
setSpacing(10);
- connect(m_leftValue, SIGNAL(valueChanged ( int)), this, SLOT(convertLeftValue(int)));
- connect(m_centerValue, SIGNAL(valueChanged ( int)), this, SLOT(convertCenterValue(int)));
- connect(m_rightValue, SIGNAL(valueChanged ( int)), this, SLOT(convertRightValue(int)));
+ connect(m_leftValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertLeftValue(int)));
+ connect(m_centerValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertCenterValue(int)));
+ connect(m_rightValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertRightValue(int)));
}
colorSlider::~colorSlider(){
@@ -59,26 +59,26 @@ colorSlider::~colorSlider(){
}
void colorSlider::connectToPropertySetter(propertySetter* p){
- connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&)));
+ connect( this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&)));
}
void colorSlider::convertLeftValue(int i){
- emit valueChanged(m_functionName + "(" + QString::number(i,10) + "," + QString::number(m_centerValue->value(),10) + "," +QString::number(m_rightValue->value(),10) +")");
+ emit valueChanged(m_functionName + "(" + TQString::number(i,10) + "," + TQString::number(m_centerValue->value(),10) + "," +TQString::number(m_rightValue->value(),10) +")");
}
void colorSlider::convertCenterValue(int i){
- emit valueChanged(m_functionName + "(" + QString::number(m_leftValue->value(),10) + "," + QString::number(i,10) + "," + QString::number(m_rightValue->value(),10) +")");
+ emit valueChanged(m_functionName + "(" + TQString::number(m_leftValue->value(),10) + "," + TQString::number(i,10) + "," + TQString::number(m_rightValue->value(),10) +")");
}
void colorSlider::convertRightValue(int i){
- emit valueChanged(m_functionName + "(" + QString::number(m_leftValue->value(),10) + "," + QString::number(m_centerValue->value(),10) + "," + QString::number(i,10) +")");
+ emit valueChanged(m_functionName + "(" + TQString::number(m_leftValue->value(),10) + "," + TQString::number(m_centerValue->value(),10) + "," + TQString::number(i,10) +")");
}
-RGBcolorSlider::RGBcolorSlider(QWidget *parent, const char *name) : colorSlider("rgb",i18n("Red"),i18n("Green"),i18n("Blue"),parent,name){
+RGBcolorSlider::RGBcolorSlider(TQWidget *parent, const char *name) : colorSlider("rgb",i18n("Red"),i18n("Green"),i18n("Blue"),parent,name){
}
//FOR CSS3
-/*HSLcolorSlider::HSLcolorSlider(QWidget *parent, const char *name) : colorSlider("hsl",i18n("Hue"),i18n("Saturation"),i18n("Lightness"),parent,name){
+/*HSLcolorSlider::HSLcolorSlider(TQWidget *parent, const char *name) : colorSlider("hsl",i18n("Hue"),i18n("Saturation"),i18n("Lightness"),parent,name){
}
*/
diff --git a/quanta/components/csseditor/colorslider.h b/quanta/components/csseditor/colorslider.h
index 41a78fa9..d2e0b11b 100644
--- a/quanta/components/csseditor/colorslider.h
+++ b/quanta/components/csseditor/colorslider.h
@@ -18,7 +18,7 @@
#ifndef COLORSLIDER_H
#define COLORSLIDER_H
-#include <qslider.h>
+#include <tqslider.h>
#include "minieditor.h"
@@ -31,13 +31,13 @@
class colorSlider : public miniEditor {
Q_OBJECT
private :
- QString m_functionName;
+ TQString m_functionName;
protected:
- QSlider *m_leftValue,
+ TQSlider *m_leftValue,
*m_centerValue,
*m_rightValue;
public:
- colorSlider(const QString& functionName,const QString& l=QString::null,const QString& c=QString::null,const QString& r=QString::null,QWidget *parent=0, const char *name=0);
+ colorSlider(const TQString& functionName,const TQString& l=TQString::null,const TQString& c=TQString::null,const TQString& r=TQString::null,TQWidget *parent=0, const char *name=0);
virtual ~colorSlider();
virtual void connectToPropertySetter(propertySetter* p);
@@ -47,13 +47,13 @@ class colorSlider : public miniEditor {
void convertRightValue(int i);
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
};
class RGBcolorSlider : public colorSlider {
Q_OBJECT
public:
- RGBcolorSlider(QWidget *parent=0, const char *name=0);
+ RGBcolorSlider(TQWidget *parent=0, const char *name=0);
~RGBcolorSlider(){}
};
@@ -61,7 +61,7 @@ class RGBcolorSlider : public colorSlider {
/*class HSLcolorSlider : public colorSlider {
Q_OBJECT
public:
- HSLcolorSlider(QWidget *parent=0, const char *name=0);
+ HSLcolorSlider(TQWidget *parent=0, const char *name=0);
~HSLcolorSlider();
};*/
diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp
index 692a8edf..553d5478 100644
--- a/quanta/components/csseditor/csseditor.cpp
+++ b/quanta/components/csseditor/csseditor.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
#include "csseditor.h"
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <klocale.h>
@@ -47,11 +47,11 @@
-myCheckListItem::myCheckListItem(QListView * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){
+myCheckListItem::myCheckListItem(TQListView * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){
m_sig = new QSignal;
}
-myCheckListItem::myCheckListItem(QCheckListItem * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){
+myCheckListItem::myCheckListItem(TQCheckListItem * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){
m_sig = new QSignal;
}
@@ -59,12 +59,12 @@ myCheckListItem::~myCheckListItem(){
delete m_sig;
}
-void myCheckListItem::connect( QObject *receiver, const char *member ){
+void myCheckListItem::connect( TQObject *receiver, const char *member ){
m_sig->connect( receiver, member );
}
void myCheckListItem::activate(){
- if(isOn()) QCheckListItem::activate();
+ if(isOn()) TQCheckListItem::activate();
}
void myCheckListItem::addCheckedChild() {
@@ -75,9 +75,9 @@ void myCheckListItem::stateChange (bool b){
if(!b) {
if(childCount()) {
- QListViewItem * child = firstChild();
+ TQListViewItem * child = firstChild();
while( child ) {
- m_sig->setValue(QVariant(child->text(0)));
+ m_sig->setValue(TQVariant(child->text(0)));
m_sig->activate();
static_cast<myCheckListItem*>(child)->setOn(false);
child = child->nextSibling();
@@ -90,12 +90,12 @@ void myCheckListItem::stateChange (bool b){
while( p ) {
if( p->m_checkedChildren != 1) {
p->m_checkedChildren--;
- m_sig->setValue(QVariant(text(0)));
+ m_sig->setValue(TQVariant(text(0)));
m_sig->activate();
break;
}
else {
- m_sig->setValue(QVariant(text(0)));
+ m_sig->setValue(TQVariant(text(0)));
m_sig->activate();
p->setOn(false);
}
@@ -103,7 +103,7 @@ void myCheckListItem::stateChange (bool b){
}
}
else {
- m_sig->setValue(QVariant(text(0)));
+ m_sig->setValue(TQVariant(text(0)));
m_sig->activate();
}
}
@@ -113,29 +113,29 @@ void myCheckListItem::stateChange (bool b){
}
}
-void CSSEditor::appendSub(QDomNodeList l, myCheckListItem *cli){
+void CSSEditor::appendSub(TQDomNodeList l, myCheckListItem *cli){
unsigned int i;
for(i=0;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(cli,l.item(i).toElement().tagName());
- item->connect(this,SLOT(removeProperty(const QVariant&)));
+ item->connect(this,TQT_SLOT(removeProperty(const TQVariant&)));
if(l.item(i).toElement().attribute("hasSub") == "yes")
appendSub(l.item(i).childNodes(),item);
}
}
-void CSSEditor::buildListView(QDomNodeList l, QListView *lv){
+void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){
unsigned int i;
for(i=0;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(lv,l.item(i).toElement().tagName());
- item->connect(this,SLOT(removeProperty(const QVariant&)));
+ item->connect(this,TQT_SLOT(removeProperty(const TQVariant&)));
if(l.item(i).toElement().attribute("hasSub") == "yes") {
- QDomNodeList listSub = l.item(i).childNodes();
+ TQDomNodeList listSub = l.item(i).childNodes();
appendSub(listSub,item);
}
}
}
-void CSSEditor::setCurrentPropOn(const QString& s){
+void CSSEditor::setCurrentPropOn(const TQString& s){
if( (m_currentProp = static_cast<myCheckListItem*>(lvVisual->findItem( s,0 )) ))
m_currentProp->setOn(true);
else
@@ -161,12 +161,12 @@ void CSSEditor::setCurrentPropOn(const QString& s){
}
- void CSSEditor::addAndSetPropertyOn(const QString& property, const QString& value){
+ void CSSEditor::addAndSetPropertyOn(const TQString& property, const TQString& value){
addProperty(property,value);
setCurrentPropOn(property);
}
- void CSSEditor::setSidesOfPropertyBorderOn(const QString& s){
+ void CSSEditor::setSidesOfPropertyBorderOn(const TQString& s){
static_cast<myCheckListItem*>(lvVisual->findItem( "border-top",0 ))->setOn(true);
static_cast<myCheckListItem*>(lvVisual->findItem( "border-right",0 ))->setOn(true);
static_cast<myCheckListItem*>(lvVisual->findItem( "border-bottom",0 ))->setOn(true);
@@ -184,20 +184,20 @@ void CSSEditor::hidePreviewer(){
void CSSEditor::initialize(){
m_config = kapp->config();
- connect(pbOk, SIGNAL(clicked()), this, SLOT(toggleShortendForm()));
+ connect(pbOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShortendForm()));
m_config->setGroup("CSSEditor Options");
SHckb->setChecked(m_config->readBoolEntry("Shorthand form enabled",false));
- QString configFile = locate("appdata", "csseditor/config.xml");
+ TQString configFile = locate("appdata", "csseditor/config.xml");
m_myhi = new QMyHighlighter(display);
- QBoxLayout *fPreviewLayout = new QBoxLayout(fPreview,QBoxLayout::LeftToRight);
+ TQBoxLayout *fPreviewLayout = new TQBoxLayout(fPreview,TQBoxLayout::LeftToRight);
m_previewer=new KHTMLPart(fPreview);
fPreviewLayout->addWidget(m_previewer->view());
- QFile file( configFile );
+ TQFile file( configFile );
if ( !file.open( IO_ReadOnly ) ) {
return;
}
@@ -207,11 +207,11 @@ void CSSEditor::initialize(){
}
file.close();
- QDomElement docElem = m_doc.documentElement();
+ TQDomElement docElem = m_doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() ) {
if( e.attribute("type") == "visual") {
lvVisual->setRootIsDecorated(true);
@@ -239,32 +239,32 @@ void CSSEditor::initialize(){
Connect();
- QBoxLayout *fEditingLayout = new QBoxLayout(fEditing,QBoxLayout::LeftToRight);
+ TQBoxLayout *fEditingLayout = new TQBoxLayout(fEditing,TQBoxLayout::LeftToRight);
m_ps = new propertySetter(fEditing);
fEditingLayout->addWidget(m_ps);
- connect(m_ps, SIGNAL(valueChanged(const QString&)), this, SLOT(checkProperty(const QString&)));
+ connect(m_ps, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(checkProperty(const TQString&)));
- QStringList props;
- QString temp;
+ TQStringList props;
+ TQString temp;
bool normalMode = true;
if( !m_selectorName.isEmpty() ){ //the cssselector has been called
m_initialProperties = m_initialProperties.stripWhiteSpace();
- props=QStringList::split(";",m_initialProperties);
+ props=TQStringList::split(";",m_initialProperties);
temp= m_selectorName + " {\n\t" ;
}
else {
m_InlineStyleContent = m_InlineStyleContent.stripWhiteSpace();
normalMode = false;
- props=QStringList::split(";",m_InlineStyleContent);
+ props=TQStringList::split(";",m_InlineStyleContent);
temp="\n\t";
}
- for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) {
- const QString propertyName((*it).section(":",0,0).stripWhiteSpace());
- const QString propertyValue((*it).section(":",1));
+ for ( TQStringList::Iterator it = props.begin(); it != props.end(); ++it ) {
+ const TQString propertyName((*it).section(":",0,0).stripWhiteSpace());
+ const TQString propertyValue((*it).section(":",1));
if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) {
temp+= propertyName + " : " + propertyValue +";\n\t";
@@ -272,8 +272,8 @@ void CSSEditor::initialize(){
}
else{
ShorthandFormer decompressor;
- QMap<QString,QString> expandedProperties = decompressor.expand(propertyName, propertyValue );
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString> expandedProperties = decompressor.expand(propertyName, propertyValue );
+ TQMap<TQString,TQString>::Iterator it;
for ( it = expandedProperties.begin(); it != expandedProperties.end(); ++it ) {
addAndSetPropertyOn( it.key(), it.data() );
@@ -296,7 +296,7 @@ void CSSEditor::toggleShortendForm()
m_config->sync();
}
-CSSEditor::CSSEditor(QListViewItem *i, QWidget *parent, const char *name) : CSSEditorS(parent, name){
+CSSEditor::CSSEditor(TQListViewItem *i, TQWidget *parent, const char *name) : CSSEditorS(parent, name){
m_selectorName = i->text(0);
m_initialProperties = i->text(1);
}
@@ -307,21 +307,21 @@ CSSEditor::~CSSEditor() {
delete m_previewer;
}
-void CSSEditor::setMiniEditors(QListViewItem* i){
+void CSSEditor::setMiniEditors(TQListViewItem* i){
m_ps->reset();
if(i->childCount()==0) {
m_currentProp = static_cast<myCheckListItem*>(i);
- QDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes();
+ TQDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes();
unsigned int i;
for(i=0; i<valueTypes.length(); i++) {
- QDomElement curr =valueTypes.item(i).toElement();
- QString valueTypeName(curr.tagName());
+ TQDomElement curr =valueTypes.item(i).toElement();
+ TQString valueTypeName(curr.tagName());
if(valueTypeName =="list") {
m_ps->setComboBox();
- QStringList values = QStringList::split(",",curr.attribute("value"));
+ TQStringList values = TQStringList::split(",",curr.attribute("value"));
m_ps->ComboBox()->insertStringList(values);
if(m_properties.contains(m_currentProp->text(0)) !=0 )
if( values.contains(m_currentProp->text(0)))
@@ -362,7 +362,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
if(m_properties.contains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(QString::null);
+ editor->setInitialValue(TQString::null);
m_ps->installMiniEditor(editor);
}
else
@@ -381,13 +381,13 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
doubleLengthEditor *editor = new doubleLengthEditor(m_ps);
if(m_properties.contains(m_currentProp->text(0)) !=0 ){
- QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()),
+ TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()),
sx(temp.section(" ",0,0)),
dx(temp.section(" ",1,1));
editor->setInitialValue(sx,dx);
}
- else editor->setInitialValue(QString::null,QString::null);
+ else editor->setInitialValue(TQString::null,TQString::null);
m_ps->installMiniEditor(editor);
}
else
@@ -395,13 +395,13 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
doublePercentageEditor *editor = new doublePercentageEditor(m_ps);
if(m_properties.contains(m_currentProp->text(0)) !=0 ){
- QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()),
+ TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()),
sx(temp.section(" ",0,0)),
dx(temp.section(" ",1,1));
editor->setInitialValue(sx,dx);
}
- else editor->setInitialValue(QString::null,QString::null);
+ else editor->setInitialValue(TQString::null,TQString::null);
m_ps->installMiniEditor(editor);
}
else
@@ -410,7 +410,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
if(m_properties.contains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(QString::null);
+ editor->setInitialValue(TQString::null);
m_ps->installMiniEditor(editor);
}
else
@@ -419,7 +419,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
if(m_properties.contains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(QString::null);
+ editor->setInitialValue(TQString::null);
m_ps->installMiniEditor(editor);
}
else
@@ -428,7 +428,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
if(m_properties.contains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(QString::null);
+ editor->setInitialValue(TQString::null);
m_ps->installMiniEditor(editor);
}
else
@@ -467,8 +467,8 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
else
if( valueTypeName =="doubleList") {
doubleComboBoxEditor *editor = new doubleComboBoxEditor(m_ps);
- editor->cbSx()->insertStringList(QStringList::split(",",curr.firstChild().toElement().attribute("value")));
- editor->cbDx()->insertStringList(QStringList::split(",",curr.lastChild().toElement().attribute("value")));
+ editor->cbSx()->insertStringList(TQStringList::split(",",curr.firstChild().toElement().attribute("value")));
+ editor->cbDx()->insertStringList(TQStringList::split(",",curr.lastChild().toElement().attribute("value")));
m_ps->installMiniEditor(editor);
}
else
@@ -477,7 +477,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
if(m_properties.contains(m_currentProp->text(0)) !=0 ){
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
}
- else editor->setInitialValue(QString::null);
+ else editor->setInitialValue(TQString::null);
m_ps->installMiniEditor(editor);
}
}
@@ -486,7 +486,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){
}
}
-void CSSEditor::checkProperty(const QString& v){
+void CSSEditor::checkProperty(const TQString& v){
if(!m_currentProp->isOn())
m_currentProp->setOn(true);
@@ -500,7 +500,7 @@ void CSSEditor::checkProperty(const QString& v){
if(m_currentProp->text(0) =="border-style" ){
setSidesOfPropertyBorderOn("style");
- QStringList values = QStringList::split(" ",v.stripWhiteSpace());
+ TQStringList values = TQStringList::split(" ",v.stripWhiteSpace());
addProperty("border-top-style",values[0]);
switch(values.count()) {
case 1:
@@ -530,7 +530,7 @@ void CSSEditor::checkProperty(const QString& v){
else
if(m_currentProp->text(0) =="border-width" ){
setSidesOfPropertyBorderOn("width");
- QStringList values = QStringList::split(" ",v.stripWhiteSpace());
+ TQStringList values = TQStringList::split(" ",v.stripWhiteSpace());
addProperty("border-top-width",values[0]);
switch(values.count()) {
case 1:
@@ -560,7 +560,7 @@ void CSSEditor::checkProperty(const QString& v){
else
if(m_currentProp->text(0) =="border-color" ){
setSidesOfPropertyBorderOn("color");
- QStringList values = QStringList::split(" ",v.stripWhiteSpace());
+ TQStringList values = TQStringList::split(" ",v.stripWhiteSpace());
addProperty("border-top-color",values[0]);
switch(values.count()) {
case 1:
@@ -592,22 +592,22 @@ void CSSEditor::checkProperty(const QString& v){
}
void CSSEditor::Connect(){
- connect(this, SIGNAL(signalUpdatePreview()), this, SLOT(updatePreview()));
- connect(lvVisual,SIGNAL(selectionChanged ( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * )));
- connect(lvAll,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * )));
- connect(lvAural,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * )));
- connect(lvInteractive,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * )));
- connect(lvPaged,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * )));
+ connect(this, TQT_SIGNAL(signalUpdatePreview()), this, TQT_SLOT(updatePreview()));
+ connect(lvVisual,TQT_SIGNAL(selectionChanged ( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * )));
+ connect(lvAll,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * )));
+ connect(lvAural,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * )));
+ connect(lvInteractive,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * )));
+ connect(lvPaged,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * )));
}
-void CSSEditor::removeProperty(const QVariant& v){
+void CSSEditor::removeProperty(const TQVariant& v){
m_properties.remove(v.toString());
updatePreview();
}
-QString CSSEditor::generateProperties(){
- QString props;
- QMap<QString,QString>::Iterator it;
+TQString CSSEditor::generateProperties(){
+ TQString props;
+ TQMap<TQString,TQString>::Iterator it;
if(!SHckb->isChecked()) {
for ( it = m_properties.begin(); it != m_properties.end(); ++it )
props+= it.key() + " : " + it.data().stripWhiteSpace() + "; " ;
@@ -628,7 +628,7 @@ void CSSEditor::updatePreview(){
void CSSEditor::activatePreview() {
if(!m_isFileToPreviewExternal){
- QString testHeader,
+ TQString testHeader,
testFooter,
testBody;
@@ -641,7 +641,7 @@ void CSSEditor::activatePreview() {
testFooter = "\"" ;
}
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for ( it = m_properties.begin(); it != m_properties.end(); ++it )
testBody+= it.key() + " : " + it.data() + ";";
@@ -652,22 +652,22 @@ void CSSEditor::activatePreview() {
}
else {
- QString tmp("{");
- QFile file(m_fileToPreview);
+ TQString tmp("{");
+ TQFile file(m_fileToPreview);
if ( file.open( IO_ReadOnly ) ) {
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for ( it = m_properties.begin(); it != m_properties.end(); ++it )
tmp+= it.key() + " : " + it.data() + ";";
- QFileInfo fi(m_fileToPreview);
+ TQFileInfo fi(m_fileToPreview);
KParts::URLArgs a;
if(fi.extension().lower() == "xml" || fi.extension().lower() == "xhtml")
a.serviceType="text/xml";
if(fi.extension().lower() == "html" || fi.extension().lower() == "html")
a.serviceType="text/xml";
m_previewer->browserExtension()->setURLArgs(a);
- QTextStream stream( &file );
+ TQTextStream stream( &file );
m_previewer->begin(KURL(m_fileToPreview));
m_previewer->write(stream.read());
@@ -680,8 +680,8 @@ void CSSEditor::activatePreview() {
}
void CSSEditor::updateDisplay(){
- QString toDisplay;
- QMap<QString,QString>::Iterator it;
+ TQString toDisplay;
+ TQMap<TQString,TQString>::Iterator it;
for ( it = m_properties.begin(); it != m_properties.end(); ++it )
toDisplay += it.key() + " : " + it.data() + ";\n\t";
diff --git a/quanta/components/csseditor/csseditor.h b/quanta/components/csseditor/csseditor.h
index 6994a686..3bb44228 100644
--- a/quanta/components/csseditor/csseditor.h
+++ b/quanta/components/csseditor/csseditor.h
@@ -18,12 +18,12 @@
#ifndef CSSEDITOR_H
#define CSSEDITOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "csseditors.h"
-#include <qdom.h>
-#include <qmap.h>
-#include <qlistview.h>
-#include <qsignal.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqlistview.h>
+#include <tqsignal.h>
class propertySetter;
class KConfig;
@@ -37,14 +37,14 @@ class QMyHighlighter;
class myCheckListItem : public QCheckListItem
{
private:
- QSignal *m_sig;
+ TQSignal *m_sig;
unsigned int m_checkedChildren;
public :
- myCheckListItem(QCheckListItem * parent, const QString & text);
- myCheckListItem(QListView * parent, const QString & text);
+ myCheckListItem(TQCheckListItem * parent, const TQString & text);
+ myCheckListItem(TQListView * parent, const TQString & text);
~myCheckListItem();
- void connect( QObject *receiver, const char *member );
+ void connect( TQObject *receiver, const char *member );
void addCheckedChild();
protected :
@@ -61,9 +61,9 @@ class CSSEditor : public CSSEditorS
propertySetter *m_ps;
myCheckListItem *m_currentProp;
KHTMLPart *m_previewer;
- QDomDocument m_doc;
- QMap<QString,QString> m_properties;
- QString m_selectorName,
+ TQDomDocument m_doc;
+ TQMap<TQString,TQString> m_properties;
+ TQString m_selectorName,
m_initialProperties,
m_Selectors,
m_Header,
@@ -79,36 +79,36 @@ class CSSEditor : public CSSEditorS
//sourceFileName;
void Connect();
- void appendSub(QDomNodeList, myCheckListItem *);
- void buildListView(QDomNodeList, QListView *);
+ void appendSub(TQDomNodeList, myCheckListItem *);
+ void buildListView(TQDomNodeList, TQListView *);
void updateDisplay();
void activatePreview();
- void setCurrentPropOn(const QString& s);
- void addProperty(const QString& property, const QString& value) { m_properties[property] = value; }
- void addAndSetPropertyOn(const QString& property, const QString& value);
- void setSidesOfPropertyBorderOn(const QString& s);
+ void setCurrentPropOn(const TQString& s);
+ void addProperty(const TQString& property, const TQString& value) { m_properties[property] = value; }
+ void addAndSetPropertyOn(const TQString& property, const TQString& value);
+ void setSidesOfPropertyBorderOn(const TQString& s);
private slots:
- void checkProperty(const QString&);
- void removeProperty(const QVariant&);
+ void checkProperty(const TQString&);
+ void removeProperty(const TQVariant&);
void updatePreview();
- void setMiniEditors(QListViewItem*);
+ void setMiniEditors(TQListViewItem*);
void toggleShortendForm();
public:
- CSSEditor(QWidget* parent=0, const char *name=0): CSSEditorS(parent, name), m_config(0L){}
- CSSEditor( QListViewItem * i, QWidget* parent=0, const char *name=0);
+ CSSEditor(TQWidget* parent=0, const char *name=0): CSSEditorS(parent, name), m_config(0L){}
+ CSSEditor( TQListViewItem * i, TQWidget* parent=0, const char *name=0);
~CSSEditor();
void initialize();
- void setSelectors( const QString& s) { m_Selectors = s; }
- void setHeader( const QString& s) { m_Header = s; }
- void setFooter( const QString& s) { m_Footer = s;}
- void setInlineStyleContent( const QString& s){ m_InlineStyleContent = s; }
- QString generateProperties();
+ void setSelectors( const TQString& s) { m_Selectors = s; }
+ void setHeader( const TQString& s) { m_Header = s; }
+ void setFooter( const TQString& s) { m_Footer = s;}
+ void setInlineStyleContent( const TQString& s){ m_InlineStyleContent = s; }
+ TQString generateProperties();
void hidePreviewer();
- void setFileToPreview(const QString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;}
- void setExternalStyleSheetDefinition(const QString& s) { m_externalStyleSheetDefinition = s;}
+ void setFileToPreview(const TQString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;}
+ void setExternalStyleSheetDefinition(const TQString& s) { m_externalStyleSheetDefinition = s;}
signals:
void signalUpdatePreview();
diff --git a/quanta/components/csseditor/csseditor_globals.cpp b/quanta/components/csseditor/csseditor_globals.cpp
index a73cb876..c2be79c0 100644
--- a/quanta/components/csseditor/csseditor_globals.cpp
+++ b/quanta/components/csseditor/csseditor_globals.cpp
@@ -15,25 +15,25 @@
* *
***************************************************************************/
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "csseditor_globals.h"
-mySpinBox::mySpinBox(QWidget * parent , const char * name ) : QSpinBox (parent, name){
- connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & )));
- connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & )));
+mySpinBox::mySpinBox(TQWidget * parent , const char * name ) : TQSpinBox (parent, name){
+ connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkSuffix( const TQString & )));
+ connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged( const TQString & )));
}
-mySpinBox::mySpinBox( int minValue, int maxValue, int step, QWidget * parent, const char * name ) : QSpinBox( minValue, maxValue, step, parent,name ){
- connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & )));
- connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & )));
+mySpinBox::mySpinBox( int minValue, int maxValue, int step, TQWidget * parent, const char * name ) : TQSpinBox( minValue, maxValue, step, parent,name ){
+ connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkSuffix( const TQString & )));
+ connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged( const TQString & )));
}
mySpinBox::~mySpinBox(){}
-void mySpinBox::checkSuffix(const QString&){// check if the suffix is present and how many times : it normalizes these times to one
+void mySpinBox::checkSuffix(const TQString&){// check if the suffix is present and how many times : it normalizes these times to one
if(!suffix().isEmpty()){
- const QString suf(suffix());
- QString t(editor()->text());
+ const TQString suf(suffix());
+ TQString t(editor()->text());
if( t.contains(suf) ==0 ) {
editor()->setText( t + suf);
editor()->setCursorPosition(editor()->cursorPosition() - 1);
diff --git a/quanta/components/csseditor/csseditor_globals.h b/quanta/components/csseditor/csseditor_globals.h
index fefae7c8..b577981e 100644
--- a/quanta/components/csseditor/csseditor_globals.h
+++ b/quanta/components/csseditor/csseditor_globals.h
@@ -17,12 +17,12 @@
#ifndef CSSEDITOR_GLOBALS_H
#define CSSEDITOR_GLOBALS_H
-#include <qspinbox.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqspinbox.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
namespace CSSEditorGlobals {
-const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,"
+const TQStringList HTMLColors(TQStringList::split(",",TQString("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,"
"blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,"
"cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,"
"darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,"
@@ -42,21 +42,21 @@ const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewh
"yellow,yellowgreen")));
- const QStringList lengthUnits(QStringList::split(",",QString("cm,em,ex,in,mm,pc,pt,px")));
- const QStringList frequencyUnits(QStringList::split(",",QString("Hz,kHz")));
- const QStringList angleUnits(QStringList::split(",",QString("deg,rad,grad")));
- const QStringList timeUnits(QStringList::split(",",QString("s,ms")));
+ const TQStringList lengthUnits(TQStringList::split(",",TQString("cm,em,ex,in,mm,pc,pt,px")));
+ const TQStringList frequencyUnits(TQStringList::split(",",TQString("Hz,kHz")));
+ const TQStringList angleUnits(TQStringList::split(",",TQString("deg,rad,grad")));
+ const TQStringList timeUnits(TQStringList::split(",",TQString("s,ms")));
}
class mySpinBox : public QSpinBox{
Q_OBJECT
public:
- mySpinBox(QWidget * parent = 0, const char * name = 0 );
- mySpinBox( int minValue, int maxValue, int step = 1, QWidget * parent = 0, const char * name = 0 );
+ mySpinBox(TQWidget * parent = 0, const char * name = 0 );
+ mySpinBox( int minValue, int maxValue, int step = 1, TQWidget * parent = 0, const char * name = 0 );
~mySpinBox();
public slots:
- void checkSuffix(const QString&);
+ void checkSuffix(const TQString&);
};
diff --git a/quanta/components/csseditor/cssselector.cpp b/quanta/components/csseditor/cssselector.cpp
index 1425102f..73460c05 100644
--- a/quanta/components/csseditor/cssselector.cpp
+++ b/quanta/components/csseditor/cssselector.cpp
@@ -18,16 +18,16 @@
#include "cssselector.h"
#include "csseditor.h"
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qtabwidget.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqtabwidget.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -39,7 +39,7 @@
#include "stylesheetparser.h"
-CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) {
+CSSSelector::CSSSelector(TQWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) {
m_currentItem = 0L;
@@ -47,15 +47,15 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare
kurApplyToFile->fileDialog()->setURL(Project::ref()->projectBaseURL().url());
kurApplyToFile->fileDialog()->setFilter( "*.html *.htm |" + i18n("HTML Files") +" (*.html *.htm)\n*.xhtml |" + i18n("XHTML Files")+" (*.xhtml)\n*.xml |" + i18n("XML Files")+" (*.xml)\n*.*|" + i18n("All Files")+" (*.*)" );
- QWhatsThis::add((QLineEdit*)(kurApplyToFile->lineEdit()),"With this line edit you can insert the URL of the file you want to use to preview the style sheet you are editing");
+ TQWhatsThis::add((TQLineEdit*)(kurApplyToFile->lineEdit()),"With this line edit you can insert the URL of the file you want to use to preview the style sheet you are editing");
- /*QString configDir = locate("appdata", "csseditor/config.xml");
- configDir = QFileInfo(configDir).dirPath() + "/";*/
+ /*TQString configDir = locate("appdata", "csseditor/config.xml");
+ configDir = TQFileInfo(configDir).dirPath() + "/";*/
- QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/";
+ TQString configDir = TQFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/";
- QDomDocument doc;
- QFile file( configDir+"pseudo.xml" );
+ TQDomDocument doc;
+ TQFile file( configDir+"pseudo.xml" );
if ( !file.open( IO_ReadOnly ) )
return;
if ( !doc.setContent( &file ) ) {
@@ -64,11 +64,11 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare
}
file.close();
- QDomElement docElem = doc.documentElement();
+ TQDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() ) {
cbPseudo->insertItem(e.attribute("name"));
}
@@ -84,17 +84,17 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare
}
file.close();
- QStringList dtdNames,
+ TQStringList dtdNames,
dtdNickNames;
docElem = doc.documentElement();
n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() ) {
dtdNames.append(e.attribute("name"));
dtdNickNames.append(e.attribute("nickName"));
if(e.attribute("default") == "yes") {
- QStringList tagList = QStringList::split( ',',e.text() );
+ TQStringList tagList = TQStringList::split( ',',e.text() );
tagList.sort();
cbTag->insertStringList( tagList );
cbTag->setAutoCompletion(true);
@@ -110,43 +110,43 @@ CSSSelector::~CSSSelector(){
void CSSSelector::Connect(){
- connect(cbDTD,SIGNAL(activated(const QString&)),this,SLOT(setDTDTags(const QString&)));
+ connect(cbDTD,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(setDTDTags(const TQString&)));
- connect(pbAddTag,SIGNAL(clicked()), this ,SLOT(addTag()));
- connect(pbAddClass,SIGNAL(clicked()), this ,SLOT(addClass()));
- connect(pbAddID,SIGNAL(clicked()), this ,SLOT(addID()));
- connect(pbAddPseudo,SIGNAL(clicked()), this ,SLOT(addPseudo()));
+ connect(pbAddTag,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addTag()));
+ connect(pbAddClass,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addClass()));
+ connect(pbAddID,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addID()));
+ connect(pbAddPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addPseudo()));
- connect(lvTags, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *)));
- connect(lvClasses, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *)));
- connect(lvIDs, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *)));
- connect(lvPseudo, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *)));
+ connect(lvTags, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *)));
+ connect(lvClasses, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *)));
+ connect(lvIDs, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *)));
+ connect(lvPseudo, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *)));
- connect(lvTags, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *)));
- connect(lvClasses, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *)));
- connect(lvIDs, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *)));
- connect(lvPseudo, SIGNAL( selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *)));
+ connect(lvTags, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *)));
+ connect(lvClasses, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *)));
+ connect(lvIDs, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *)));
+ connect(lvPseudo, TQT_SIGNAL( selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *)));
- connect(pbRemoveSelectedTag,SIGNAL(clicked()), this ,SLOT(removeSelected()));
- connect(pbRemoveSelectedClass,SIGNAL(clicked()), this ,SLOT(removeSelected()));
- connect(pbRemoveSelectedID,SIGNAL(clicked()), this ,SLOT(removeSelected()));
- connect(pbRemoveSelectedPseudo,SIGNAL(clicked()), this ,SLOT(removeSelected()));
+ connect(pbRemoveSelectedTag,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected()));
+ connect(pbRemoveSelectedClass,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected()));
+ connect(pbRemoveSelectedID,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected()));
+ connect(pbRemoveSelectedPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected()));
- connect(twSelectors,SIGNAL(currentChanged ( QWidget * )), this ,SLOT(setCurrentListView( QWidget * )));
+ connect(twSelectors,TQT_SIGNAL(currentChanged ( TQWidget * )), this ,TQT_SLOT(setCurrentListView( TQWidget * )));
- connect(pbRemoveAllTags,SIGNAL(clicked()), this ,SLOT(removeAll()));
- connect(pbRemoveAllClasses,SIGNAL(clicked()), this ,SLOT(removeAll()));
- connect(pbRemoveAllIDs,SIGNAL(clicked()), this ,SLOT(removeAll()));
- connect(pbRemoveAllPseudo,SIGNAL(clicked()), this ,SLOT(removeAll()));
+ connect(pbRemoveAllTags,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll()));
+ connect(pbRemoveAllClasses,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll()));
+ connect(pbRemoveAllIDs,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll()));
+ connect(pbRemoveAllPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll()));
}
-void CSSSelector::setDTDTags(const QString& s){
+void CSSSelector::setDTDTags(const TQString& s){
- QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/";
+ TQString configDir = TQFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/";
- QDomDocument doc;
+ TQDomDocument doc;
- QFile file( configDir+"dtdTags.xml" );
+ TQFile file( configDir+"dtdTags.xml" );
if ( !file.open( IO_ReadOnly ) )
return;
if ( !doc.setContent( &file ) ) {
@@ -155,15 +155,15 @@ void CSSSelector::setDTDTags(const QString& s){
}
file.close();
- QStringList dtdNames;
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQStringList dtdNames;
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
if( n.toElement().attribute("nickName") == s )
break;
n = n.nextSibling();
}
- QStringList tagList = QStringList::split( ',',n.toElement().text() );
+ TQStringList tagList = TQStringList::split( ',',n.toElement().text() );
tagList.sort();
cbTag->clear();
cbTag->insertStringList( tagList );
@@ -171,50 +171,50 @@ void CSSSelector::setDTDTags(const QString& s){
}
void CSSSelector::addTag(){
- QListViewItem *item = new QListViewItem(lvTags);
+ TQListViewItem *item = new TQListViewItem(lvTags);
if(!cbTag->currentText().isEmpty()){
item->setText(0,cbTag->currentText());
- QPair<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> tmp(TQString::null,++m_orderNumber);
m_currentStylesheetStructure[item->text(0)]=tmp;
}
}
void CSSSelector::addClass(){
- QListViewItem *item = new QListViewItem(lvClasses);
+ TQListViewItem *item = new TQListViewItem(lvClasses);
if(!leClass->text().isEmpty()){
item->setText(0,leClass->text());
- QPair<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> tmp(TQString::null,++m_orderNumber);
m_currentStylesheetStructure[item->text(0)]=tmp;
}
}
void CSSSelector::addID(){
- QListViewItem *item = new QListViewItem(lvIDs);
+ TQListViewItem *item = new TQListViewItem(lvIDs);
if(!leID->text().isEmpty()){
item->setText(0,leID->text());
- QPair<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> tmp(TQString::null,++m_orderNumber);
m_currentStylesheetStructure[item->text(0)]=tmp;
}
}
void CSSSelector::addPseudo(){
- QListViewItem *item = new QListViewItem(lvPseudo);
+ TQListViewItem *item = new TQListViewItem(lvPseudo);
item->setText(0,(lePseudoSelector->text()+":"+cbPseudo->currentText()).stripWhiteSpace());
- QPair<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> tmp(TQString::null,++m_orderNumber);
m_currentStylesheetStructure[item->text(0)]=tmp;
}
-void CSSSelector::openCSSEditor(QListViewItem * i){
+void CSSSelector::openCSSEditor(TQListViewItem * i){
if(!m_stopProcessingStylesheet){
- QListView *lv = i->listView();
- QListViewItem *temp;
- QString s;
- QObjectList *l = queryList( "QListView" );
- QObjectListIt it( *l ); // iterate over the listviews
- QObject *obj;
+ TQListView *lv = i->listView();
+ TQListViewItem *temp;
+ TQString s;
+ TQObjectList *l = queryList( "TQListView" );
+ TQObjectListIt it( *l ); // iterate over the listviews
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
- QListView *lvTemp = (QListView*)obj;
+ TQListView *lvTemp = (TQListView*)obj;
if( lv != lvTemp){
temp = lvTemp->firstChild();
while(temp){
@@ -246,8 +246,8 @@ void CSSSelector::openCSSEditor(QListViewItem * i){
else {
dlg.setFileToPreview(kurApplyToFile->url(),true);
- QString tmp;
- QListViewItem *item = lvTags->firstChild();
+ TQString tmp;
+ TQListViewItem *item = lvTags->firstChild();
while( item ) {
if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace())
tmp += item->text(0) + " {" + item->text(1) + "}";
@@ -283,22 +283,22 @@ void CSSSelector::openCSSEditor(QListViewItem * i){
if(dlg.exec()) {
i->setText(1,dlg.generateProperties());
- QPair<QString, unsigned int> tmp(m_currentStylesheetStructure[i->text(0)]);
+ QPair<TQString, unsigned int> tmp(m_currentStylesheetStructure[i->text(0)]);
tmp.first = dlg.generateProperties();
m_currentStylesheetStructure[i->text(0)] = tmp;
}
}
}
-void CSSSelector::setCurrentListView(QWidget* w){
- QObjectList *l = w->queryList( "QListView" );
- m_currentListView = static_cast<QListView*>(l->first());
+void CSSSelector::setCurrentListView(TQWidget* w){
+ TQObjectList *l = w->queryList( "TQListView" );
+ m_currentListView = static_cast<TQListView*>(l->first());
}
void CSSSelector::removeAll(){
- QListViewItemIterator it( m_currentListView );
+ TQListViewItemIterator it( m_currentListView );
while ( it.current() ) {
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
m_currentStylesheetStructure.remove(item->text(0));
++it;
}
@@ -313,30 +313,30 @@ void CSSSelector::removeSelected(){
}
}
-void CSSSelector::loadCSSContent(const QString& s){
+void CSSSelector::loadCSSContent(const TQString& s){
stylesheetParser p(s);
- connect(&p,SIGNAL(errorOccurred(const QString&)), this, SLOT(setStylesheetProcessing(const QString&)));
+ connect(&p,TQT_SIGNAL(errorOccurred(const TQString&)), this, TQT_SLOT(setStylesheetProcessing(const TQString&)));
p.parse();
m_orderNumber = p.orderNumber();
- QMap<QString, QPair<QString,unsigned int> >::Iterator it;
+ TQMap<TQString, QPair<TQString,unsigned int> >::Iterator it;
m_currentStylesheetStructure = p.stylesheetStructure();
for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) {
if(!it.key().startsWith("@rule") && !it.key().startsWith("/*")){
- QListViewItem *item;
+ TQListViewItem *item;
if(it.key().contains(":")){
- item = new QListViewItem(lvPseudo);
+ item = new TQListViewItem(lvPseudo);
}
else
if(it.key().contains("#")){
- item = new QListViewItem(lvIDs);
+ item = new TQListViewItem(lvIDs);
}
else
if(it.key().contains(".")){
- item = new QListViewItem(lvClasses);
+ item = new TQListViewItem(lvClasses);
}
else {
- item = new QListViewItem(lvTags);
+ item = new TQListViewItem(lvTags);
}
item->setText(0,it.key());
@@ -346,27 +346,27 @@ void CSSSelector::loadCSSContent(const QString& s){
}
}
-QString CSSSelector::generateFormattedStyleSection(){
- QMap< QString,QPair<QString,unsigned int> >::Iterator it;
- QString styleSection,tmpStr;
+TQString CSSSelector::generateFormattedStyleSection(){
+ TQMap< TQString,QPair<TQString,unsigned int> >::Iterator it;
+ TQString styleSection,tmpStr;
unsigned int indentWidth,
indentDisplacement = 2;
for ( unsigned int i=0;i<=m_orderNumber;i++ ) {
for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) {
- QString key = it.key();
+ TQString key = it.key();
if(it.data().second == i){
if(key.startsWith("@rule"))
styleSection += it.data().first;
else if(key.startsWith("/*"))
styleSection += it.data().first;
else {
- key.remove(QRegExp("-v[\\d]+$"));
+ key.remove(TQRegExp("-v[\\d]+$"));
styleSection += "\n" + key + " {\n";
indentWidth = indentDisplacement + 2;
- QStringList props = QStringList::split(";",it.data().first.simplifyWhiteSpace());
- QString indentStr;
+ TQStringList props = TQStringList::split(";",it.data().first.simplifyWhiteSpace());
+ TQString indentStr;
indentStr.fill(' ',indentWidth);
- for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) {
+ for ( TQStringList::Iterator it = props.begin(); it != props.end(); ++it ) {
if((*it).startsWith(" "))
tmpStr += indentStr + (*it).remove(0,1) + ";\n";
else
@@ -374,7 +374,7 @@ QString CSSSelector::generateFormattedStyleSection(){
}
indentStr.fill(' ', indentDisplacement);
styleSection += tmpStr + indentStr + "}\n\n";
- tmpStr = QString::null;
+ tmpStr = TQString::null;
}
}
}
@@ -387,7 +387,7 @@ void CSSSelector::enableApplyToFile(){
kurApplyToFile->setEnabled(true);
}
-void CSSSelector::setStylesheetProcessing(const QString& msg) {
+void CSSSelector::setStylesheetProcessing(const TQString& msg) {
m_stopProcessingStylesheet=true;
KMessageBox::error (0L, msg );
}
diff --git a/quanta/components/csseditor/cssselector.h b/quanta/components/csseditor/cssselector.h
index f4d42e89..a569929a 100644
--- a/quanta/components/csseditor/cssselector.h
+++ b/quanta/components/csseditor/cssselector.h
@@ -18,8 +18,8 @@
#ifndef CSSSELECTOR_H
#define CSSSELECTOR_H
-#include <qmap.h>
-#include <qpair.h>
+#include <tqmap.h>
+#include <tqpair.h>
#include "cssselectors.h"
class QListViewItem;
@@ -32,42 +32,42 @@ class CSSSelector : public CSSSelectorS {
Q_OBJECT
private:
- QListViewItem *m_currentItem;
- QListView *m_currentListView;
- QString m_header,
+ TQListViewItem *m_currentItem;
+ TQListView *m_currentListView;
+ TQString m_header,
m_footer,
m_callingFrom,
m_fileToPreview;
- QMap<QString, QPair<QString,unsigned int> > m_currentStylesheetStructure;
+ TQMap<TQString, QPair<TQString,unsigned int> > m_currentStylesheetStructure;
unsigned int m_orderNumber;
bool m_stopProcessingStylesheet;
void Connect();
public:
- CSSSelector(QWidget *parent=0, const char* name=0);
+ CSSSelector(TQWidget *parent=0, const char* name=0);
~CSSSelector();
- void loadCSSContent(const QString& s);
- void setHeader(const QString& h) { m_header = h; }
- void setFooter(const QString& f) { m_footer = f; }
+ void loadCSSContent(const TQString& s);
+ void setHeader(const TQString& h) { m_header = h; }
+ void setFooter(const TQString& f) { m_footer = f; }
void enableApplyToFile();
- void setCallingFrom(const QString& cf){ m_callingFrom = cf ;}
- void setFileToPreview(const QString& s){ m_fileToPreview=s;}
+ void setCallingFrom(const TQString& cf){ m_callingFrom = cf ;}
+ void setFileToPreview(const TQString& s){ m_fileToPreview=s;}
bool errorOnProcessingStylesheet() const { return m_stopProcessingStylesheet; }
- QString generateFormattedStyleSection();
+ TQString generateFormattedStyleSection();
private slots:
- void openCSSEditor(QListViewItem *);
+ void openCSSEditor(TQListViewItem *);
void addTag();
void addClass();
void addID();
void addPseudo();
void removeAll();
void removeSelected();
- void setCurrentItem(QListViewItem* i) { m_currentItem = i; }
- void setCurrentListView(QWidget*);
- void setDTDTags(const QString&);
- void setStylesheetProcessing(const QString&);
+ void setCurrentItem(TQListViewItem* i) { m_currentItem = i; }
+ void setCurrentListView(TQWidget*);
+ void setDTDTags(const TQString&);
+ void setStylesheetProcessing(const TQString&);
};
#endif
diff --git a/quanta/components/csseditor/cssshpropertyparser.cpp b/quanta/components/csseditor/cssshpropertyparser.cpp
index d02c39a5..d117b5f5 100644
--- a/quanta/components/csseditor/cssshpropertyparser.cpp
+++ b/quanta/components/csseditor/cssshpropertyparser.cpp
@@ -18,15 +18,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "cssshpropertyparser.h"
-#include <qregexp.h>
+#include <tqregexp.h>
//#include <kdebug.h>
-CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){
- QStringList l1,
- l2=QStringList::split(",",s);
+CSSSHPropertyParser::CSSSHPropertyParser(const TQString& s){
+ TQStringList l1,
+ l2=TQStringList::split(",",s);
- for ( QStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) {
- QString temp;
+ for ( TQStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) {
+ TQString temp;
temp=removeBeginningWhiteSpaces((*it));
temp=removeEndingWhiteSpaces(temp);
l1.append(temp);
@@ -37,26 +37,26 @@ CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){
CSSSHPropertyParser::~CSSSHPropertyParser(){}
-QString CSSSHPropertyParser::removeEndingWhiteSpaces(const QString& s){
+TQString CSSSHPropertyParser::removeEndingWhiteSpaces(const TQString& s){
int index = s.length()-1;
while(s[index] == ' ' ) index--;
return s.left(index+1);
}
-QString CSSSHPropertyParser::removeBeginningWhiteSpaces(const QString& s){
+TQString CSSSHPropertyParser::removeBeginningWhiteSpaces(const TQString& s){
int index = 0;
while(s[index] == ' ' ) index++;
return s.right(s.length()-index);
}
-QString CSSSHPropertyParser::extractFunctionList(){
- QRegExp functionListPattern("\\s*([a-zA-Z0-9_]*\\([\\W\\w]*\\))\\s*");
+TQString CSSSHPropertyParser::extractFunctionList(){
+ TQRegExp functionListPattern("\\s*([a-zA-Z0-9_]*\\([\\W\\w]*\\))\\s*");
functionListPattern.search(m_propertyToParse);
return functionListPattern.cap(1);
}
-QString CSSSHPropertyParser::extractQuotedStringList(){
- QString temp;
+TQString CSSSHPropertyParser::extractQuotedStringList(){
+ TQString temp;
bool stop = false;
unsigned int i=0;
while(!stop && i<m_propertyToParse.length() ){
@@ -70,39 +70,39 @@ QString CSSSHPropertyParser::extractQuotedStringList(){
return temp;
}
-QString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
+TQString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
//kdDebug(24000) << "\n\n\nextractURIList()\n\n\n";
- QRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
+ TQRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
URIListPattern.search(m_propertyToParse);
return URIListPattern.cap(1);
}
-QStringList CSSSHPropertyParser::parse(){
- QStringList tokenList;
+TQStringList CSSSHPropertyParser::parse(){
+ TQStringList tokenList;
bool stop = false;
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse);
while(!stop){
- QString temp;
+ TQString temp;
for(unsigned int i=0;i<m_propertyToParse.length() ;i++){
if(m_propertyToParse[i] == ' ') break;// tokens are delimited by a blank
temp+=m_propertyToParse[i];
}
if(temp.contains("url(") !=0 ){
- QString foundURIList = extractURIList();
+ TQString foundURIList = extractURIList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundURIList));
tokenList.append(foundURIList);
}
else
if(temp.contains("(")!=0){
- QString foundFunctionList = extractFunctionList();
+ TQString foundFunctionList = extractFunctionList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundFunctionList));
tokenList.append(foundFunctionList);
}
else
if(temp.contains("'")!=0 || temp.contains("\"")!=0 || temp.contains(",")!=0){
- QString foundQuotedStringList = extractQuotedStringList();
+ TQString foundQuotedStringList = extractQuotedStringList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundQuotedStringList));
tokenList.append(foundQuotedStringList);
}
diff --git a/quanta/components/csseditor/cssshpropertyparser.h b/quanta/components/csseditor/cssshpropertyparser.h
index dd95eb39..fe7f8031 100644
--- a/quanta/components/csseditor/cssshpropertyparser.h
+++ b/quanta/components/csseditor/cssshpropertyparser.h
@@ -23,24 +23,24 @@
/**
@author Gulmini Luciano
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
class CSSSHPropertyParser{
public:
- CSSSHPropertyParser(const QString& s);
+ CSSSHPropertyParser(const TQString& s);
~CSSSHPropertyParser();
- QStringList parse();
+ TQStringList parse();
private:
- QString m_propertyToParse;
+ TQString m_propertyToParse;
private:
- QString extractURIList();
- QString extractFunctionList();
- QString extractQuotedStringList();
- QString removeBeginningWhiteSpaces(const QString& s);
- QString removeEndingWhiteSpaces(const QString& s);
+ TQString extractURIList();
+ TQString extractFunctionList();
+ TQString extractQuotedStringList();
+ TQString removeBeginningWhiteSpaces(const TQString& s);
+ TQString removeEndingWhiteSpaces(const TQString& s);
};
#endif
diff --git a/quanta/components/csseditor/doubleeditors.cpp b/quanta/components/csseditor/doubleeditors.cpp
index 6fab0547..e877e2ac 100644
--- a/quanta/components/csseditor/doubleeditors.cpp
+++ b/quanta/components/csseditor/doubleeditors.cpp
@@ -16,27 +16,27 @@
***************************************************************************/
#include "doubleeditors.h"
#include "specialsb.h"
- #include <qcombobox.h>
+ #include <tqcombobox.h>
#include "csseditor_globals.h"
#include "propertysetter.h"
- #include <qregexp.h>
+ #include <tqregexp.h>
-doubleEditorBase::doubleEditorBase(QWidget *parent, const char *name) : miniEditor(parent,name){
+doubleEditorBase::doubleEditorBase(TQWidget *parent, const char *name) : miniEditor(parent,name){
}
-void doubleEditorBase::sxValueSlot(const QString& v){
+void doubleEditorBase::sxValueSlot(const TQString& v){
m_sxValue=v;
emit valueChanged( m_sxValue +" " + m_dxValue);
}
-void doubleEditorBase::dxValueSlot(const QString& v){
+void doubleEditorBase::dxValueSlot(const TQString& v){
m_dxValue=v;
emit valueChanged( m_sxValue +" " + m_dxValue);
}
- doubleLengthEditor::doubleLengthEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){
+ doubleLengthEditor::doubleLengthEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){
m_ssbSx = new specialSB(this);
m_ssbSx->insertItem("cm");
@@ -58,8 +58,8 @@ void doubleEditorBase::dxValueSlot(const QString& v){
m_ssbDx->insertItem("pt");
m_ssbDx->insertItem("px");
- connect(m_ssbSx, SIGNAL(valueChanged(const QString&)), this, SLOT(sxValueSlot(const QString&)));
- connect(m_ssbDx, SIGNAL(valueChanged(const QString&)), this, SLOT(dxValueSlot(const QString&)));
+ connect(m_ssbSx, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(sxValueSlot(const TQString&)));
+ connect(m_ssbDx, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(dxValueSlot(const TQString&)));
}
doubleLengthEditor::~doubleLengthEditor(){
@@ -68,19 +68,19 @@ doubleLengthEditor::~doubleLengthEditor(){
}
void doubleLengthEditor::connectToPropertySetter(propertySetter* p){
- connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&)));
}
-void doubleLengthEditor::setInitialValue(const QString& sx, const QString& dx){
+void doubleLengthEditor::setInitialValue(const TQString& sx, const TQString& dx){
m_ssbSx->setInitialValue(sx);
m_ssbDx->setInitialValue(dx);
}
-doubleComboBoxEditor::doubleComboBoxEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){
- m_cbSx = new QComboBox(this);
- m_cbDx = new QComboBox(this);
- connect(m_cbSx, SIGNAL(activated ( const QString & )), this, SLOT(sxValueSlot(const QString&)));
- connect(m_cbDx, SIGNAL(activated ( const QString & )), this, SLOT(dxValueSlot(const QString&)));
+doubleComboBoxEditor::doubleComboBoxEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){
+ m_cbSx = new TQComboBox(this);
+ m_cbDx = new TQComboBox(this);
+ connect(m_cbSx, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(sxValueSlot(const TQString&)));
+ connect(m_cbDx, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(dxValueSlot(const TQString&)));
}
doubleComboBoxEditor::~doubleComboBoxEditor(){
@@ -89,16 +89,16 @@ doubleComboBoxEditor::~doubleComboBoxEditor(){
}
void doubleComboBoxEditor::connectToPropertySetter(propertySetter* p){
- connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&)));
}
-doublePercentageEditor::doublePercentageEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){
+doublePercentageEditor::doublePercentageEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){
m_sbSx = new mySpinBox(this);
m_sbDx = new mySpinBox(this);
m_sbSx->setSuffix("%");
m_sbDx->setSuffix("%");
- connect(m_sbSx,SIGNAL(valueChanged(const QString&)),this,SLOT(sxValueSlot(const QString&)));
- connect(m_sbDx,SIGNAL(valueChanged(const QString&)),this,SLOT(dxValueSlot(const QString&)));
+ connect(m_sbSx,TQT_SIGNAL(valueChanged(const TQString&)),this,TQT_SLOT(sxValueSlot(const TQString&)));
+ connect(m_sbDx,TQT_SIGNAL(valueChanged(const TQString&)),this,TQT_SLOT(dxValueSlot(const TQString&)));
}
doublePercentageEditor::~doublePercentageEditor(){
@@ -107,12 +107,12 @@ doublePercentageEditor::~doublePercentageEditor(){
}
void doublePercentageEditor::connectToPropertySetter(propertySetter* p){
- connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&)));
}
-void doublePercentageEditor::setInitialValue(const QString& a_sx, const QString& a_dx){
- QString sx = a_sx;
- QString dx = a_dx;
+void doublePercentageEditor::setInitialValue(const TQString& a_sx, const TQString& a_dx){
+ TQString sx = a_sx;
+ TQString dx = a_dx;
m_sbSx->setValue(sx.remove("%").toInt());
m_sbDx->setValue(dx.remove("%").toInt());
}
diff --git a/quanta/components/csseditor/doubleeditors.h b/quanta/components/csseditor/doubleeditors.h
index 6496a6fa..ed3b91cd 100644
--- a/quanta/components/csseditor/doubleeditors.h
+++ b/quanta/components/csseditor/doubleeditors.h
@@ -26,21 +26,21 @@
class doubleEditorBase : public miniEditor {
Q_OBJECT
protected:
- QString m_sxValue,
+ TQString m_sxValue,
m_dxValue;
public:
- doubleEditorBase(QWidget *parent=0, const char *name=0);
+ doubleEditorBase(TQWidget *parent=0, const char *name=0);
virtual ~doubleEditorBase(){}
virtual void setInitialValue(){}
virtual void connectToPropertySetter(propertySetter* /*p*/){}
public slots:
- void sxValueSlot(const QString&);
- void dxValueSlot(const QString&);
+ void sxValueSlot(const TQString&);
+ void dxValueSlot(const TQString&);
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
};
class doublePercentageEditor : public doubleEditorBase {
@@ -50,23 +50,23 @@ class doublePercentageEditor : public doubleEditorBase {
*m_sbDx;
public:
- doublePercentageEditor(QWidget *parent=0, const char *name=0);
+ doublePercentageEditor(TQWidget *parent=0, const char *name=0);
virtual ~doublePercentageEditor();
- virtual void setInitialValue(const QString& sx, const QString& dx);
+ virtual void setInitialValue(const TQString& sx, const TQString& dx);
virtual void connectToPropertySetter(propertySetter* p);
};
class doubleComboBoxEditor : public doubleEditorBase {
Q_OBJECT
private:
- QComboBox *m_cbSx,
+ TQComboBox *m_cbSx,
*m_cbDx;
public:
- doubleComboBoxEditor(QWidget *parent=0, const char *name=0);
+ doubleComboBoxEditor(TQWidget *parent=0, const char *name=0);
virtual ~doubleComboBoxEditor();
- QComboBox* cbSx() const { return m_cbSx;}
- QComboBox* cbDx() const { return m_cbDx;}
+ TQComboBox* cbSx() const { return m_cbSx;}
+ TQComboBox* cbDx() const { return m_cbDx;}
virtual void connectToPropertySetter(propertySetter* p);
};
@@ -77,9 +77,9 @@ class doubleLengthEditor : public doubleEditorBase {
*m_ssbDx;
public:
- doubleLengthEditor(QWidget *parent=0, const char *name=0);
+ doubleLengthEditor(TQWidget *parent=0, const char *name=0);
virtual ~doubleLengthEditor();
- virtual void setInitialValue(const QString& sx, const QString& dx);
+ virtual void setInitialValue(const TQString& sx, const TQString& dx);
virtual void connectToPropertySetter(propertySetter* p);
};
diff --git a/quanta/components/csseditor/encodingselector.cpp b/quanta/components/csseditor/encodingselector.cpp
index 3eeb593b..f8ba4ac6 100644
--- a/quanta/components/csseditor/encodingselector.cpp
+++ b/quanta/components/csseditor/encodingselector.cpp
@@ -20,18 +20,18 @@
#include "encodingselector.h"
#include <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
/**
*@author gulmini luciano
*/
-encodingSelector::encodingSelector(QWidget *parent, const char* name) : encodingSelectorS(parent,name){
- QStringList encodings (KGlobal::charsets()->availableEncodingNames());
+encodingSelector::encodingSelector(TQWidget *parent, const char* name) : encodingSelectorS(parent,name){
+ TQStringList encodings (KGlobal::charsets()->availableEncodingNames());
int insert = 0;
for (uint i=0; i < encodings.count(); i++) {
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
if (found){
cbEncoding->insertItem (encodings[i]);
diff --git a/quanta/components/csseditor/encodingselector.h b/quanta/components/csseditor/encodingselector.h
index 3b10fa23..f53dca27 100644
--- a/quanta/components/csseditor/encodingselector.h
+++ b/quanta/components/csseditor/encodingselector.h
@@ -20,7 +20,7 @@
#include "encodingselectors.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
/**
*@author gulmini luciano
@@ -30,9 +30,9 @@ class encodingSelector : public encodingSelectorS {
Q_OBJECT
public:
- encodingSelector(QWidget *parent=0, const char* name=0);
+ encodingSelector(TQWidget *parent=0, const char* name=0);
~encodingSelector();
- QString encodingSet() const { return cbEncoding->currentText();}
+ TQString encodingSet() const { return cbEncoding->currentText();}
};
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());
diff --git a/quanta/components/csseditor/fontfamilychooser.h b/quanta/components/csseditor/fontfamilychooser.h
index c812e774..fa5c947e 100644
--- a/quanta/components/csseditor/fontfamilychooser.h
+++ b/quanta/components/csseditor/fontfamilychooser.h
@@ -18,7 +18,7 @@
#define FONTFAMILYCHOOSER_H
#include "fontfamilychoosers.h"
-#include <qmap.h>
+#include <tqmap.h>
class QStringList;
class fontFamilyChooser : public fontFamilyChooserS
@@ -26,27 +26,27 @@ class fontFamilyChooser : public fontFamilyChooserS
Q_OBJECT
private:
enum FontOrigin { available, generic };
- QString m_currentSelectedFont;
+ TQString m_currentSelectedFont;
FontOrigin m_fontOrigin;
int m_currentSelectedFontIndex;
- QMap<QString,FontOrigin> m_selectedFontMap;
+ TQMap<TQString,FontOrigin> m_selectedFontMap;
private slots:
- void updatePreview(const QString &);
- void setCurrentSelectedAvailableFamilyFont(const QString&);
- void setCurrentSelectedGenericFamilyFont(const QString&);
+ void updatePreview(const TQString &);
+ void setCurrentSelectedAvailableFamilyFont(const TQString&);
+ void setCurrentSelectedGenericFamilyFont(const TQString&);
void setCurrentSelectedFont( int i) { m_currentSelectedFontIndex = i; }
- void setCurrentSelectedFont( const QString& f ) { m_currentSelectedFont = f; }
+ void setCurrentSelectedFont( const TQString& f ) { m_currentSelectedFont = f; }
void addFont();
void removeFont();
void moveFontUp();
void moveFontDown();
public:
- fontFamilyChooser(QWidget* parent, const char *name=0);
+ fontFamilyChooser(TQWidget* parent, const char *name=0);
~fontFamilyChooser();
- QStringList fontList();
- void setInitialValue(const QString& s);
+ TQStringList fontList();
+ void setInitialValue(const TQString& s);
};
#endif
diff --git a/quanta/components/csseditor/minieditor.h b/quanta/components/csseditor/minieditor.h
index 773ed285..1f5c25ef 100644
--- a/quanta/components/csseditor/minieditor.h
+++ b/quanta/components/csseditor/minieditor.h
@@ -18,7 +18,7 @@
#ifndef MINIEDITOR_H
#define MINIEDITOR_H
-#include <qhbox.h>
+#include <tqhbox.h>
/**
*@author gulmini luciano
@@ -28,7 +28,7 @@ class propertySetter;
class miniEditor : public QHBox{
public:
- miniEditor(QWidget *parent=0, const char *name=0):QHBox(parent,name){}
+ miniEditor(TQWidget *parent=0, const char *name=0):TQHBox(parent,name){}
~miniEditor(){}
virtual void connectToPropertySetter(propertySetter* p)=0;
};
diff --git a/quanta/components/csseditor/percentageeditor.cpp b/quanta/components/csseditor/percentageeditor.cpp
index 0c8a9d6c..b02a1615 100644
--- a/quanta/components/csseditor/percentageeditor.cpp
+++ b/quanta/components/csseditor/percentageeditor.cpp
@@ -17,13 +17,13 @@
#include "percentageeditor.h"
#include "propertysetter.h"
-percentageEditor::percentageEditor(const QString& initialValue, QWidget *parent, const char *name) : miniEditor(parent,name)
+percentageEditor::percentageEditor(const TQString& initialValue, TQWidget *parent, const char *name) : miniEditor(parent,name)
{
- QString temp(initialValue);
+ TQString temp(initialValue);
m_sb = new mySpinBox(0,9999,1,this);
m_sb->setValue(temp.remove("%").toInt());
m_sb->setSuffix("%");
- connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SIGNAL(valueChanged(const QString&)));
+ connect(m_sb, TQT_SIGNAL(valueChanged ( const TQString & )), this, TQT_SIGNAL(valueChanged(const TQString&)));
}
percentageEditor::~percentageEditor()
@@ -32,7 +32,7 @@ percentageEditor::~percentageEditor()
}
void percentageEditor::connectToPropertySetter(propertySetter* p){
- connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&)));
+ connect( this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&)));
}
#include "percentageeditor.moc"
diff --git a/quanta/components/csseditor/percentageeditor.h b/quanta/components/csseditor/percentageeditor.h
index d6931aec..a6aecb8c 100644
--- a/quanta/components/csseditor/percentageeditor.h
+++ b/quanta/components/csseditor/percentageeditor.h
@@ -18,11 +18,11 @@
#ifndef PERCENTAGEEDITOR_H
#define PERCENTAGEEDITOR_H
-#include <qhbox.h>
-#include <qptrlist.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
#include "doubleeditors.h"
-#include <qcombobox.h>
-#include <qslider.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
#include "csseditor_globals.h"
#include "minieditor.h"
@@ -41,11 +41,11 @@ class percentageEditor : public miniEditor {
private:
mySpinBox *m_sb;
public:
- percentageEditor(const QString& initialValue="0",QWidget *parent=0, const char *name=0);
+ percentageEditor(const TQString& initialValue="0",TQWidget *parent=0, const char *name=0);
~percentageEditor();
virtual void connectToPropertySetter(propertySetter* p);
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
};
diff --git a/quanta/components/csseditor/propertysetter.cpp b/quanta/components/csseditor/propertysetter.cpp
index 683320ae..922c7dbe 100644
--- a/quanta/components/csseditor/propertysetter.cpp
+++ b/quanta/components/csseditor/propertysetter.cpp
@@ -17,13 +17,13 @@
#include "propertysetter.h"
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qvbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
#include <kpushbutton.h>
#include <kdebug.h>
@@ -36,7 +36,7 @@
#include "csseditor_globals.h"
#include "minieditor.h"
-propertySetter::propertySetter(QWidget *parent, const char *name ) : QHBox(parent,name) {
+propertySetter::propertySetter(TQWidget *parent, const char *name ) : TQHBox(parent,name) {
m_ind = 0;
m_cb = 0L;
m_list.setAutoDelete(true);
@@ -59,38 +59,38 @@ void propertySetter::reset(){
void propertySetter::setComboBox()
{
- m_cb = new QComboBox(this);
- connect(m_cb, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&)));
- connect(m_cb, SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged(const QString&)));
+ m_cb = new TQComboBox(this);
+ connect(m_cb, TQT_SIGNAL(activated(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&)));
+ connect(m_cb, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&)));
m_list.append(m_cb);
}
-void propertySetter::setSpinBox(const QString& initialValue, const QString& min, const QString& max, const QString& s)
+void propertySetter::setSpinBox(const TQString& initialValue, const TQString& min, const TQString& max, const TQString& s)
{
mySpinBox *editor = new mySpinBox(min.toInt(), max.toInt(), 1, this);
editor->setSuffix(s);
editor->setValue(initialValue.toInt());
- connect(editor, SIGNAL(valueChanged(const QString&)), this ,SIGNAL(valueChanged(const QString&)));
+ connect(editor, TQT_SIGNAL(valueChanged(const TQString&)), this ,TQT_SIGNAL(valueChanged(const TQString&)));
m_list.append(editor);
}
void propertySetter::setLineEdit()
{
- QLineEdit *editor = new QLineEdit(this);
- connect(editor,SIGNAL(textChanged ( const QString & )), this, SIGNAL(valueChanged ( const QString & )));
+ TQLineEdit *editor = new TQLineEdit(this);
+ connect(editor,TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SIGNAL(valueChanged ( const TQString & )));
m_list.append(editor);
}
void propertySetter::setPredefinedColorListEditor()
{
- QComboBox *editor = new QComboBox(this);
+ TQComboBox *editor = new TQComboBox(this);
editor->insertStringList(CSSEditorGlobals::HTMLColors);
- connect(editor, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&)));
+ connect(editor, TQT_SIGNAL(activated(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&)));
m_list.append(editor);
}
void propertySetter::Show(){
- QWidget *w;
+ TQWidget *w;
for ( w = m_list.first(); w; w = m_list.next() )
w->hide();
@@ -112,13 +112,13 @@ void propertySetter::Show(){
void propertySetter::addButton(){
m_pb = new KPushButton(this);
- QToolTip::add(m_pb, i18n( "More..." ));
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("2rightarrow"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQToolTip::add(m_pb, i18n( "More..." ));
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("2rightarrow"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
m_pb->setIconSet(iconSet);
m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
m_pb->hide();
- connect(m_pb, SIGNAL(clicked()), this ,SLOT(Show()));
+ connect(m_pb, TQT_SIGNAL(clicked()), this ,TQT_SLOT(Show()));
}
void propertySetter::installMiniEditor(miniEditor *m){
diff --git a/quanta/components/csseditor/propertysetter.h b/quanta/components/csseditor/propertysetter.h
index 3f13b8ba..2f0a90af 100644
--- a/quanta/components/csseditor/propertysetter.h
+++ b/quanta/components/csseditor/propertysetter.h
@@ -18,9 +18,9 @@
#ifndef PROPERTYSETTER_H
#define PROPERTYSETTER_H
-#include <qhbox.h>
-#include <qptrlist.h>
-#include <qcombobox.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
+#include <tqcombobox.h>
class miniEditor;
@@ -31,34 +31,34 @@ class KPushButton;
*@author gulmini luciano
*/
-class propertySetter : public QHBox {
+class propertySetter : public TQHBox {
Q_OBJECT
private:
unsigned int m_ind;
- QPtrList<QWidget> m_list;
- QComboBox *m_cb;
+ TQPtrList<TQWidget> m_list;
+ TQComboBox *m_cb;
KPushButton *m_pb;
public:
- propertySetter(QWidget *parent=0, const char *name=0);
+ propertySetter(TQWidget *parent=0, const char *name=0);
~propertySetter();
void installMiniEditor(miniEditor *m);
void setComboBox();
- void setSpinBox(const QString& initialValue="0", const QString& min="0", const QString& max="9999", const QString& s=QString::null);
+ void setSpinBox(const TQString& initialValue="0", const TQString& min="0", const TQString& max="9999", const TQString& s=TQString::null);
void setLineEdit();
void setPredefinedColorListEditor();
void reset();
void addButton();
- QComboBox* ComboBox() const { return m_cb; }
+ TQComboBox* ComboBox() const { return m_cb; }
public slots:
void Show();
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
};
#endif
diff --git a/quanta/components/csseditor/qmyhighlighter.cpp b/quanta/components/csseditor/qmyhighlighter.cpp
index 431bf6a5..dad1fe24 100644
--- a/quanta/components/csseditor/qmyhighlighter.cpp
+++ b/quanta/components/csseditor/qmyhighlighter.cpp
@@ -16,22 +16,22 @@
***************************************************************************/
#include "qmyhighlighter.h"
-#include <qregexp.h>
-QMyHighlighter::QMyHighlighter(QTextEdit* Qtxt):QSyntaxHighlighter(Qtxt){
+#include <tqregexp.h>
+QMyHighlighter::QMyHighlighter(TQTextEdit* Qtxt):TQSyntaxHighlighter(Qtxt){
}
/*****************************************************************************/
QMyHighlighter::~QMyHighlighter(){
}
/*****************************************************************************/
-int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLastPara*/ )
+int QMyHighlighter::highlightParagraph( const TQString & text, int /*endStateOfLastPara*/ )
{
- //QRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*");
- QRegExp pattern("([#:\\.\\w]*)\\s*\\{");
+ //TQRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*");
+ TQRegExp pattern("([#:\\.\\w]*)\\s*\\{");
int pos=pattern.search(text,0);
int l=int(pattern.cap(1).length());
- setFormat(pos,l,QColor("red"));
+ setFormat(pos,l,TQColor("red"));
if( pos== -1)
pos = 0;
@@ -45,7 +45,7 @@ int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLa
if ( pos > -1 ) {
l = pattern.matchedLength();
- setFormat(pos,l,QColor("mediumvioletred"));
+ setFormat(pos,l,TQColor("mediumvioletred"));
pos += pattern.matchedLength();
}
}
@@ -56,7 +56,7 @@ int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLa
pos = pattern.search( text, pos );
if ( pos > -1 ) {
l = pattern.cap(1).length();
- setFormat(pos + 2 ,l,QColor("steelblue"));
+ setFormat(pos + 2 ,l,TQColor("steelblue"));
pos += pattern.matchedLength();
}
}
diff --git a/quanta/components/csseditor/qmyhighlighter.h b/quanta/components/csseditor/qmyhighlighter.h
index a75d6d00..60e767f5 100644
--- a/quanta/components/csseditor/qmyhighlighter.h
+++ b/quanta/components/csseditor/qmyhighlighter.h
@@ -18,18 +18,18 @@
#ifndef QMYHIGHLIGHTER_H
#define QMYHIGHLIGHTER_H
-#include <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
/**
*@author Emiliano Gulmini
*/
-class QMyHighlighter : public QSyntaxHighlighter {
+class QMyHighlighter : public TQSyntaxHighlighter {
public:
- QMyHighlighter(QTextEdit* Qtxt);
+ QMyHighlighter(TQTextEdit* Qtxt);
~QMyHighlighter();
- int highlightParagraph ( const QString & text, int endStateOfLastPara );
+ int highlightParagraph ( const TQString & text, int endStateOfLastPara );
};
diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp
index e8b7a837..08acc819 100644
--- a/quanta/components/csseditor/shorthandformer.cpp
+++ b/quanta/components/csseditor/shorthandformer.cpp
@@ -18,38 +18,38 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "shorthandformer.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "cssshpropertyparser.h"
#include <kdebug.h>
#include "csseditor_globals.h"
-QRegExp globalPercentagePattern("\\d%"),
+TQRegExp globalPercentagePattern("\\d%"),
globalLengthPattern("\\d(ex|em|px|cm|pt|pc|in|mm)"),
globalColorPattern("#[\\w\\d]*"),
globalNumberPattern("\\d*");
-static const QString borderStyleValueString("none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit");
-static const QString widthValueString("thin,medium,thick,inherit");
-static const QString listTypeValueString("disc,circle,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,armenian,georgian,cjk-ideographic,hiragana,katakana,hiragana-iroha,katakana-iroha,none,inherit");
-static const QString fontSizeValueString("smaller,larger,xx-large,x-large,large,medium,small,x-small,xx-small,inherit");
-static const QString fontWeightValueString("900,800,700,600,500,400,300,200,100,lighter,bolder,normal,bold,inherit");
-static const QString fontVariantValueString("normal,small-caps,inherit");
-static const QString fontStyleValueString("oblique,italic,normal,inherit");
-static const QString backgroundRepeatValueString("repeat,repeat-x,repeat-y,no-repeat,inherit");
+static const TQString borderStyleValueString("none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit");
+static const TQString widthValueString("thin,medium,thick,inherit");
+static const TQString listTypeValueString("disc,circle,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,armenian,georgian,cjk-ideographic,hiragana,katakana,hiragana-iroha,katakana-iroha,none,inherit");
+static const TQString fontSizeValueString("smaller,larger,xx-large,x-large,large,medium,small,x-small,xx-small,inherit");
+static const TQString fontWeightValueString("900,800,700,600,500,400,300,200,100,lighter,bolder,normal,bold,inherit");
+static const TQString fontVariantValueString("normal,small-caps,inherit");
+static const TQString fontStyleValueString("oblique,italic,normal,inherit");
+static const TQString backgroundRepeatValueString("repeat,repeat-x,repeat-y,no-repeat,inherit");
-static const QStringList borderStyleValueList = QStringList::split(",",borderStyleValueString);
-static const QStringList widthValueList = QStringList::split(",",widthValueString);
-static const QStringList listTypeValueList = QStringList::split(",",listTypeValueString);
-static const QStringList fontSizeValueList = QStringList::split(",",fontSizeValueString);
-static const QStringList fontWeightValueList = QStringList::split(",",fontWeightValueString);
-static const QStringList fontStyleValueList = QStringList::split(",",fontStyleValueString);
-static const QStringList fontVariantValueList = QStringList::split(",",fontVariantValueString);
-static const QStringList backgroundRepeatValueList = QStringList::split(",",backgroundRepeatValueString);
+static const TQStringList borderStyleValueList = TQStringList::split(",",borderStyleValueString);
+static const TQStringList widthValueList = TQStringList::split(",",widthValueString);
+static const TQStringList listTypeValueList = TQStringList::split(",",listTypeValueString);
+static const TQStringList fontSizeValueList = TQStringList::split(",",fontSizeValueString);
+static const TQStringList fontWeightValueList = TQStringList::split(",",fontWeightValueString);
+static const TQStringList fontStyleValueList = TQStringList::split(",",fontStyleValueString);
+static const TQStringList fontVariantValueList = TQStringList::split(",",fontVariantValueString);
+static const TQStringList backgroundRepeatValueList = TQStringList::split(",",backgroundRepeatValueString);
-ShorthandFormer::ShorthandFormer( QMap<QString,QString> m){
+ShorthandFormer::ShorthandFormer( TQMap<TQString,TQString> m){
m_properties = m;
if(m_properties.contains("cue-after")){
@@ -218,8 +218,8 @@ ShorthandFormer::ShorthandFormer( QMap<QString,QString> m){
}
}
-QString ShorthandFormer::compress(){
- QString props;
+TQString ShorthandFormer::compress(){
+ TQString props;
props += compressCueProp();
props += compressPauseProp();
@@ -231,7 +231,7 @@ QString ShorthandFormer::compress(){
props += compressListStyleProp();
props += compressBorderProp();
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::Iterator it;
for ( it = m_properties.begin(); it != m_properties.end(); ++it )
props += it.key() + " : " + it.data().stripWhiteSpace() + "; " ;
@@ -240,8 +240,8 @@ QString ShorthandFormer::compress(){
return props;
}
-QString ShorthandFormer::compressBorderProp(){
- QString props;
+TQString ShorthandFormer::compressBorderProp(){
+ TQString props;
bool allColorSidesSet = false,
allStyleSidesSet = false,
@@ -306,17 +306,17 @@ QString ShorthandFormer::compressBorderProp(){
return props;
}
-QString ShorthandFormer::compressBorderStyleProp(){
+TQString ShorthandFormer::compressBorderStyleProp(){
return compressImplementation( "border-style" ,border_top_style, border_bottom_style, border_right_style, border_left_style, "none");
}
-QString ShorthandFormer::compressBorderWidthProp(){
+TQString ShorthandFormer::compressBorderWidthProp(){
return compressImplementation( "border-width" ,border_top_width, border_bottom_width, border_right_width, border_left_width, "medium");
}
-QString ShorthandFormer::compressBorderColorProp(){
+TQString ShorthandFormer::compressBorderColorProp(){
//because the default value of color property is browser dependant, this method doesn't compress the color value
- QString props;
+ TQString props;
if( !border_top_color.isEmpty() )
props += "border-top-color : " + border_top_color +"; ";
if( !border_right_color.isEmpty() )
@@ -328,8 +328,8 @@ QString ShorthandFormer::compressBorderColorProp(){
return props;
}
-QString ShorthandFormer::compressFontProp(){
- QString fontProp,
+TQString ShorthandFormer::compressFontProp(){
+ TQString fontProp,
props;
//bool appendLineHeight = false;
@@ -368,51 +368,51 @@ QString ShorthandFormer::compressFontProp(){
return props;
}
-QString ShorthandFormer::compressCueProp(){
+TQString ShorthandFormer::compressCueProp(){
return compressImplementation2( "cue", cue_after, cue_before, "none");
}
-QString ShorthandFormer::compressPauseProp(){
+TQString ShorthandFormer::compressPauseProp(){
return compressImplementation2( "pause", pause_after, pause_before, "0");
}
-QString ShorthandFormer::compressBackgroundProp(){
- QString backgroundProp;
+TQString ShorthandFormer::compressBackgroundProp(){
+ TQString backgroundProp;
if( !background_color.isEmpty() ) backgroundProp += (" " + background_color );
if( !background_image.isEmpty() ) backgroundProp += (" " + background_image );
if( !background_repeat.isEmpty() ) backgroundProp += (" " + background_repeat );
if( !background_attachment.isEmpty() ) backgroundProp += (" " + background_attachment );
if( !background_position.isEmpty() ) backgroundProp += (" " + background_position );
if( !backgroundProp.isEmpty() ) return ( "background :" + backgroundProp + "; ");
- return QString::null;
+ return TQString::null;
}
-QString ShorthandFormer::compressPaddingProp(){
+TQString ShorthandFormer::compressPaddingProp(){
return compressImplementation( "padding" ,padding_top, padding_bottom, padding_right, padding_left, "0");
}
-QString ShorthandFormer::compressMarginProp(){
+TQString ShorthandFormer::compressMarginProp(){
return compressImplementation( "margin" ,margin_top, margin_bottom, margin_right, margin_left, "0");
}
-QString ShorthandFormer::compressOutlineProp(){
+TQString ShorthandFormer::compressOutlineProp(){
return compressImplementation3("outline", outline_color, outline_style, outline_width);
}
-QString ShorthandFormer::compressListStyleProp(){
+TQString ShorthandFormer::compressListStyleProp(){
return compressImplementation3("list-style", list_style_type, list_style_image, list_style_position);
}
-QString ShorthandFormer::compressImplementation3( const QString& prop, const QString& p1, const QString& p2, const QString& p3){
- QString props;
+TQString ShorthandFormer::compressImplementation3( const TQString& prop, const TQString& p1, const TQString& p2, const TQString& p3){
+ TQString props;
if( !p1.isEmpty() ) props += (" " + p1 );
if( !p2.isEmpty() ) props += (" " + p2 );
if( !p3.isEmpty() ) props += (" " + p3 );
if( !props.isEmpty() ) return ( prop + " :" + props + "; ");
- return QString::null;
+ return TQString::null;
}
-QString ShorthandFormer::compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue){
- QString props;
+TQString ShorthandFormer::compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue){
+ TQString props;
if(after == before){
if(!after.isEmpty()) props+=( prop + " : " + after + "; ");
}
@@ -425,9 +425,9 @@ QString ShorthandFormer::compressImplementation2( const QString& prop, const QSt
return props;
}
-QString ShorthandFormer::compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue){
+TQString ShorthandFormer::compressImplementation( const TQString& prop, const TQString& t, const TQString& b, const TQString& r, const TQString& l, const TQString& defValue){
- QString props,
+ TQString props,
top(t.stripWhiteSpace()),
bottom(b.stripWhiteSpace()),
left(l.stripWhiteSpace()),
@@ -440,7 +440,7 @@ QString ShorthandFormer::compressImplementation( const QString& prop, const QStr
if( top == defValue && bottom == defValue && right == defValue && left == defValue)
- return QString::null;
+ return TQString::null;
if( top == bottom && bottom == right && right == left )
return ( prop +" : " + top + "; ");
@@ -456,9 +456,9 @@ QString ShorthandFormer::compressImplementation( const QString& prop, const QStr
//+++++++++++++++++++++EXPANDING METHODS+++++++++++++++++++++++++++++++++++
-QMap<QString,QString> ShorthandFormer::expand( const QString& propertyName, const QString& propertyValue ){
+TQMap<TQString,TQString> ShorthandFormer::expand( const TQString& propertyName, const TQString& propertyValue ){
CSSSHPropertyParser parser(propertyValue);
- QStringList foundValues = parser.parse();
+ TQStringList foundValues = parser.parse();
if( propertyName == "cue" ) return expandCueProp(foundValues);
if( propertyName == "pause") return expandPauseProp(foundValues);
@@ -476,19 +476,19 @@ QMap<QString,QString> ShorthandFormer::expand( const QString& propertyName, cons
if( propertyName == "border") return expandBorderProp(foundValues);
if( propertyName == "padding") return expandPaddingProp(foundValues);
if( propertyName == "margin") return expandMarginProp(foundValues);
- return QMap<QString,QString>();//dummy instruction avoiding a pedantic warning; can never be reached
+ return TQMap<TQString,TQString>();//dummy instruction avoiding a pedantic warning; can never be reached
}
-QMap<QString,QString> ShorthandFormer::expandCueProp(const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandCueProp(const TQStringList& l){
return expandImplementation("cue",l);
}
-QMap<QString,QString> ShorthandFormer::expandPauseProp(const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandPauseProp(const TQStringList& l){
return expandImplementation("pause",l);
}
-QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandImplementation(const TQString& propertyName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if( l.count()==1) {
expandedProps[propertyName + "-before"] = l[0] ;
expandedProps[propertyName + "-after"] = l[0] ;
@@ -502,8 +502,8 @@ QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& prop
}
}
-QMap<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandBackgroundProp(const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if(l.count()==1 && l[0] == "inherit"){ // it works also as protection against wrong single value inserted
expandedProps["background-color"] = l[0];
expandedProps["background-image"] = l[0];
@@ -513,10 +513,10 @@ QMap<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList&
}
else {
- QStringList::ConstIterator it = l.begin();
+ TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
- QString temp((*it).stripWhiteSpace());
+ TQString temp((*it).stripWhiteSpace());
if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){
expandedProps["background-image"] = (*it);
}
@@ -546,9 +546,9 @@ QMap<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList&
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandBox(const TQString& subPropName, const TQStringList& l){
- QMap<QString,QString> expandedProps;
+ TQMap<TQString,TQString> expandedProps;
expandedProps["border-top-" + subPropName] = l[0];
switch(l.count()){
case 1 :
@@ -576,14 +576,14 @@ QMap<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, co
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandFontProp(const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
- QRegExp percentagePattern("/"+globalPercentagePattern.pattern()),
+ TQRegExp percentagePattern("/"+globalPercentagePattern.pattern()),
lengthPattern("/"+globalLengthPattern.pattern()),
numberPattern("/"+globalNumberPattern.pattern());
- QStringList fontPseudoSHFormValues;
+ TQStringList fontPseudoSHFormValues;
fontPseudoSHFormValues.append("caption");
fontPseudoSHFormValues.append("icon");
fontPseudoSHFormValues.append("menu");
@@ -595,10 +595,10 @@ QMap<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
return expandedProps;
}
else {
- QStringList::ConstIterator it = l.begin();
+ TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
- QString currentIt = (*it);
- QString temp(currentIt.stripWhiteSpace());
+ TQString currentIt = (*it);
+ TQString temp(currentIt.stripWhiteSpace());
if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it);
else
if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ;
@@ -621,8 +621,8 @@ QMap<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
}
}
-QMap<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandListstyleProp( const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if( (l.count() == 1) && (l[0] == "inherit")){
expandedProps["list-style-image"] ="inherit";
expandedProps["list-style-type"] ="inherit";
@@ -637,9 +637,9 @@ QMap<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l
}
- QStringList::ConstIterator it = l.begin();
+ TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
- QString temp((*it).stripWhiteSpace());
+ TQString temp((*it).stripWhiteSpace());
if( listTypeValueList.contains(temp)!=0) {
expandedProps["list-style-type"] = (*it) ;
}
@@ -656,11 +656,11 @@ QMap<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l){
- QMap<QString,QString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+TQMap<TQString,TQString> ShorthandFormer::expandOutlineProp( const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
+ TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
- QString temp((*it).stripWhiteSpace());
+ TQString temp((*it).stripWhiteSpace());
if( borderStyleValueList.contains(temp)!=0 ) expandedProps["outline-style"] = (*it);
else
if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit")
@@ -673,12 +673,12 @@ QMap<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l)
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandBoxSide(const TQString& subPropName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+ TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
- QString temp((*it).stripWhiteSpace());
+ TQString temp((*it).stripWhiteSpace());
if( borderStyleValueList.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it);
else
if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit")
@@ -691,11 +691,11 @@ QMap<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+TQMap<TQString,TQString> ShorthandFormer::expandBorderProp(const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
+ TQStringList::ConstIterator it = l.begin();
while ( it != l.end() ) {
- QString temp((*it).stripWhiteSpace());
+ TQString temp((*it).stripWhiteSpace());
if( borderStyleValueList.contains(temp)!=0 ){
expandedProps["border-top-style"] = (*it);
expandedProps["border-left-style"] = (*it);
@@ -721,8 +721,8 @@ QMap<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandImplementation2(const TQString& propertyName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
expandedProps[ propertyName + "-top" ] = l[0];
switch(l.count()){
case 1 :
@@ -750,16 +750,16 @@ QMap<QString,QString> ShorthandFormer::expandImplementation2(const QString& prop
return expandedProps;
}
- QMap<QString,QString> ShorthandFormer::expandPaddingProp(const QStringList& l){
+ TQMap<TQString,TQString> ShorthandFormer::expandPaddingProp(const TQStringList& l){
return expandImplementation2("padding", l);
}
- QMap<QString,QString> ShorthandFormer::expandMarginProp(const QStringList& l){
+ TQMap<TQString,TQString> ShorthandFormer::expandMarginProp(const TQStringList& l){
return expandImplementation2("margin", l);
}
-QStringList ShorthandFormer::SHFormList() {
- QStringList l;
+TQStringList ShorthandFormer::SHFormList() {
+ TQStringList l;
l.append("cue");
l.append("pause");
l.append("font");
diff --git a/quanta/components/csseditor/shorthandformer.h b/quanta/components/csseditor/shorthandformer.h
index f5b0f291..8673c01e 100644
--- a/quanta/components/csseditor/shorthandformer.h
+++ b/quanta/components/csseditor/shorthandformer.h
@@ -23,22 +23,22 @@
/**
@author Gulmini Luciano
*/
-#include <qmap.h>
+#include <tqmap.h>
class QString;
class QStringList;
class ShorthandFormer{
public:
ShorthandFormer(){}
- ShorthandFormer( QMap<QString,QString> m );
+ ShorthandFormer( TQMap<TQString,TQString> m );
~ShorthandFormer(){}
- QString compress();
- QMap<QString,QString> expand(const QString& propertyName, const QString& propertyValue);
- static QStringList SHFormList();
+ TQString compress();
+ TQMap<TQString,TQString> expand(const TQString& propertyName, const TQString& propertyValue);
+ static TQStringList SHFormList();
private:
- QMap<QString,QString> m_properties;
- QString cue_after,
+ TQMap<TQString,TQString> m_properties;
+ TQString cue_after,
cue_before,
pause_before,
pause_after,
@@ -81,37 +81,37 @@ private:
padding_right;
private:
- QString compressCueProp();
- QString compressPauseProp();
- QString compressPaddingProp();
- QString compressMarginProp();
- QString compressFontProp();
- QString compressBackgroundProp();
- QString compressOutlineProp();
- QString compressListStyleProp();
- QString compressBorderStyleProp();
- QString compressBorderWidthProp();
- QString compressBorderColorProp();
- QString compressBorderProp();
+ TQString compressCueProp();
+ TQString compressPauseProp();
+ TQString compressPaddingProp();
+ TQString compressMarginProp();
+ TQString compressFontProp();
+ TQString compressBackgroundProp();
+ TQString compressOutlineProp();
+ TQString compressListStyleProp();
+ TQString compressBorderStyleProp();
+ TQString compressBorderWidthProp();
+ TQString compressBorderColorProp();
+ TQString compressBorderProp();
- QString compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue);
- QString compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue);
- QString compressImplementation3( const QString& prop, const QString& p1, const QString& p2, const QString& p3);
+ TQString compressImplementation( const TQString& prop, const TQString& t, const TQString& b, const TQString& r, const TQString& l, const TQString& defValue);
+ TQString compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue);
+ TQString compressImplementation3( const TQString& prop, const TQString& p1, const TQString& p2, const TQString& p3);
- QMap<QString,QString> expandCueProp(const QStringList& l);
- QMap<QString,QString> expandPauseProp(const QStringList& l);
- QMap<QString,QString> expandBackgroundProp(const QStringList& l);
- QMap<QString,QString> expandFontProp(const QStringList& l);
- QMap<QString,QString> expandOutlineProp(const QStringList& l);
- QMap<QString,QString> expandListstyleProp(const QStringList& l);
- QMap<QString,QString> expandBoxSide(const QString& subPropName, const QStringList& l);
- QMap<QString,QString> expandBorderProp(const QStringList& l);
- QMap<QString,QString> expandBox(const QString& subPropName, const QStringList& l);
- QMap<QString,QString> expandPaddingProp(const QStringList& l);
- QMap<QString,QString> expandMarginProp(const QStringList& l);
+ TQMap<TQString,TQString> expandCueProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandPauseProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBackgroundProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandFontProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandOutlineProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandListstyleProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBoxSide(const TQString& subPropName, const TQStringList& l);
+ TQMap<TQString,TQString> expandBorderProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBox(const TQString& subPropName, const TQStringList& l);
+ TQMap<TQString,TQString> expandPaddingProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandMarginProp(const TQStringList& l);
- QMap<QString,QString> expandImplementation(const QString& propertyName, const QStringList& l);
- QMap<QString,QString> expandImplementation2(const QString& propertyName, const QStringList& l);
+ TQMap<TQString,TQString> expandImplementation(const TQString& propertyName, const TQStringList& l);
+ TQMap<TQString,TQString> expandImplementation2(const TQString& propertyName, const TQStringList& l);
};
#endif
diff --git a/quanta/components/csseditor/specialsb.cpp b/quanta/components/csseditor/specialsb.cpp
index eb26e05f..6edf110c 100644
--- a/quanta/components/csseditor/specialsb.cpp
+++ b/quanta/components/csseditor/specialsb.cpp
@@ -21,21 +21,21 @@
#include <klineedit.h>
-specialSB::specialSB(QWidget *parent, const char *name, bool useLineEdit ) : miniEditor(parent,name) {
+specialSB::specialSB(TQWidget *parent, const char *name, bool useLineEdit ) : miniEditor(parent,name) {
if (useLineEdit)
{
m_lineEdit = new KLineEdit(this);
m_sb = 0L;
- connect(m_lineEdit, SIGNAL(textChanged ( const QString & )), this, SLOT(lineEditValueSlot ( const QString & )));
+ connect(m_lineEdit, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(lineEditValueSlot ( const TQString & )));
}
else
{
m_sb=new mySpinBox(this);
- connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SLOT(sbValueSlot(const QString&)));
+ connect(m_sb, TQT_SIGNAL(valueChanged ( const TQString & )), this, TQT_SLOT(sbValueSlot(const TQString&)));
m_lineEdit = 0L;
}
- m_cb = new QComboBox(this);
- connect(m_cb, SIGNAL(activated ( const QString & )), this, SLOT(cbValueSlot(const QString&)));
+ m_cb = new TQComboBox(this);
+ connect(m_cb, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(cbValueSlot(const TQString&)));
}
specialSB::~specialSB(){
@@ -45,32 +45,32 @@ specialSB::~specialSB(){
}
void specialSB::connectToPropertySetter(propertySetter* p){
- connect(this, SIGNAL(valueChanged(const QString&)), p,SIGNAL(valueChanged(const QString&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p,TQT_SIGNAL(valueChanged(const TQString&)));
}
-void specialSB::cbValueSlot(const QString& s){
+void specialSB::cbValueSlot(const TQString& s){
if (m_sb)
emit valueChanged( m_sb->text() +s );
else
emit valueChanged( m_lineEdit->text() +s );
}
-void specialSB::sbValueSlot(const QString& s){
+void specialSB::sbValueSlot(const TQString& s){
emit valueChanged( s + m_cb->currentText());
}
-void specialSB::lineEditValueSlot(const QString& s){
+void specialSB::lineEditValueSlot(const TQString& s){
emit valueChanged( s + m_cb->currentText());
}
-void specialSB::setInitialValue(const QString& s){
+void specialSB::setInitialValue(const TQString& s){
- QRegExp pattern("\\d("+ cbValueList().join("|")+")");
+ TQRegExp pattern("\\d("+ cbValueList().join("|")+")");
if (pattern.search(s) != -1) {
- QString temp(s.stripWhiteSpace());
- QString cbValue = pattern.cap(1);
+ TQString temp(s.stripWhiteSpace());
+ TQString cbValue = pattern.cap(1);
if (m_sb)
m_sb->setValue(temp.remove(cbValue).toInt());
@@ -81,19 +81,19 @@ void specialSB::setInitialValue(const QString& s){
else return;
}
-QStringList specialSB::cbValueList(){
- QStringList l;
+TQStringList specialSB::cbValueList(){
+ TQStringList l;
for(int i=0; i<m_cb->count();i++) l.append(m_cb->text(i));
return l;
}
-frequencyEditor::frequencyEditor(QWidget *parent, const char *name ) : specialSB(parent,name) {
+frequencyEditor::frequencyEditor(TQWidget *parent, const char *name ) : specialSB(parent,name) {
m_cb->insertItem("Hz");
m_cb->insertItem("kHz");
m_sb->setMaxValue(9999);
}
-angleEditor::angleEditor(QWidget *parent, const char *name) : specialSB(parent,name){
+angleEditor::angleEditor(TQWidget *parent, const char *name) : specialSB(parent,name){
m_cb->insertItem("deg");
m_cb->insertItem("grad");
m_cb->insertItem("rad");
@@ -101,13 +101,13 @@ angleEditor::angleEditor(QWidget *parent, const char *name) : specialSB(parent,n
m_sb->setMaxValue(400);
}
-timeEditor::timeEditor(QWidget *parent, const char *name ) : specialSB(parent,name) {
+timeEditor::timeEditor(TQWidget *parent, const char *name ) : specialSB(parent,name) {
m_cb->insertItem("ms");
m_cb->insertItem("s");
m_sb->setMaxValue(99999);
}
-lengthEditor::lengthEditor(QWidget *parent, const char *name ) : specialSB(parent,name, true) {
+lengthEditor::lengthEditor(TQWidget *parent, const char *name ) : specialSB(parent,name, true) {
m_cb->insertItem("px");
m_cb->insertItem("em");
m_cb->insertItem("ex");
diff --git a/quanta/components/csseditor/specialsb.h b/quanta/components/csseditor/specialsb.h
index 43d6273e..bca3d9fa 100644
--- a/quanta/components/csseditor/specialsb.h
+++ b/quanta/components/csseditor/specialsb.h
@@ -19,7 +19,7 @@
#define SPECIALSB_H
#include "minieditor.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
class mySpinBox;
class KLineEdit;
@@ -30,50 +30,50 @@ class KLineEdit;
class specialSB : public miniEditor {
Q_OBJECT
protected:
- QComboBox *m_cb;
+ TQComboBox *m_cb;
mySpinBox *m_sb;
KLineEdit *m_lineEdit;
public:
- specialSB(QWidget *parent=0, const char *name=0, bool useLineEdit = false);
+ specialSB(TQWidget *parent=0, const char *name=0, bool useLineEdit = false);
~specialSB();
- void insertItem(const QString& s){ m_cb->insertItem(s); }
- void setInitialValue(const QString& s);
- QStringList cbValueList();
+ void insertItem(const TQString& s){ m_cb->insertItem(s); }
+ void setInitialValue(const TQString& s);
+ TQStringList cbValueList();
virtual void connectToPropertySetter(propertySetter* p);
public slots:
- void cbValueSlot(const QString&);
- void sbValueSlot(const QString&);
- void lineEditValueSlot(const QString&);
+ void cbValueSlot(const TQString&);
+ void sbValueSlot(const TQString&);
+ void lineEditValueSlot(const TQString&);
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
};
class angleEditor : public specialSB {
Q_OBJECT
public:
- angleEditor(QWidget *parent=0, const char *name=0);
+ angleEditor(TQWidget *parent=0, const char *name=0);
};
class frequencyEditor : public specialSB {
Q_OBJECT
public:
- frequencyEditor(QWidget *parent=0, const char *name=0);
+ frequencyEditor(TQWidget *parent=0, const char *name=0);
};
class timeEditor : public specialSB {
Q_OBJECT
public:
- timeEditor(QWidget *parent=0, const char *name=0);
+ timeEditor(TQWidget *parent=0, const char *name=0);
};
class lengthEditor : public specialSB {
Q_OBJECT
public:
- lengthEditor(QWidget *parent=0, const char *name=0);
+ lengthEditor(TQWidget *parent=0, const char *name=0);
};
#endif
diff --git a/quanta/components/csseditor/styleeditor.cpp b/quanta/components/csseditor/styleeditor.cpp
index 63d4af79..31f6788b 100644
--- a/quanta/components/csseditor/styleeditor.cpp
+++ b/quanta/components/csseditor/styleeditor.cpp
@@ -13,11 +13,11 @@
***************************************************************************/
//qt includes
-#include <qlineedit.h>
-#include <qtooltip.h>
-#include <qiconset.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqiconset.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
//kde includes
#include <kdialog.h>
@@ -39,11 +39,11 @@
#include "viewmanager.h"
#include "csseditor.h"
-StyleEditor::StyleEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){
- connect(m_pb, SIGNAL(clicked()), this, SLOT(openCSSEditor()));
+StyleEditor::StyleEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name){
+ connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openCSSEditor()));
setToolTip(i18n("Open css dialog"));
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("stylesheet"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("stylesheet"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
m_pb->setIconSet(iconSet);
m_iconWidth = pixMap.width();
m_iconHeight = pixMap.height();
@@ -73,18 +73,18 @@ void StyleEditor::openCSSEditor(){
if (styleNode->tag->type == Tag::XmlTagEnd && styleNode->prev)
styleNode = styleNode->prev;
- QString fullDocument = w->editIf->text().stripWhiteSpace();
+ TQString fullDocument = w->editIf->text().stripWhiteSpace();
if (styleNode && (styleNode->tag->type == Tag::XmlTag || styleNode->tag->type == Tag::Empty) ) {
CSSEditor *dlg = new CSSEditor(this);
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(Project::ref()->projectBaseURL().path() + fi.baseName(),false);
styleNode->tag->beginPos(bLine, bCol);
styleNode->tag->endPos(eLine, eCol);
dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol));
- QString temp;
+ TQString temp;
if (styleNode->tag->hasAttribute("style")) {
dlg->setInlineStyleContent(styleNode->tag->attributeValue("style"));
Tag tempTag(*(styleNode->tag));
@@ -92,7 +92,7 @@ void StyleEditor::openCSSEditor(){
temp = tempTag.toString();
}
else {
- dlg->setInlineStyleContent(QString::null);
+ dlg->setInlineStyleContent(TQString::null);
temp = styleNode->tag->toString();
}
diff --git a/quanta/components/csseditor/styleeditor.h b/quanta/components/csseditor/styleeditor.h
index 582ac848..bef9146f 100644
--- a/quanta/components/csseditor/styleeditor.h
+++ b/quanta/components/csseditor/styleeditor.h
@@ -29,13 +29,13 @@ class StyleEditor : public TLPEditor{
int m_iconWidth,
m_iconHeight;
public:
- StyleEditor(QWidget *parent=0, const char* name=0);
+ StyleEditor(TQWidget *parent=0, const char* name=0);
virtual void setButtonIcon(int width, int height);
public slots:
void openCSSEditor();
virtual void connectToPropertySetter(propertySetter* /*p*/){}
- virtual void setInitialValue(const QString& /*s*/){}
+ virtual void setInitialValue(const TQString& /*s*/){}
};
diff --git a/quanta/components/csseditor/stylesheetparser.cpp b/quanta/components/csseditor/stylesheetparser.cpp
index b8cbf306..db36ea4c 100644
--- a/quanta/components/csseditor/stylesheetparser.cpp
+++ b/quanta/components/csseditor/stylesheetparser.cpp
@@ -19,10 +19,10 @@
#include <klocale.h>
#include <kdebug.h>
-static const QString msg1(i18n("has not been closed")),
+static const TQString msg1(i18n("has not been closed")),
msg2(i18n("needs an opening parenthesis "));
-stylesheetParser::stylesheetParser(const QString& s){
+stylesheetParser::stylesheetParser(const TQString& s){
m_styleSheet = s;
m_styleSheet=m_styleSheet.right(m_styleSheet.length()-whiteSpaces(0));
m_stopProcessing = false;
@@ -32,7 +32,7 @@ stylesheetParser::stylesheetParser(const QString& s){
int stylesheetParser::whiteSpaces(int d){
int ws=0;
for( unsigned int i=d;i<m_styleSheet.length();i++){
- QString temp;
+ TQString temp;
if(m_styleSheet[i] == ' ' || m_styleSheet[i] == '\n' || m_styleSheet[i] == '\t' )
ws++;
else break;
@@ -63,7 +63,7 @@ void stylesheetParser::parseComment(){
bool stopProcessingComment=false;
unsigned int k;
for(k=2;k<m_styleSheet.length()-1;k++){
- QString temp;
+ TQString temp;
temp.append(m_styleSheet[k]).append(m_styleSheet[k+1]);
if(temp=="*/") {
k+=2;
@@ -74,8 +74,8 @@ void stylesheetParser::parseComment(){
if(stopProcessingComment){
int ws=whiteSpaces(k);
- QPair<QString,unsigned int> tmp(m_styleSheet.left(k+ws),++m_orderNumber);
- m_stylesheetStructure["/*"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> tmp(m_styleSheet.left(k+ws),++m_orderNumber);
+ m_stylesheetStructure["/*"+TQString::number(m_orderNumber,10)]=tmp;
m_styleSheet=m_styleSheet.right(m_styleSheet.length()-k-ws);
parse();
}
@@ -87,8 +87,8 @@ void stylesheetParser::parseComment(){
}
}
-unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b){
- QChar searchFor = '{';
+unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const TQString& b){
+ TQChar searchFor = '{';
if (p == closed)
searchFor = '}';
int num = 0;
@@ -106,7 +106,7 @@ unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesi
return num;
}
-int findParanthesis(const QString& string, const QChar &ch, int startPos = 0)
+int findParanthesis(const TQString& string, const TQChar &ch, int startPos = 0)
{
int pos = -1;
int len = string.length();
@@ -134,7 +134,7 @@ void stylesheetParser::parseSelector(){
return;
}
- QString temp(m_styleSheet.left(closingParenthesisPos+1));
+ TQString temp(m_styleSheet.left(closingParenthesisPos+1));
if(numberOfParenthesisInAParenthesisBlock(closed,temp) < numberOfParenthesisInAParenthesisBlock(opened,temp)){
m_stopProcessing = true;
@@ -154,21 +154,21 @@ void stylesheetParser::parseSelector(){
openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).contains("{");
if(openingParentheses==closingParentheses){
- QString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(),
+ TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(),
selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/+1, closingParenthesisPos - m_styleSheet.find("{") -1);
selectorName.remove("\n").remove("\t");
selectorValue.remove("\n").remove("\t");
- QPair<QString,unsigned int> tmp(selectorValue,++m_orderNumber);
+ QPair<TQString,unsigned int> tmp(selectorValue,++m_orderNumber);
if (m_stylesheetStructure.contains(selectorName))
{
uint i = 2;
- QString s = selectorName + QString("-v%1").arg(i);
+ TQString s = selectorName + TQString("-v%1").arg(i);
while (m_stylesheetStructure.contains(s))
{
i++;
- s = selectorName + QString("-v%1").arg(i);
+ s = selectorName + TQString("-v%1").arg(i);
}
selectorName = s;
}
@@ -219,8 +219,8 @@ void stylesheetParser::parseAtRules1(){
}
int ws=whiteSpaces(closingParenthesisPos+1);
- QPair<QString,unsigned int> tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber);
- m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber);
+ m_stylesheetStructure["@rule"+TQString::number(m_orderNumber,10)]=tmp;
m_styleSheet=m_styleSheet.right(m_styleSheet.length()-closingParenthesisPos-1-ws);
parse();
}
@@ -236,8 +236,8 @@ void stylesheetParser::parseAtRules2(){
}
int ws=whiteSpaces(semicolonPos+1);
- QPair<QString,unsigned int> tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber);
- m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber);
+ m_stylesheetStructure["@rule"+TQString::number(m_orderNumber,10)]=tmp;
m_styleSheet=m_styleSheet.right(m_styleSheet.length()-semicolonPos-1-ws);
parse();
}
diff --git a/quanta/components/csseditor/stylesheetparser.h b/quanta/components/csseditor/stylesheetparser.h
index 26d5fa3e..06ad1f86 100644
--- a/quanta/components/csseditor/stylesheetparser.h
+++ b/quanta/components/csseditor/stylesheetparser.h
@@ -18,9 +18,9 @@
#ifndef STYLESHEETPARSER_H
#define STYLESHEETPARSER_H
-#include <qmap.h>
-#include <qpair.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqobject.h>
/**
*@author gulmini luciano
@@ -31,27 +31,27 @@ class stylesheetParser : public QObject{
private:
enum parenthesisKind { opened, closed };
- QString m_styleSheet;
+ TQString m_styleSheet;
bool m_stopProcessing;
unsigned int m_orderNumber;
- QMap<QString, QPair<QString,unsigned int> > m_stylesheetStructure;
+ TQMap<TQString, QPair<TQString,unsigned int> > m_stylesheetStructure;
void parseComment();
void parseSelector();
void parseAtRules1();
void parseAtRules2();
int whiteSpaces(int);
- unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b);
+ unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const TQString& b);
public:
- stylesheetParser(const QString& s);
+ stylesheetParser(const TQString& s);
~stylesheetParser(){}
void parse();
- QMap<QString, QPair<QString,unsigned int> > stylesheetStructure() { return m_stylesheetStructure; }
+ TQMap<TQString, QPair<TQString,unsigned int> > stylesheetStructure() { return m_stylesheetStructure; }
unsigned int orderNumber() const {return m_orderNumber; }
signals:
- void errorOccurred(const QString&);
+ void errorOccurred(const TQString&);
};
#endif
diff --git a/quanta/components/csseditor/tlpeditors.cpp b/quanta/components/csseditor/tlpeditors.cpp
index 706ac518..81e72538 100644
--- a/quanta/components/csseditor/tlpeditors.cpp
+++ b/quanta/components/csseditor/tlpeditors.cpp
@@ -15,11 +15,11 @@
* *
***************************************************************************/
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <kurl.h>
@@ -34,9 +34,9 @@
#include "fontfamilychooser.h"
#include "project.h"
-TLPEditor::TLPEditor(QWidget *parent, const char* name) : miniEditor(parent,name){
- m_label = new QLabel(this);
- m_le = new QLineEdit(this);
+TLPEditor::TLPEditor(TQWidget *parent, const char* name) : miniEditor(parent,name){
+ m_label = new TQLabel(this);
+ m_le = new TQLineEdit(this);
m_pb = new KPushButton(this);
setSpacing( KDialog::spacingHint() );
}
@@ -47,59 +47,59 @@ TLPEditor::~TLPEditor(){
delete m_pb;
}
-void TLPEditor::setButtonIcon(QString s){
- QIconSet iconSet = SmallIconSet(QString::fromLatin1(s));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+void TLPEditor::setButtonIcon(TQString s){
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1(s));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
m_pb->setIconSet(iconSet);
m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
}
-void TLPEditor::setLabelText(QString s){
+void TLPEditor::setLabelText(TQString s){
m_label->setText(s);
}
-void TLPEditor::setToolTip(QString s){
- QToolTip::add(m_pb, s);
+void TLPEditor::setToolTip(TQString s){
+ TQToolTip::add(m_pb, s);
}
-void TLPEditor::setWhatsThis(QString s){
- QWhatsThis::add(m_le,s);
+void TLPEditor::setWhatsThis(TQString s){
+ TQWhatsThis::add(m_le,s);
}
-URIEditor::URIEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){
- QString whatsthis =i18n("With this line edit you can insert the URI of the resource you want to reach");
+URIEditor::URIEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name){
+ TQString whatsthis =i18n("With this line edit you can insert the URI of the resource you want to reach");
setWhatsThis(whatsthis);
setLabelText(" Uri :");
setButtonIcon("fileopen");
setToolTip(i18n("Open the URI selector"));
- connect(m_pb, SIGNAL(clicked()), this, SLOT(openFileDialog()));
+ connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFileDialog()));
}
void URIEditor::connectToPropertySetter(propertySetter* p){
- connect(this,SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&)));
+ connect(this,TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&)));
}
void URIEditor::setMode(const mode& m) {
m_Mode = m ;
if( m_Mode == Single )
- connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURI(const QString&)));
+ connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(selectedURI(const TQString&)));
else{
- connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURIs(const QStringList&)));
+ connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(selectedURIs(const TQStringList&)));
}
}
-void URIEditor::selectedURI(const QString & s){
+void URIEditor::selectedURI(const TQString & s){
KURL u;
u.setPath(s);
emit valueChanged("url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')");
}
-void URIEditor::selectedURIs(const QStringList& s){
+void URIEditor::selectedURIs(const TQStringList& s){
KURL u;
- QStringList selectedFiles = s,
+ TQStringList selectedFiles = s,
selectedFilesWithURLFormat;
- for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){
+ for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){
u.setPath(*it);
selectedFilesWithURLFormat.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')");
}
@@ -139,9 +139,9 @@ void URIEditor::openFileDialog(){
selectedURI( fd.selectedFile() );
else {
selectedURIs( fd.selectedFiles() );
- /*QStringList selectedFiles = fd.selectedFiles();
+ /*TQStringList selectedFiles = fd.selectedFiles();
KURL u;
- for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){
+ for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){
u.setPath(*it);
m_sFiles.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')");
}
@@ -150,18 +150,18 @@ void URIEditor::openFileDialog(){
}
}
-fontEditor::fontEditor(QWidget *parent, const char* name) : TLPEditor(parent,name), m_initialValue(QString::null){
- QString whatsthis =i18n("With this line edit you can insert the name of the font you want to use");
+fontEditor::fontEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name), m_initialValue(TQString::null){
+ TQString whatsthis =i18n("With this line edit you can insert the name of the font you want to use");
setWhatsThis(whatsthis);
setLabelText(i18n("Font family:"));
setButtonIcon("fonts");
setToolTip(i18n("Open font family chooser"));
- connect(m_pb, SIGNAL(clicked()), this, SLOT(openFontChooser()));
- connect(m_le, SIGNAL(textChanged ( const QString & )), this, SIGNAL( valueChanged( const QString& ) ) );
+ connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFontChooser()));
+ connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SIGNAL( valueChanged( const TQString& ) ) );
}
void fontEditor::connectToPropertySetter(propertySetter* p){
- connect(this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&)));
}
void fontEditor::openFontChooser(){
diff --git a/quanta/components/csseditor/tlpeditors.h b/quanta/components/csseditor/tlpeditors.h
index d0e52d37..28881573 100644
--- a/quanta/components/csseditor/tlpeditors.h
+++ b/quanta/components/csseditor/tlpeditors.h
@@ -33,34 +33,34 @@ class TLPEditor : public miniEditor { //editor with a line text and a button cal
Q_OBJECT
protected:
- QLineEdit *m_le;
- QLabel *m_label;
+ TQLineEdit *m_le;
+ TQLabel *m_label;
KPushButton *m_pb;
public:
- TLPEditor(QWidget *parent, const char* name=0);
+ TLPEditor(TQWidget *parent, const char* name=0);
virtual ~TLPEditor();
- virtual void setButtonIcon(QString);
- void setToolTip(QString);
- void setLabelText(QString);
- void setWhatsThis(QString);
- QLineEdit* lineEdit() const { return m_le; }
+ virtual void setButtonIcon(TQString);
+ void setToolTip(TQString);
+ void setLabelText(TQString);
+ void setWhatsThis(TQString);
+ TQLineEdit* lineEdit() const { return m_le; }
KPushButton* button() const { return m_pb; }
- virtual void setInitialValue(const QString& s)=0;
+ virtual void setInitialValue(const TQString& s)=0;
virtual void connectToPropertySetter(propertySetter* p)=0;
signals:
- void valueChanged(const QString&);
+ void valueChanged(const TQString&);
};
class fontEditor : public TLPEditor{
Q_OBJECT
private:
- QString m_initialValue;
+ TQString m_initialValue;
public:
- fontEditor(QWidget *parent, const char* name=0);
- virtual void setInitialValue(const QString& s) { m_initialValue = s; }
+ fontEditor(TQWidget *parent, const char* name=0);
+ virtual void setInitialValue(const TQString& s) { m_initialValue = s; }
virtual void connectToPropertySetter(propertySetter* p);
public slots:
@@ -78,15 +78,15 @@ class URIEditor : public TLPEditor {
URIResourceType m_resourceType;
public:
- URIEditor(QWidget *parent, const char* name=0);
+ URIEditor(TQWidget *parent, const char* name=0);
void setMode(const mode& m);
void setResourceType(const URIResourceType& r) { m_resourceType = r ; }
- virtual void setInitialValue(const QString& /*s*/){}
+ virtual void setInitialValue(const TQString& /*s*/){}
virtual void connectToPropertySetter(propertySetter* p);
public slots:
- void selectedURI(const QString&);
- void selectedURIs(const QStringList&);
+ void selectedURI(const TQString&);
+ void selectedURIs(const TQStringList&);
void openFileDialog();
};