summaryrefslogtreecommitdiffstats
path: root/quanta/components/framewizard
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/framewizard
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/framewizard')
-rw-r--r--quanta/components/framewizard/areaattributedb.h24
-rw-r--r--quanta/components/framewizard/fmfpeditor.cpp36
-rw-r--r--quanta/components/framewizard/fmfpeditor.h10
-rw-r--r--quanta/components/framewizard/fmrceditor.cpp6
-rw-r--r--quanta/components/framewizard/fmrceditor.h2
-rw-r--r--quanta/components/framewizard/framewizard.cpp28
-rw-r--r--quanta/components/framewizard/framewizard.h14
-rw-r--r--quanta/components/framewizard/selectablearea.cpp22
-rw-r--r--quanta/components/framewizard/selectablearea.h20
-rw-r--r--quanta/components/framewizard/treenode.cpp38
-rw-r--r--quanta/components/framewizard/treenode.h40
-rw-r--r--quanta/components/framewizard/visualframeeditor.cpp134
-rw-r--r--quanta/components/framewizard/visualframeeditor.h36
13 files changed, 205 insertions, 205 deletions
diff --git a/quanta/components/framewizard/areaattributedb.h b/quanta/components/framewizard/areaattributedb.h
index e13682b3..6dbe92d1 100644
--- a/quanta/components/framewizard/areaattributedb.h
+++ b/quanta/components/framewizard/areaattributedb.h
@@ -17,9 +17,9 @@
#ifndef AREAATTRIBUTEDB_H
#define AREAATTRIBUTEDB_H
-#include <qrect.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqrect.h>
+#include <tqmap.h>
+#include <tqobject.h>
/**this is
*@author gulmini luciano
*/
@@ -28,22 +28,22 @@ class areaAttribute : public QObject{
Q_OBJECT
private:
- QRect m_geometry;
- QMap<QString,QString> m_attributeMap; //tag specific attributes
+ TQRect m_geometry;
+ TQMap<TQString,TQString> m_attributeMap; //tag specific attributes
public:
areaAttribute();
~areaAttribute(){};
- void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; }
- void setAllAttributes(QMap<QString,QString> map){ m_attributeMap = map; }
+ void setAttribute(const TQString& name, const TQString& value){ m_attributeMap[name] = value; }
+ void setAllAttributes(TQMap<TQString,TQString> map){ m_attributeMap = map; }
void resetAttributes();
- QRect geometry() const { return m_geometry; }
- QString src() const{ return m_attributeMap["src"]; }
- QString attributeValue(QString l) const { return attributeMap()[l];}
- QMap<QString,QString> attributeMap() const { return m_attributeMap; }
+ TQRect geometry() const { return m_geometry; }
+ TQString src() const{ return m_attributeMap["src"]; }
+ TQString attributeValue(TQString l) const { return attributeMap()[l];}
+ TQMap<TQString,TQString> attributeMap() const { return m_attributeMap; }
public slots:
- void setGeometry(QRect g) { m_geometry = g; }
+ void setGeometry(TQRect g) { m_geometry = g; }
};
#endif
diff --git a/quanta/components/framewizard/fmfpeditor.cpp b/quanta/components/framewizard/fmfpeditor.cpp
index cc262453..e2bfb44a 100644
--- a/quanta/components/framewizard/fmfpeditor.cpp
+++ b/quanta/components/framewizard/fmfpeditor.cpp
@@ -16,12 +16,12 @@
***************************************************************************/
#include "fmfpeditor.h"
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qregexp.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqregexp.h>
#include <kurlrequester.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <klocale.h>
//#include <kpreviewwidgetbase.h>
@@ -33,11 +33,11 @@ fmFPeditor::fmFPeditor() : fmFPeditorS (){
sbLeft->setWrapping(true);
sbTop->setWrapping(true);
- QString htmlFiles = i18n("*.html *.htm|HTML Files");
- QString phpFiles = i18n("*.php|PHP Files");
- QString xmlFiles = i18n("*.xml|XML Files");
- QString xhtmlFiles = i18n("*xhtml|XHTML Files");
- QString allFiles = i18n("*|All Files");
+ TQString htmlFiles = i18n("*.html *.htm|HTML Files");
+ TQString phpFiles = i18n("*.php|PHP Files");
+ TQString xmlFiles = i18n("*.xml|XML Files");
+ TQString xhtmlFiles = i18n("*xhtml|XHTML Files");
+ TQString allFiles = i18n("*|All Files");
fc->setFilter(htmlFiles+"\n"+phpFiles+"\n"+xmlFiles+"\n"+xhtmlFiles+"\n"+allFiles);
@@ -45,14 +45,14 @@ fmFPeditor::fmFPeditor() : fmFPeditorS (){
fmFPeditor::~fmFPeditor(){
}
-QString fmFPeditor::noresizeValue() {
+TQString fmFPeditor::noresizeValue() {
switch(bgNoresize->id(bgNoresize->selected())){
case 0:return "";break;
default:return "noresize";
}
}
-QString fmFPeditor::scrollingValue() {
+TQString fmFPeditor::scrollingValue() {
switch(bgScrolling->id(bgScrolling->selected())){
case 0:return "yes";break;
case 2:return "no";break;
@@ -60,14 +60,14 @@ QString fmFPeditor::scrollingValue() {
}
}
-QString fmFPeditor::frameborderValue() {
+TQString fmFPeditor::frameborderValue() {
switch(bgBorder->id(bgBorder->selected())){
case 1:return "0"; break;
default:return "1";
}
}
-void fmFPeditor::setup(QMap<QString,QString> m){
+void fmFPeditor::setup(TQMap<TQString,TQString> m){
leId->setText(m["id"]);
fc->setURL(m["src"]);
leClass->setText(m["class"]);
@@ -89,8 +89,8 @@ void fmFPeditor::setup(QMap<QString,QString> m){
sbTop->setValue(m["marginheight"].toInt());
}
-QMap<QString,QString> fmFPeditor::attributeMap(){
- QMap<QString,QString> map;
+TQMap<TQString,TQString> fmFPeditor::attributeMap(){
+ TQMap<TQString,TQString> map;
map["name"] = leName->text();
map["longdesc"] = leLongdesc->text();
@@ -102,8 +102,8 @@ QMap<QString,QString> fmFPeditor::attributeMap(){
map["class"] = leClass->text();
map["noresize"] = noresizeValue();
map["frameborder"] = frameborderValue();
- map["marginwidth"] = QString::number( sbLeft->value(),10 );
- map["marginheight"] = QString::number( sbTop->value(),10 );
+ map["marginwidth"] = TQString::number( sbLeft->value(),10 );
+ map["marginheight"] = TQString::number( sbTop->value(),10 );
return map;
}
diff --git a/quanta/components/framewizard/fmfpeditor.h b/quanta/components/framewizard/fmfpeditor.h
index c434b421..1a89f0c8 100644
--- a/quanta/components/framewizard/fmfpeditor.h
+++ b/quanta/components/framewizard/fmfpeditor.h
@@ -30,13 +30,13 @@ class fmFPeditor : public fmFPeditorS {
public:
fmFPeditor();
~fmFPeditor();
- void setup(QMap<QString,QString>);
- QMap<QString,QString> attributeMap();
+ void setup(TQMap<TQString,TQString>);
+ TQMap<TQString,TQString> attributeMap();
private:
- QString noresizeValue();
- QString scrollingValue();
- QString frameborderValue();
+ TQString noresizeValue();
+ TQString scrollingValue();
+ TQString frameborderValue();
};
#endif
diff --git a/quanta/components/framewizard/fmrceditor.cpp b/quanta/components/framewizard/fmrceditor.cpp
index 270b3e8c..67c36d62 100644
--- a/quanta/components/framewizard/fmrceditor.cpp
+++ b/quanta/components/framewizard/fmrceditor.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
#include "fmrceditor.h"
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
fmRCeditor::fmRCeditor() : fmRCeditorS(){}
@@ -27,7 +27,7 @@ int fmRCeditor::spinBoxValue() const {
return sb->value();
}
-void fmRCeditor::setLabelText(QString s){
+void fmRCeditor::setLabelText(TQString s){
tl->setText(s);
}
diff --git a/quanta/components/framewizard/fmrceditor.h b/quanta/components/framewizard/fmrceditor.h
index 55441e91..254f1cc5 100644
--- a/quanta/components/framewizard/fmrceditor.h
+++ b/quanta/components/framewizard/fmrceditor.h
@@ -31,7 +31,7 @@ class fmRCeditor : public fmRCeditorS {
~fmRCeditor();
public:
int spinBoxValue() const;
- void setLabelText(QString);
+ void setLabelText(TQString);
};
diff --git a/quanta/components/framewizard/framewizard.cpp b/quanta/components/framewizard/framewizard.cpp
index 2f3903dd..e0e7d5d9 100644
--- a/quanta/components/framewizard/framewizard.cpp
+++ b/quanta/components/framewizard/framewizard.cpp
@@ -21,26 +21,26 @@
#include <kmessagebox.h>
//#include <kdebug.h>
#include <klocale.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "fwglobal.h"
-static const QString info1=i18n("You must select an area."),
+static const TQString info1=i18n("You must select an area."),
info2=i18n("Before editing a frame you must save the file.");
-FrameWizard::FrameWizard(QWidget *parent, const char *name) : FrameWizardS(parent, name),
+FrameWizard::FrameWizard(TQWidget *parent, const char *name) : FrameWizardS(parent, name),
m_hasSelected(false),m_saved(false)
{
m_hasSelected = false;
m_currSA=vfe->internalTree()->root()->label();
- connect(this, SIGNAL(launchDraw()), this, SLOT(draw()));
- connect(vfe, SIGNAL(areaSelected(const QString &)), this, SLOT(catchSelectedArea(const QString &)));
+ connect(this, TQT_SIGNAL(launchDraw()), this, TQT_SLOT(draw()));
+ connect(vfe, TQT_SIGNAL(areaSelected(const TQString &)), this, TQT_SLOT(catchSelectedArea(const TQString &)));
- connect(pbHorizontal, SIGNAL(clicked()), this, SLOT(split()));
- connect(pbVertical, SIGNAL(clicked()), this, SLOT(split()));
- connect(pbEditFrame, SIGNAL(clicked()), this, SLOT(showFrameEditorDlg()));
- connect(pbReset, SIGNAL(clicked()), this, SLOT(reset()));
- connect(pbDelete, SIGNAL(clicked()), this, SLOT(remove()));
+ connect(pbHorizontal, TQT_SIGNAL(clicked()), this, TQT_SLOT(split()));
+ connect(pbVertical, TQT_SIGNAL(clicked()), this, TQT_SLOT(split()));
+ connect(pbEditFrame, TQT_SIGNAL(clicked()), this, TQT_SLOT(showFrameEditorDlg()));
+ connect(pbReset, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset()));
+ connect(pbDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove()));
}
FrameWizard::~FrameWizard(){
@@ -48,7 +48,7 @@ FrameWizard::~FrameWizard(){
Q_CHECK_PTR( vfe );
}
-void FrameWizard::catchSelectedArea(const QString &id ){
+void FrameWizard::catchSelectedArea(const TQString &id ){
m_currSA = id; //is the current SelectableArea selected
m_hasSelected = true;// a SelectableArea has been selected
}
@@ -56,8 +56,8 @@ void FrameWizard::catchSelectedArea(const QString &id ){
void FrameWizard::split(){
if(m_hasSelected) {
int split = 0;
- QString currNodeLabel = m_currSA;
- QString senderName=sender()->name();
+ TQString currNodeLabel = m_currSA;
+ TQString senderName=sender()->name();
if(senderName=="pbHorizontal"){
split = showRCeditorDlg(i18n("Enter the desired number of rows:"));
if(split>=2) vfe->split(currNodeLabel,split,HORIZONTAL);
@@ -77,7 +77,7 @@ void FrameWizard::draw(){
vfe->draw();
}
-int FrameWizard::showRCeditorDlg(const QString &s){
+int FrameWizard::showRCeditorDlg(const TQString &s){
int res = 0;
fmRCeditor *dlg = new fmRCeditor;
dlg->setLabelText(s);
diff --git a/quanta/components/framewizard/framewizard.h b/quanta/components/framewizard/framewizard.h
index 22e93789..6a5c3a54 100644
--- a/quanta/components/framewizard/framewizard.h
+++ b/quanta/components/framewizard/framewizard.h
@@ -32,26 +32,26 @@ class FrameWizard : public FrameWizardS
// has been not saved and so you cannot edit the frame
// This is for me: se non si salva il file no si riesce a conoscere il
// percorso relativo dei file da mettere nell'attributo src
- QString m_currSA;
+ TQString m_currSA;
public:
- FrameWizard( QWidget* parent=0, const char *name=0);
+ FrameWizard( TQWidget* parent=0, const char *name=0);
~FrameWizard();
private slots:
void showFrameEditorDlg();
void reset();
void remove();
- void catchSelectedArea(const QString &id );
+ void catchSelectedArea(const TQString &id );
void split();
void draw();
- int showRCeditorDlg(const QString &s);
+ int showRCeditorDlg(const TQString &s);
public :
- void loadExistingFramesetStructure(const QStringList &list){ vfe->loadExistingStructure(list);}
- QString generateFramesetStructure(){ return vfe->framesetStructure(); }
+ void loadExistingFramesetStructure(const TQStringList &list){ vfe->loadExistingStructure(list);}
+ TQString generateFramesetStructure(){ return vfe->framesetStructure(); }
void setSaved( bool b){ m_saved=b; }
- void setMarkupLanguage(const QString& s){ vfe->setMarkupLanguage(s);}
+ void setMarkupLanguage(const TQString& s){ vfe->setMarkupLanguage(s);}
signals:
void launchDraw();
diff --git a/quanta/components/framewizard/selectablearea.cpp b/quanta/components/framewizard/selectablearea.cpp
index 32ea234b..c168e323 100644
--- a/quanta/components/framewizard/selectablearea.cpp
+++ b/quanta/components/framewizard/selectablearea.cpp
@@ -16,34 +16,34 @@
***************************************************************************/
#include "selectablearea.h"
-#include <qframe.h>
+#include <tqframe.h>
//#include <kdebug.h>
#include "fwglobal.h"
-SelectableArea::SelectableArea(QWidget *parent, const char *name ) : KHTMLPart(parent,name) {
- view()->setFrameShape(QFrame::NoFrame);
- view()->setMinimumSize(QSize(1,1));
+SelectableArea::SelectableArea(TQWidget *parent, const char *name ) : KHTMLPart(parent,name) {
+ view()->setFrameShape(TQFrame::NoFrame);
+ view()->setMinimumSize(TQSize(1,1));
view()->installEventFilter(this);
}
SelectableArea::~SelectableArea(){}
-bool SelectableArea::eventFilter(QObject *o, QEvent *event){
+bool SelectableArea::eventFilter(TQObject *o, TQEvent *event){
switch ( event->type() ) {
- case QEvent::FocusIn : {
- view()->setFrameShape(QFrame::Box);
- view()->setFrameShadow ( QFrame::Plain );
+ case TQEvent::FocusIn : {
+ view()->setFrameShape(TQFrame::Box);
+ view()->setFrameShadow ( TQFrame::Plain );
view()->setLineWidth(2);
emit selected(m_idLabel);
return true;
};
break;
- case QEvent::FocusOut : {
- view()->setFrameShape(QFrame::NoFrame);
+ case TQEvent::FocusOut : {
+ view()->setFrameShape(TQFrame::NoFrame);
return true;
}
break;
- case QEvent::Resize : {
+ case TQEvent::Resize : {
emit Resized( view()->geometry() );
view()->hide();
view()->show();
diff --git a/quanta/components/framewizard/selectablearea.h b/quanta/components/framewizard/selectablearea.h
index 252ec6c9..8de351a9 100644
--- a/quanta/components/framewizard/selectablearea.h
+++ b/quanta/components/framewizard/selectablearea.h
@@ -18,11 +18,11 @@
#ifndef SELECTABLEAREA_H
#define SELECTABLEAREA_H
-//#include <qwidget.h>
+//#include <tqwidget.h>
#include <khtml_part.h>
#include <khtmlview.h>
-/**a QTextBrowser that can be selected
+/**a TQTextBrowser that can be selected
*@author gulmini luciano
*/
@@ -31,21 +31,21 @@ class SelectableArea : public KHTMLPart {
Q_OBJECT
public :
- SelectableArea(QWidget *parent=0, const char *name=0);
+ SelectableArea(TQWidget *parent=0, const char *name=0);
~SelectableArea();
- QString idLabel() const { return m_idLabel; }
- void setIdLabel(const QString &i) { m_idLabel = i; }
- void setSource(const QString& s) { if(!s.isEmpty()) openURL( KURL(s) ); }
+ TQString idLabel() const { return m_idLabel; }
+ void setIdLabel(const TQString &i) { m_idLabel = i; }
+ void setSource(const TQString& s) { if(!s.isEmpty()) openURL( KURL(s) ); }
protected :
- virtual bool eventFilter(QObject*, QEvent*);
+ virtual bool eventFilter(TQObject*, TQEvent*);
private :
- QString m_idLabel;
+ TQString m_idLabel;
signals :
- void selected(const QString &);
- void Resized(QRect);
+ void selected(const TQString &);
+ void Resized(TQRect);
};
diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp
index fcb60231..fd1f187f 100644
--- a/quanta/components/framewizard/treenode.cpp
+++ b/quanta/components/framewizard/treenode.cpp
@@ -19,7 +19,7 @@
static const int SIZE = 101;
-treeNode::treeNode(const QString &l, const QString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){
+treeNode::treeNode(const TQString &l, const TQString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){
m_childrenList.setAutoDelete(true);
m_atts = new areaAttribute;
}
@@ -28,17 +28,17 @@ treeNode::~treeNode(){
delete m_atts;
}
-void treeNode::addChildNode(const QString &l) {
+void treeNode::addChildNode(const TQString &l) {
m_childrenList.append( new treeNode(l,m_label) );
}
-void treeNode::removeChildNode(const QString &l,bool autoDelete) {
+void treeNode::removeChildNode(const TQString &l,bool autoDelete) {
m_childrenList.setAutoDelete(autoDelete);
m_childrenList.remove(findChild(l));
}
-treeNode* treeNode::findChild(const QString &l){
- QPtrListIterator<treeNode> it( m_childrenList );
+treeNode* treeNode::findChild(const TQString &l){
+ TQPtrListIterator<treeNode> it( m_childrenList );
treeNode *node;
while ( (node = it.current()) != 0 ) {
++it;
@@ -50,7 +50,7 @@ treeNode* treeNode::findChild(const QString &l){
int tree::nodeId = 0;
tree::tree(){
- m_root = new treeNode(QString::number(nodeId,10));
+ m_root = new treeNode(TQString::number(nodeId,10));
m_nodeList.resize(SIZE);
}
@@ -68,10 +68,10 @@ void tree::refreshGeometries(treeNode *n){
n->nextChild();
}
- QPtrList<treeNode> list = n->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list = n->childrenList();
+ TQPtrListIterator<treeNode> it( list );
treeNode *node= it.current();
- QRect newGeometry = n->atts()->geometry();
+ TQRect newGeometry = n->atts()->geometry();
if(n->splitType()==VERTICAL){
newGeometry.setHeight(node->atts()->geometry().height());
while ( (node = it.current()) != 0 ) {
@@ -96,30 +96,30 @@ void tree::refreshGeometries(treeNode *n){
}
}
-treeNode* tree::findNode(const QString &l){
+treeNode* tree::findNode(const TQString &l){
if(l==m_root->label()) return m_root;
return m_nodeList.find(l);
}
-QString tree::addChildNode(const QString &l){
+TQString tree::addChildNode(const TQString &l){
treeNode *node;
if( (node = findNode(l)) != 0) {
++nodeId;
- treeNode *newNode = new treeNode(QString::number(nodeId,10),node->label());
+ treeNode *newNode = new treeNode(TQString::number(nodeId,10),node->label());
newNode->atts()->setAttribute( "src",node->atts()->src() );
node->addChildNode(newNode);
- m_nodeList.insert(QString::number(nodeId,10),newNode);
+ m_nodeList.insert(TQString::number(nodeId,10),newNode);
}
- return QString::number(nodeId,10);
+ return TQString::number(nodeId,10);
}
-bool tree::insertChildNode(const QString &l){
- QString parent = findNode(l)->parentLabel();
+bool tree::insertChildNode(const TQString &l){
+ TQString parent = findNode(l)->parentLabel();
int pos=findNode( parent )->childPosition( findNode(l) );
++nodeId;
- treeNode *newNode = new treeNode(QString::number(nodeId,10),parent);
+ treeNode *newNode = new treeNode(TQString::number(nodeId,10),parent);
newNode->atts()->setAttribute( "src",findNode(l)->atts()->src() );
- m_nodeList.insert(QString::number(nodeId,10),newNode);
+ m_nodeList.insert(TQString::number(nodeId,10),newNode);
return findNode( parent )->insertChild(pos,newNode);
}
@@ -130,6 +130,6 @@ void tree::reset(){
m_nodeList.clear();
}
-void tree::removeChildNode(const QString &pl,const QString &l,bool autoDelete){
+void tree::removeChildNode(const TQString &pl,const TQString &l,bool autoDelete){
findNode(pl)->removeChildNode(l,autoDelete);
}
diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h
index c2d0f3d6..0d686630 100644
--- a/quanta/components/framewizard/treenode.h
+++ b/quanta/components/framewizard/treenode.h
@@ -18,9 +18,9 @@
#ifndef TREENODE_H
#define TREENODE_H
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#include "fwglobal.h"
#include "areaattributedb.h"
@@ -30,34 +30,34 @@
*/
class treeNode {
private:
- QString m_label,
+ TQString m_label,
m_parentLabel;
SplitType m_splitType;
- QPtrList<treeNode> m_childrenList;
+ TQPtrList<treeNode> m_childrenList;
areaAttribute *m_atts;
public:
- treeNode(const QString &l=QString::null, const QString &pl=QString::null);
+ treeNode(const TQString &l=TQString::null, const TQString &pl=TQString::null);
~treeNode();
- void addChildNode(const QString &L);
+ void addChildNode(const TQString &L);
void addChildNode(treeNode *n){ m_childrenList.append(n); }
- void removeChildNode(const QString &l, bool autoDelete);
+ void removeChildNode(const TQString &l, bool autoDelete);
void setSplitType(SplitType s) { m_splitType = s; }
- void setLabel(const QString &l) { m_label = l; }
+ void setLabel(const TQString &l) { m_label = l; }
void removeChildren() { m_childrenList.clear(); }
- void setParentLabel(const QString &s){ m_parentLabel = s;}
+ void setParentLabel(const TQString &s){ m_parentLabel = s;}
int childPosition(treeNode* n){ return m_childrenList.find(n); }
bool insertChild(unsigned int pos, treeNode* n) { return m_childrenList.insert( pos, n); }
- QString label() const { return m_label; }
- QString parentLabel() const { return m_parentLabel; }
+ TQString label() const { return m_label; }
+ TQString parentLabel() const { return m_parentLabel; }
SplitType splitType() const { return m_splitType; }
- QPtrList<treeNode> childrenList() { return m_childrenList; }
+ TQPtrList<treeNode> childrenList() { return m_childrenList; }
treeNode* firstChild() { return m_childrenList.first(); }
treeNode* nextChild() { return m_childrenList.next(); }
treeNode* lastChild() { return m_childrenList.last(); }
treeNode* currentChild() { return m_childrenList.current(); }
- treeNode* findChild(const QString &L);
+ treeNode* findChild(const TQString &L);
areaAttribute* atts() { return m_atts; }
@@ -68,18 +68,18 @@ class treeNode {
class tree{
private:
treeNode *m_root;
- QDict<treeNode> m_nodeList;
+ TQDict<treeNode> m_nodeList;
static int nodeId;
public:
tree();
~tree();
treeNode* root() const { return m_root; }
- QString addChildNode(const QString &l);
- bool insertChildNode(const QString &L);
- void removeChildNode(const QString &pl,const QString &l,bool autoDelete);//parent node,child node
- treeNode* findNode(const QString &L);
- areaAttribute* findAreaAttribute(const QString &l){ return findNode(l)->atts(); };
+ TQString addChildNode(const TQString &l);
+ bool insertChildNode(const TQString &L);
+ void removeChildNode(const TQString &pl,const TQString &l,bool autoDelete);//parent node,child node
+ treeNode* findNode(const TQString &L);
+ areaAttribute* findAreaAttribute(const TQString &l){ return findNode(l)->atts(); };
void reset();
void refreshGeometries(treeNode*);
};
diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp
index 3871ac61..db52da97 100644
--- a/quanta/components/framewizard/visualframeeditor.cpp
+++ b/quanta/components/framewizard/visualframeeditor.cpp
@@ -17,8 +17,8 @@
#include "visualframeeditor.h"
-#include <qobjectlist.h>
-#include <qsplitter.h>
+#include <tqobjectlist.h>
+#include <tqsplitter.h>
//#include <kdebug.h>
#include "qextfileinfo.h"
@@ -28,13 +28,13 @@ static int cancelledPixels(int n){
return (n-1)*6;
}
-QMap<QString, QValueList< int > > SIZES;
+TQMap<TQString, TQValueList< int > > SIZES;
static int splitterIdNumber = 0;
-VisualFrameEditor::VisualFrameEditor(QWidget * parent, const char * name) : QHBox(parent,name){
+VisualFrameEditor::VisualFrameEditor(TQWidget * parent, const char * name) : TQHBox(parent,name){
m_internalTree = new tree;
- m_internalTree->root()->atts()->setGeometry(QRect(0,0,510,422));
+ m_internalTree->root()->atts()->setGeometry(TQRect(0,0,510,422));
m_firstInsertedSA = 0L;
m_markupLanguage = HTML;
}
@@ -44,11 +44,11 @@ VisualFrameEditor::~VisualFrameEditor(){
delete m_firstInsertedSA;
}
-void VisualFrameEditor::setGeometries(const QString &l){
+void VisualFrameEditor::setGeometries(const TQString &l){
int cP = cancelledPixels(m_internalTree->findNode(l)->countChildren());
- QRect newGeometry(m_internalTree->findNode(l)->atts()->geometry());
- QPtrList<treeNode> list=m_internalTree->findNode(l)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQRect newGeometry(m_internalTree->findNode(l)->atts()->geometry());
+ TQPtrList<treeNode> list=m_internalTree->findNode(l)->childrenList();
+ TQPtrListIterator<treeNode> it( list );
treeNode *node;
if(m_internalTree->findNode(l)->splitType() == VERTICAL){
int dummyDimension=m_internalTree->findNode(l)->atts()->geometry().width()-cP;
@@ -69,14 +69,14 @@ void VisualFrameEditor::setGeometries(const QString &l){
}
}
-void VisualFrameEditor::split(const QString &l, int n, SplitType type) {
+void VisualFrameEditor::split(const TQString &l, int n, SplitType type) {
if(l==m_internalTree->root()->label()){
m_internalTree->root()->setSplitType(type);
for(int i = 1; i<=n; i++) m_internalTree->addChildNode(l);
setGeometries(l);
}
else {
- QString parentLabel=m_internalTree->findNode(l)->parentLabel();
+ TQString parentLabel=m_internalTree->findNode(l)->parentLabel();
SplitType parentSplit=m_internalTree->findNode(parentLabel)->splitType();
if( parentSplit != type ) {
m_internalTree->findNode(l)->setSplitType(type);
@@ -91,7 +91,7 @@ void VisualFrameEditor::split(const QString &l, int n, SplitType type) {
}
}
-void VisualFrameEditor::loadExistingStructure(const QStringList &list){
+void VisualFrameEditor::loadExistingStructure(const TQStringList &list){
if(!list.isEmpty()) {
m_existingStructure = list;
m_existingStructure.remove("</frameset>");//closure tag not needed
@@ -99,8 +99,8 @@ void VisualFrameEditor::loadExistingStructure(const QStringList &list){
}
}
-QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){
- QStringList list=QStringList::split(",",s);
+TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){
+ TQStringList list=TQStringList::split(",",s);
int leftPercentage = 100;
int leftPercentageDistributedAmongAsterisks=0;
int weightAsteriskCounter=0;
@@ -108,7 +108,7 @@ QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){
// example cols="40%,5*,*"
// then every asterisk must be assigned a percentage of 10% so the real percentage
// notation is cols="40%,50%,10%"
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d;
if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt();
if((*it).contains("*")) {
@@ -124,38 +124,38 @@ QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){
// NB: I valori delle percentuali generati da if .. else possono non corrispondere
// a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione.
// In genere la differenza �dell' 1%
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
if((*it).contains("*")){
int weight= (*it).section("*",0,0).toInt();
if(weight==0) weight=1;
int newPercentage = weight*leftPercentageDistributedAmongAsterisks;
- (*it)=(QString::number(newPercentage,10)+"%");
+ (*it)=(TQString::number(newPercentage,10)+"%");
leftPercentage-=newPercentage;
}
}
return list;
}
-void VisualFrameEditor::buildInternalTree(const QString &parent){
- QString line = m_existingStructure.first();
+void VisualFrameEditor::buildInternalTree(const TQString &parent){
+ TQString line = m_existingStructure.first();
if(line.contains("<frameset")) {
if(line.contains("rows")) {
split(parent,(line.contains(",")+1),HORIZONTAL);
- QRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
+ TQRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
- QRect dummy=m_internalTree->findNode(parent)->atts()->geometry();
- QStringList percentages = convertAsterisks(pattern.cap(1),dummy.height());
+ TQRect dummy=m_internalTree->findNode(parent)->atts()->geometry();
+ TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height());
int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1);
- QPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ TQPtrListIterator<treeNode> it( list );
treeNode *node;
while ( (node = it.current()) != 0 ) {
++it;
- QRect newGeometry(dummy);
+ TQRect newGeometry(dummy);
double newDimension;
if(percentages.first().contains("%"))
newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0;
@@ -168,20 +168,20 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){
else
if(line.contains("cols")) {
split(parent,(line.contains(",")+1),VERTICAL);
- QRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\"");
+ TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
- QRect dummy=m_internalTree->findNode(parent)->atts()->geometry();
- QStringList percentages = convertAsterisks(pattern.cap(1),dummy.width());
+ TQRect dummy=m_internalTree->findNode(parent)->atts()->geometry();
+ TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width());
int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1);
- QPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ TQPtrListIterator<treeNode> it( list );
treeNode *node;
while ( (node = it.current()) != 0 ) {
++it;
- QRect newGeometry(dummy);
+ TQRect newGeometry(dummy);
double newDimension;
if(percentages.first().contains("%"))
newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0;
@@ -200,11 +200,11 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){
}
}
else {
- QMap<QString,QString> attributeMap;
- if( line.contains( QRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize";
- else attributeMap["noresize"] = QString::null;
+ TQMap<TQString,TQString> attributeMap;
+ if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize";
+ else attributeMap["noresize"] = TQString::null;
- QRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files
+ TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files
if(srcPattern.search(line) !=-1 ) {
KURL pathToConvert, basePath;
pathToConvert.setPath(srcPattern.cap(1));
@@ -213,12 +213,12 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){
line.remove(srcPattern);//we don't need to operate on this anymore
}
- QRegExp pattern("\\s+(\\w+\\s*=\\s*\"[\\w\\s\\./_\\+\\d]*\")");
+ TQRegExp pattern("\\s+(\\w+\\s*=\\s*\"[\\w\\s\\./_\\+\\d]*\")");
int pos = 0;
while ( pos >= 0 ) {
pos = pattern.search( line, pos );
- attributeMap[ pattern.cap(1).section( QRegExp("=\\s*\"") ,0,0) ] = pattern.cap(1).section(QRegExp("=\\s*\""),1,1).remove("\"");
+ attributeMap[ pattern.cap(1).section( TQRegExp("=\\s*\"") ,0,0) ] = pattern.cap(1).section(TQRegExp("=\\s*\""),1,1).remove("\"");
if ( pos >= 0 ) pos += pattern.matchedLength();
}
m_internalTree->findNode(parent)->atts()->setAllAttributes(attributeMap);
@@ -226,14 +226,14 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){
}
}
-void VisualFrameEditor::paintEvent ( QPaintEvent * ){
+void VisualFrameEditor::paintEvent ( TQPaintEvent * ){
hide();
delete m_firstInsertedSA;
m_firstInsertedSA = 0L;
- QObjectList* splitterList = queryList("QSplitter");
+ TQObjectList* splitterList = queryList("TQSplitter");
for (uint i = 0; i < splitterList->count(); i++) {
- QObject* o = splitterList->at(i);
+ TQObject* o = splitterList->at(i);
removeChild(o); //this will delete all childr of "o"
}
@@ -243,24 +243,24 @@ void VisualFrameEditor::paintEvent ( QPaintEvent * ){
show();
}
-void VisualFrameEditor::removeNode(const QString &l){
+void VisualFrameEditor::removeNode(const TQString &l){
if( l == m_internalTree->root()->label() ) m_internalTree->reset();//trying to remove root node is equivalent to reinitialize
else {
- QString parentLabel=m_internalTree->findNode(l)->parentLabel();
+ TQString parentLabel=m_internalTree->findNode(l)->parentLabel();
if(m_internalTree->findNode(parentLabel)->countChildren()>=3)
m_internalTree->removeChildNode(parentLabel,l,true);
else {
m_internalTree->removeChildNode(parentLabel,l,true);
if( !m_internalTree->findNode(parentLabel)->firstChild()->hasChildren() ){ //final nodes
- QMap<QString,QString> map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap();
+ TQMap<TQString,TQString> map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap();
m_internalTree->findNode(parentLabel)->removeChildren();
m_internalTree->findNode(parentLabel)->atts()->setAllAttributes( map ) ;
m_internalTree->findNode(parentLabel)->setSplitType(NONE);
}
else {
- QPtrList<treeNode> list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList();
+ TQPtrList<treeNode> list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList();
if( parentLabel != m_internalTree->root()->label() ) {
- QString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel();
+ TQString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel();
m_internalTree->removeChildNode( parentLabel,m_internalTree->findNode(parentLabel)->firstChild()->label(),false );
m_internalTree->removeChildNode( grandParentLabel ,parentLabel, true );
treeNode *node;
@@ -283,14 +283,14 @@ void VisualFrameEditor::removeNode(const QString &l){
}
}
-void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){
+void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* parent){
if(n->hasChildren()) {
- QString splitterName("splitter"+QString::number(++splitterIdNumber,10));
- QSplitter *splitter = new QSplitter(parent,splitterName);
+ TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10));
+ TQSplitter *splitter = new TQSplitter(parent,splitterName);
if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] );
switch( n->splitType() ){
- case VERTICAL : splitter->setOrientation(QSplitter::Horizontal);break;
- case HORIZONTAL : splitter->setOrientation(QSplitter::Vertical);break;
+ case VERTICAL : splitter->setOrientation(TQSplitter::Horizontal);break;
+ case HORIZONTAL : splitter->setOrientation(TQSplitter::Vertical);break;
default:break;
}
n->firstChild();
@@ -301,19 +301,19 @@ void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){
}
else {
SelectableArea *sa=new SelectableArea(parent,n->label());
- if(parent->isA("QSplitter")) dynamic_cast<QSplitter *>(parent)->setResizeMode(sa->view(),QSplitter::KeepSize );
+ if(parent->isA("TQSplitter")) dynamic_cast<TQSplitter *>(parent)->setResizeMode(sa->view(),TQSplitter::KeepSize );
else
if(!m_firstInsertedSA) m_firstInsertedSA = sa;
sa->view()->setGeometry(n->atts()->geometry());
sa->setIdLabel( n->label() );
sa->setSource( n->atts()->src() );
- connect(sa, SIGNAL(Resized(QRect)), m_internalTree->findNode(sa->idLabel())->atts(), SLOT(setGeometry(QRect)));
- connect(sa, SIGNAL(selected(const QString &)),this, SIGNAL(areaSelected(const QString &)));
+ connect(sa, TQT_SIGNAL(Resized(TQRect)), m_internalTree->findNode(sa->idLabel())->atts(), TQT_SLOT(setGeometry(TQRect)));
+ connect(sa, TQT_SIGNAL(selected(const TQString &)),this, TQT_SIGNAL(areaSelected(const TQString &)));
}
}
-QString VisualFrameEditor::createFrameTag(areaAttribute *a){
- QString Src(a->attributeValue("src")),
+TQString VisualFrameEditor::createFrameTag(areaAttribute *a){
+ TQString Src(a->attributeValue("src")),
Longdesc(a->attributeValue("longdesc")),
Name(a->attributeValue("name")),
Scrolling(a->attributeValue("scrolling")),
@@ -326,7 +326,7 @@ QString VisualFrameEditor::createFrameTag(areaAttribute *a){
Marginwidth(a->attributeValue("marginwidth")),
Marginheight(a->attributeValue("marginheight"));
- QString tagBegin="<frame",
+ TQString tagBegin="<frame",
tagEnd,
tagMiddle;
@@ -362,9 +362,9 @@ QString VisualFrameEditor::createFrameTag(areaAttribute *a){
return tagBegin+tagMiddle+tagEnd;
}
-QString VisualFrameEditor::RCvalue(treeNode *n) {
- QString s;
- QMap<int,int> dimMap;
+TQString VisualFrameEditor::RCvalue(treeNode *n) {
+ TQString s;
+ TQMap<int,int> dimMap;
double percentage = 100.0;
int remainingPercentage=100;
int child_number = n->countChildren();
@@ -390,14 +390,14 @@ QString VisualFrameEditor::RCvalue(treeNode *n) {
for(int i=1;i<=child_number-1;++i) {
remainingPercentage-=proxInt(dimMap[i]*percentage);
- s+=QString::number(proxInt(dimMap[i]*percentage),10);
+ s+=TQString::number(proxInt(dimMap[i]*percentage),10);
s+="%,";
}
- return s+=(QString::number(remainingPercentage,10)+"%");
+ return s+=(TQString::number(remainingPercentage,10)+"%");
}
-static QStringList nonFormattedStructure;
+static TQStringList nonFormattedStructure;
void VisualFrameEditor::createStructure(treeNode* n){
if(n==m_internalTree->root() && !n->hasChildren()) return;
@@ -417,10 +417,10 @@ void VisualFrameEditor::createStructure(treeNode* n){
else nonFormattedStructure.append(createFrameTag(n->atts()));
}
-QString VisualFrameEditor::formatStructure(){
- QString s;
+TQString VisualFrameEditor::formatStructure(){
+ TQString s;
int tabNum = 0;
- for ( QStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) {
+ for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) {
if((*it).contains("<frameset")) tabNum++;
else
if((*it).contains("</frameset>")) {
@@ -434,13 +434,13 @@ QString VisualFrameEditor::formatStructure(){
return s;
}
-QString VisualFrameEditor::framesetStructure() {
+TQString VisualFrameEditor::framesetStructure() {
m_internalTree->refreshGeometries(m_internalTree->root());
createStructure(m_internalTree->root());
return formatStructure();
}
-void VisualFrameEditor::setMarkupLanguage(const QString& s){
+void VisualFrameEditor::setMarkupLanguage(const TQString& s){
if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML;
else
if( s.contains("html",false)!=0 ) m_markupLanguage = HTML;
diff --git a/quanta/components/framewizard/visualframeeditor.h b/quanta/components/framewizard/visualframeeditor.h
index 4924f3cb..27cef614 100644
--- a/quanta/components/framewizard/visualframeeditor.h
+++ b/quanta/components/framewizard/visualframeeditor.h
@@ -20,47 +20,47 @@
#include "treenode.h"
#include "selectablearea.h"
-#include <qhbox.h>
+#include <tqhbox.h>
/**
*@author gulmini luciano
*/
-class VisualFrameEditor : public QHBox {
+class VisualFrameEditor : public TQHBox {
Q_OBJECT
private:
enum MarkupLanguage{XHTML,HTML};
tree *m_internalTree;
SelectableArea* m_firstInsertedSA;
- QStringList m_existingStructure;
+ TQStringList m_existingStructure;
MarkupLanguage m_markupLanguage;
- void buildInternalTree(const QString &parent);
- void setGeometries(const QString &l);
- void drawGUI(treeNode *n, QWidget* parent);
- QStringList convertAsterisks(const QString &s, int d);
+ void buildInternalTree(const TQString &parent);
+ void setGeometries(const TQString &l);
+ void drawGUI(treeNode *n, TQWidget* parent);
+ TQStringList convertAsterisks(const TQString &s, int d);
- QString createFrameTag(areaAttribute *a);
- QString formatStructure();
- QString RCvalue(treeNode *n);
+ TQString createFrameTag(areaAttribute *a);
+ TQString formatStructure();
+ TQString RCvalue(treeNode *n);
void createStructure(treeNode* n);
public:
- VisualFrameEditor( QWidget * parent = 0, const char * name = 0);
+ VisualFrameEditor( TQWidget * parent = 0, const char * name = 0);
~VisualFrameEditor();
void draw() { repaint(); }
- void loadExistingStructure(const QStringList &list);
- QString framesetStructure();
- void removeNode(const QString &l);
- void split(const QString &l, int n, SplitType type);
- void setMarkupLanguage(const QString& s);
+ void loadExistingStructure(const TQStringList &list);
+ TQString framesetStructure();
+ void removeNode(const TQString &l);
+ void split(const TQString &l, int n, SplitType type);
+ void setMarkupLanguage(const TQString& s);
tree* internalTree() { return m_internalTree;}
protected:
- virtual void paintEvent ( QPaintEvent * );
+ virtual void paintEvent ( TQPaintEvent * );
signals:
- void areaSelected(const QString &);
+ void areaSelected(const TQString &);
};
#endif