summaryrefslogtreecommitdiffstats
path: root/kexi/widget/kexipropertyeditorview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/widget/kexipropertyeditorview.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/widget/kexipropertyeditorview.cpp')
-rw-r--r--kexi/widget/kexipropertyeditorview.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kexi/widget/kexipropertyeditorview.cpp b/kexi/widget/kexipropertyeditorview.cpp
index 5225a7af..801f17b2 100644
--- a/kexi/widget/kexipropertyeditorview.cpp
+++ b/kexi/widget/kexipropertyeditorview.cpp
@@ -27,20 +27,20 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-KexiObjectInfoLabel::KexiObjectInfoLabel(QWidget* parent, const char* name)
- : QWidget(parent, name)
+KexiObjectInfoLabel::KexiObjectInfoLabel(TQWidget* tqparent, const char* name)
+ : TQWidget(tqparent, name)
{
- QHBoxLayout *hlyr = new QHBoxLayout(this);
- m_objectIconLabel = new QLabel(this);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(this);
+ m_objectIconLabel = new TQLabel(this);
m_objectIconLabel->setMargin(2);
setFixedHeight( IconSize(KIcon::Small) + 2 + 2 );
hlyr->addWidget(m_objectIconLabel);
- m_objectNameLabel = new QLabel(this);
+ m_objectNameLabel = new TQLabel(this);
m_objectNameLabel->setMargin(2);
- m_objectNameLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
+ m_objectNameLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred);
hlyr->addWidget(m_objectNameLabel);
}
@@ -48,7 +48,7 @@ KexiObjectInfoLabel::~KexiObjectInfoLabel()
{
}
-void KexiObjectInfoLabel::setObjectClassIcon(const QString& name)
+void KexiObjectInfoLabel::setObjectClassIcon(const TQString& name)
{
m_classIcon = name;
if (m_classIcon.isEmpty())
@@ -58,13 +58,13 @@ void KexiObjectInfoLabel::setObjectClassIcon(const QString& name)
m_objectIconLabel->setPixmap( SmallIcon(name) );
}
-void KexiObjectInfoLabel::setObjectClassName(const QString& name)
+void KexiObjectInfoLabel::setObjectClassName(const TQString& name)
{
m_className = name;
updateName();
}
-void KexiObjectInfoLabel::setObjectName(const QString& name)
+void KexiObjectInfoLabel::setObjectName(const TQString& name)
{
m_objectName = name;
updateName();
@@ -72,15 +72,15 @@ void KexiObjectInfoLabel::setObjectName(const QString& name)
void KexiObjectInfoLabel::updateName()
{
- QString txt( m_className );
+ TQString txt( m_className );
if (txt.isEmpty())
txt = m_objectName;
else if (!m_objectName.isEmpty())
- txt += QString(" \"%1\"").arg(m_objectName);
+ txt += TQString(" \"%1\"").tqarg(m_objectName);
m_objectNameLabel->setText(txt);
}
-void KexiObjectInfoLabel::setBuddy( QWidget * buddy )
+void KexiObjectInfoLabel::setBuddy( TQWidget * buddy )
{
m_objectNameLabel->setBuddy(buddy);
}
@@ -95,47 +95,47 @@ class KexiPropertyEditorView::Private
{
}
KoProperty::Editor *editor;
-// QLabel *objectIcon;
-// QString iconName;
-// QLabel *objectClassName;
+// TQLabel *objectIcon;
+// TQString iconName;
+// TQLabel *objectClassName;
KexiObjectInfoLabel *objectInfoLabel;
};
//------------------------------
-KexiPropertyEditorView::KexiPropertyEditorView(KexiMainWindow *mainWin, QWidget* parent)
- : QWidget(parent, "KexiPropertyEditorView")
+KexiPropertyEditorView::KexiPropertyEditorView(KexiMainWindow *mainWin, TQWidget* tqparent)
+ : TQWidget(tqparent, "KexiPropertyEditorView")
, d(new Private())
{
setCaption(i18n("Properties"));
//TODO: set a nice icon
setIcon(*mainWin->icon());
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
//add object class info
d->objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel");
lyr->addWidget(d->objectInfoLabel);
/*
- QHBoxLayout *vlyr = new QHBoxLayout(lyr);
- d->objectIcon = new QLabel(this);
+ TQHBoxLayout *vlyr = new TQHBoxLayout(lyr);
+ d->objectIcon = new TQLabel(this);
d->objectIcon->setMargin(2);
d->objectIcon->setFixedHeight( IconSize(KIcon::Small) + 2 + 2 );
vlyr->addWidget(d->objectIcon);
- d->objectClassName = new QLabel(this);
+ d->objectClassName = new TQLabel(this);
d->objectClassName->setMargin(2);
- d->objectClassName->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
+ d->objectClassName->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred);
vlyr->addWidget(d->objectClassName);*/
d->editor = new KoProperty::Editor(this, true /*AutoSync*/, "propeditor");
lyr->addWidget(d->editor);
setFocusProxy(d->editor);
d->objectInfoLabel->setBuddy(d->editor);
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(TQ_WheelFocus);
- connect(d->editor, SIGNAL(propertySetChanged(KoProperty::Set*)),
- this, SLOT(slotPropertySetChanged(KoProperty::Set*)));
+ connect(d->editor, TQT_SIGNAL(propertySetChanged(KoProperty::Set*)),
+ this, TQT_SLOT(slotPropertySetChanged(KoProperty::Set*)));
// d->iconName = "dummy";
slotPropertySetChanged(0);
@@ -146,24 +146,24 @@ KexiPropertyEditorView::~KexiPropertyEditorView()
delete d;
}
-QSize KexiPropertyEditorView::sizeHint() const
+TQSize KexiPropertyEditorView::tqsizeHint() const
{
- return QSize(200,200);//m_editor->sizeHint();
+ return TQSize(200,200);//m_editor->tqsizeHint();
}
-QSize KexiPropertyEditorView::minimumSizeHint() const
+TQSize KexiPropertyEditorView::tqminimumSizeHint() const
{
- return QSize(200,200);//m_editor->sizeHint();
+ return TQSize(200,200);//m_editor->tqsizeHint();
}
-/*void KexiPropertyEditorView::setGeometry ( const QRect &r )
+/*void KexiPropertyEditorView::setGeometry ( const TQRect &r )
{
- QWidget::setGeometry(r);
+ TQWidget::setGeometry(r);
}
void KexiPropertyEditorView::resize ( int w, int h )
{
- QWidget::resize( w, h );
+ TQWidget::resize( w, h );
}*/
KoProperty::Editor *KexiPropertyEditorView::editor() const
@@ -179,23 +179,23 @@ KoProperty::Editor *KexiPropertyEditorView::editor() const
hidden.
*/
void KexiPropertyEditorView::updateInfoLabelForPropertySet(KexiObjectInfoLabel *infoLabel,
- KoProperty::Set* set, const QString& textToDisplayForNullSet)
+ KoProperty::Set* set, const TQString& textToDisplayForNullSet)
{
- QString className, iconName, objectName;
+ TQString className, iconName, objectName;
if (set) {
- if (set->contains("this:classString"))
+ if (set->tqcontains("this:classString"))
className = (*set)["this:classString"].value().toString();
- if (set->contains("this:iconName"))
+ if (set->tqcontains("this:iconName"))
iconName = (*set)["this:iconName"].value().toString();
- const bool useCaptionAsObjectName = set->contains("this:useCaptionAsObjectName")
+ const bool useCaptionAsObjectName = set->tqcontains("this:useCaptionAsObjectName")
&& (*set)["this:useCaptionAsObjectName"].value().toBool();
- if (set->contains(useCaptionAsObjectName ? "caption" : "name"))
+ if (set->tqcontains(useCaptionAsObjectName ? "caption" : "name"))
objectName = (*set)[useCaptionAsObjectName ? "caption" : "name"].value().toString();
}
if (!set || objectName.isEmpty()) {
objectName = textToDisplayForNullSet;
- className = QString::null;
- iconName = QString::null;
+ className = TQString();
+ iconName = TQString();
}
if (className.isEmpty() && objectName.isEmpty())