summaryrefslogtreecommitdiffstats
path: root/src/knowitlink.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:20:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:20:52 +0000
commite86f8310a920cbf1ecfac955fbad05916e954693 (patch)
treeddc018560d03c6aa794d9f399d006e5e3aa597f0 /src/knowitlink.cpp
parent1829a84466f690d4a6a10ddab91cea0f45ec9d77 (diff)
downloadknowit-e86f8310a920cbf1ecfac955fbad05916e954693.tar.gz
knowit-e86f8310a920cbf1ecfac955fbad05916e954693.zip
TQt4 port knowit
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knowit@1238876 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knowitlink.cpp')
-rw-r--r--src/knowitlink.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/knowitlink.cpp b/src/knowitlink.cpp
index 7aa3a7f..e503c25 100644
--- a/src/knowitlink.cpp
+++ b/src/knowitlink.cpp
@@ -18,10 +18,10 @@
#include "knowitlink.h"
#include "notes.h"
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kfiledialog.h>
#include <kglobal.h>
@@ -33,30 +33,30 @@
KnowitLinkDialog::KnowitLinkDialog()
: KDialogBase(Plain, i18n("Modify link"), Ok|Cancel, Ok)
{
- QVBoxLayout* layout = new QVBoxLayout(plainPage());
+ TQVBoxLayout* tqlayout = new TQVBoxLayout(plainPage());
- QHBox* typeBox = new QHBox(plainPage());
- layout->addWidget(typeBox);
- new QLabel(i18n("Referenced item:"), typeBox);
+ TQHBox* typeBox = new TQHBox(plainPage());
+ tqlayout->addWidget(typeBox);
+ new TQLabel(i18n("Referenced item:"), typeBox);
linkType = new KComboBox(typeBox, "LinkType");
linkType->insertItem(i18n("File or URL"));
linkType->insertItem(i18n("KnowIt note"));
- layout->addItem(new QSpacerItem(0, 5));
- QHBox* editBox = new QHBox(plainPage());
- layout->addWidget(editBox);
+ tqlayout->addItem(new TQSpacerItem(0, 5));
+ TQHBox* editBox = new TQHBox(plainPage());
+ tqlayout->addWidget(editBox);
linkValue = new KLineEdit("Link text", editBox);
linkValue->setMinimumWidth(300);
- browse = new QToolButton(editBox, "Browse");
- browse->setIconSet(QIconSet(KGlobal::iconLoader()->loadIcon("fileopen",
+ browse = new TQToolButton(editBox, "Browse");
+ browse->setIconSet(TQIconSet(KGlobal::iconLoader()->loadIcon("fileopen",
KIcon::Toolbar, KIcon::SizeSmall)));
- layout->addItem(new QSpacerItem(0, 5));
- layout->addWidget(new QLabel(i18n("Link description:"), plainPage()));
- layout->addWidget(linkDescription = new KLineEdit("Link description", plainPage()));
+ tqlayout->addItem(new TQSpacerItem(0, 5));
+ tqlayout->addWidget(new TQLabel(i18n("Link description:"), plainPage()));
+ tqlayout->addWidget(linkDescription = new KLineEdit("Link description", plainPage()));
- connect(browse, SIGNAL(clicked()), this, SLOT(slotBrowse()));
- connect(linkType, SIGNAL(activated(int)), this, SLOT(slotTypeChanged(int)));
+ connect(browse, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowse()));
+ connect(linkType, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTypeChanged(int)));
}
KnowitLinkDialog::~KnowitLinkDialog()
@@ -72,7 +72,7 @@ bool KnowitLinkDialog::modifyLink(TNoteLink& link)
else
linkValue->setText(link.link);
slotTypeChanged(linkType->currentItem());
- if (exec() == QDialog::Accepted) {
+ if (exec() == TQDialog::Accepted) {
link.description = linkDescription->text();
if (linkType->currentItem())
link.link = "knowit://" + linkValue->text();
@@ -86,7 +86,7 @@ bool KnowitLinkDialog::modifyLink(TNoteLink& link)
void KnowitLinkDialog::slotBrowse()
{
- KURL url=KFileDialog::getOpenURL(QString::null,
+ KURL url=KFileDialog::getOpenURL(TQString(),
i18n("*|All files"), this, i18n("Choose link..."));
if (!url.isEmpty()) {
linkValue->setText(url.url());