summaryrefslogtreecommitdiffstats
path: root/quanta/treeviews/tagattributeitems.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/treeviews/tagattributeitems.cpp')
-rw-r--r--quanta/treeviews/tagattributeitems.cpp124
1 files changed, 62 insertions, 62 deletions
diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp
index 4b74217d..176928c0 100644
--- a/quanta/treeviews/tagattributeitems.cpp
+++ b/quanta/treeviews/tagattributeitems.cpp
@@ -13,12 +13,12 @@
***************************************************************************/
//qt includes
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
//kde includes
#include <dcopref.h>
@@ -40,12 +40,12 @@
#include "qextfileinfo.h"
#include "styleeditor.h"
-TopLevelItem::TopLevelItem(KListView* parent, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, const TQString &title)
: KListViewItem(parent, title)
{
}
-TopLevelItem::TopLevelItem(KListView* parent, QListViewItem* after, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, TQListViewItem* after, const TQString &title)
: KListViewItem(parent, after, title)
{
}
@@ -55,7 +55,7 @@ TopLevelItem::~TopLevelItem()
}
-void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
+void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -64,24 +64,24 @@ void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
// make toplevel item names bold
if (column == 0 && !parent())
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold(true);
p->setFont(f);
}
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
+ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* parent)
: KListViewItem(parent)
{
m_listView = listView;
- comboBox = new QComboBox(false, m_listView->viewport() );
- QRect r = m_listView->itemRect( this );
+ comboBox = new TQComboBox(false, m_listView->viewport() );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -89,7 +89,7 @@ ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
}
r.setX( m_listView->header()->sectionPos( 0 ) + 20);
r.setWidth( m_listView->header()->sectionSize( 0 ) - 20);
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
comboBox->resize( r.size() );
m_listView->moveChild( comboBox, r.x(), r.y() );
}
@@ -100,7 +100,7 @@ ParentItem::~ParentItem()
}
-void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ParentItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -109,7 +109,7 @@ void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
@@ -133,57 +133,57 @@ void ParentItem::showList(bool show)
if (show)
{
comboBox->show();
- QObject::connect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::connect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
else
{
comboBox->hide();
- QObject::disconnect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::disconnect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
}
//Generic attribute item
-AttributeItem::AttributeItem(QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
lin = 0L;
lin2 = 0L;
}
-AttributeItem::AttributeItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2)
: KListViewItem(listView, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2,
- QListViewItem* after)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2,
+ TQListViewItem* after)
: KListViewItem(listView, after, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
@@ -194,7 +194,7 @@ AttributeItem::~AttributeItem()
delete lin2;
}
-void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
+void AttributeItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -202,12 +202,12 @@ void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-QString AttributeItem::editorText(int column)
+TQString AttributeItem::editorText(int column)
{
if(column == 1)
return lin->text();
@@ -260,9 +260,9 @@ void AttributeItem::hideEditor(int column)
}
}
-void AttributeItem::placeEditor( QWidget *w, int column)
+void AttributeItem::placeEditor( TQWidget *w, int column)
{
- QRect r = m_listView->itemRect( this );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -278,21 +278,21 @@ void AttributeItem::placeEditor( QWidget *w, int column)
r.setX( m_listView->header()->sectionPos( 0 ) );
r.setWidth( m_listView->header()->sectionSize( 0 ) - 1 );
}
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
m_listView->moveChild( w, r.x(), r.y() );
}
//Boolean attribute item
-AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanTrue);
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanFalse);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeBoolItem::~AttributeBoolItem()
@@ -300,7 +300,7 @@ AttributeBoolItem::~AttributeBoolItem()
delete combo;
}
-QString AttributeBoolItem::editorText(int)
+TQString AttributeBoolItem::editorText(int)
{
return combo->currentText();
}
@@ -324,14 +324,14 @@ void AttributeBoolItem::hideEditor(int)
}
//Boolean attribute item
-AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
urlRequester = new KURLRequester( m_listView->viewport() );
urlRequester->setMode(KFile::File | KFile::ExistingOnly );
urlRequester->hide();
- QObject::connect( urlRequester, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( urlRequester, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeUrlItem::~AttributeUrlItem()
@@ -339,14 +339,14 @@ AttributeUrlItem::~AttributeUrlItem()
delete urlRequester;
}
-QString AttributeUrlItem::editorText(int)
+TQString AttributeUrlItem::editorText(int)
{
KURL url, baseURL;
QuantaCommon::setUrl(url, urlRequester->url());
baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url();
baseURL.setPath(baseURL.directory());
url = QExtFileInfo::toRelative(url, baseURL);
- QString s = url.url();
+ TQString s = url.url();
if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol())
s.remove(0, url.protocol().length() + 3);
return s;
@@ -375,11 +375,11 @@ void AttributeUrlItem::hideEditor(int)
//editable listbox
//Boolean attribute item
-AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2, Attribute *attr)
+AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2, Attribute *attr)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
Node *node = (static_cast<TagAttributeTree *>(m_listView))->node();
QTag *qTag = QuantaCommon::tagFromDTD(node);
if (qTag)
@@ -391,15 +391,15 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->insertStringList(attr->values);
if (attr->source == "dcop") //fill the list with a result of a DCOP call
{
- QString interface = "QuantaIf";
+ TQString interface = "QuantaIf";
if (!attr->interface.isEmpty())
interface = attr->interface;
- QString arguments = attr->arguments;
+ TQString arguments = attr->arguments;
arguments.replace("%tagname%", node->tag->name);
DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments);
if (reply.isValid())
{
- QStringList list = reply;
+ TQStringList list = reply;
combo->insertStringList(list);
}
}
@@ -409,7 +409,7 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->setEditable(true);
}
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeListItem::~AttributeListItem()
@@ -417,7 +417,7 @@ AttributeListItem::~AttributeListItem()
delete combo;
}
-QString AttributeListItem::editorText(int)
+TQString AttributeListItem::editorText(int)
{
return combo->currentText();
}
@@ -455,14 +455,14 @@ void AttributeListItem::hideEditor(int)
}
//editable color combobox
-AttributeColorItem::AttributeColorItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
combo = new KColorCombo( m_listView->viewport() );
combo->setEditable(true);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeColorItem::~AttributeColorItem()
@@ -470,9 +470,9 @@ AttributeColorItem::~AttributeColorItem()
delete combo;
}
-QString AttributeColorItem::editorText(int)
+TQString AttributeColorItem::editorText(int)
{
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
combo->setCurrentText(name);
@@ -491,7 +491,7 @@ void AttributeColorItem::showEditor(int)
void AttributeColorItem::hideEditor(int)
{
m_listView->editorContentChanged();
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
setText(1, name);
@@ -499,7 +499,7 @@ void AttributeColorItem::hideEditor(int)
}
//editable style combobox
-AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
@@ -508,7 +508,7 @@ AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* pa
//combo->setEditable(true);
m_se->hide();
- QObject::connect( m_se->button(), SIGNAL( clicked() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( m_se->button(), TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeStyleItem::~AttributeStyleItem()
@@ -516,7 +516,7 @@ AttributeStyleItem::~AttributeStyleItem()
delete m_se;
}
-QString AttributeStyleItem::editorText(int)
+TQString AttributeStyleItem::editorText(int)
{
return m_se->lineEdit()->text();
}