diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/libgui/editor.cpp | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/libgui/editor.cpp')
-rw-r--r-- | src/libgui/editor.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libgui/editor.cpp b/src/libgui/editor.cpp index c64d98f..1bbacb2 100644 --- a/src/libgui/editor.cpp +++ b/src/libgui/editor.cpp @@ -13,17 +13,17 @@ #include "common/gui/purl_gui.h" #include "common/gui/misc_gui.h" -Editor::Editor(const QString &title, const QString &tag, QWidget *parent, const char *name) - : QWidget(parent, name), _title(title), _tag(tag) +Editor::Editor(const TQString &title, const TQString &tag, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name), _title(title), _tag(tag) {} -Editor::Editor(QWidget *parent, const char *name) - : QWidget(parent, name) +Editor::Editor(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) {} -QSizePolicy Editor::sizePolicy() const +TQSizePolicy Editor::sizePolicy() const { - return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } void Editor::setModified(bool m) @@ -49,7 +49,7 @@ bool Editor::save() bool Editor::saveAs() { - QString filter = PURL::filter(fileType()); + TQString filter = PURL::filter(fileType()); PURL::Url purl = PURL::getSaveUrl(":save_file_as", filter, this, i18n("Save File"), PURL::AskOverwrite); if ( purl.isEmpty() ) return false; if ( !save(purl) ) return false; @@ -69,7 +69,7 @@ bool Editor::slotLoad() return true; } -QString Editor::filename() const +TQString Editor::filename() const { return (url().isEmpty() ? "<" + _title + ">" : "\"" + url().filepath() + "\""); } @@ -77,7 +77,7 @@ QString Editor::filename() const bool Editor::checkSaved() { if ( !isModified() ) return true; - MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").arg(filename()), + MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()); if ( res==MessageBox::Cancel ) return false; if ( res==MessageBox::Yes ) save(); |