summaryrefslogtreecommitdiffstats
path: root/kplato/kptpart.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kplato/kptpart.cc')
-rw-r--r--kplato/kptpart.cc72
1 files changed, 36 insertions, 36 deletions
diff --git a/kplato/kptpart.cc b/kplato/kptpart.cc
index 42055e88..459f0854 100644
--- a/kplato/kptpart.cc
+++ b/kplato/kptpart.cc
@@ -30,8 +30,8 @@
#include "kptganttview.h"
#include "KDGanttViewTaskLink.h"
-#include <qpainter.h>
-#include <qfileinfo.h>
+#include <tqpainter.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -48,11 +48,11 @@
namespace KPlato
{
-Part::Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, bool singleViewMode)
- : KoDocument(parentWidget, widgetName, parent, name, singleViewMode),
- m_project(0), m_projectDialog(0), m_parentWidget(parentWidget), m_view(0),
- m_embeddedGanttView(new GanttView(parentWidget)),
+Part::Part(TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, bool singleViewMode)
+ : KoDocument(tqparentWidget, widgetName, tqparent, name, singleViewMode),
+ m_project(0), m_projectDialog(0), m_parentWidget(tqparentWidget), m_view(0),
+ m_embeddedGanttView(new GanttView(tqparentWidget)),
m_embeddedContext(new Context()), m_embeddedContextInitialized(false),
m_context(0), m_xmlLoader()
{
@@ -67,13 +67,13 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
delete m_project;
m_project = new Project(); // after config is loaded
- connect(m_commandHistory, SIGNAL(commandExecuted()), SLOT(slotCommandExecuted()));
- connect(m_commandHistory, SIGNAL(documentRestored()), SLOT(slotDocumentRestored()));
+ connect(m_commandHistory, TQT_SIGNAL(commandExecuted()), TQT_SLOT(slotCommandExecuted()));
+ connect(m_commandHistory, TQT_SIGNAL(documentRestored()), TQT_SLOT(slotDocumentRestored()));
//FIXME the following is really dirty, we should make KPlato::Context a real class
// with getter and setter and signals when content changes, thus we can keep track
- QTimer* timer = new QTimer(this,"context update timer");
- connect(timer,SIGNAL(timeout()),this,SLOT(slotCopyContextFromView()));
+ TQTimer* timer = new TQTimer(this,"context update timer");
+ connect(timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotCopyContextFromView()));
timer->start(500);
}
@@ -90,7 +90,7 @@ Part::~Part() {
}
-bool Part::initDoc(InitDocFlags flags, QWidget* parentWidget) {
+bool Part::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) {
bool result = true;
if (flags==KoDocument::InitDocEmpty)
@@ -102,7 +102,7 @@ bool Part::initDoc(InitDocFlags flags, QWidget* parentWidget) {
return true;
}
- QString templateDoc;
+ TQString templateDoc;
KoTemplateChooseDia::ReturnType ret;
KoTemplateChooseDia::DialogType dlgtype;
if (flags != KoDocument::InitDocFileNew )
@@ -113,7 +113,7 @@ bool Part::initDoc(InitDocFlags flags, QWidget* parentWidget) {
ret = KoTemplateChooseDia::choose(Factory::global(), templateDoc,
dlgtype,
"kplato_template",
- parentWidget);
+ tqparentWidget);
if (ret == KoTemplateChooseDia::Template) {
resetURL();
result = loadNativeFormat(templateDoc);
@@ -141,12 +141,12 @@ bool Part::initDoc(InitDocFlags flags, QWidget* parentWidget) {
}
-KoView *Part::createViewInstance(QWidget *parent, const char *name) {
- m_view = new View(this, parent, name);
- connect(m_view,SIGNAL(destroyed()),this,SLOT(slotViewDestroyed()));
+KoView *Part::createViewInstance(TQWidget *tqparent, const char *name) {
+ m_view = new View(this, tqparent, name);
+ connect(m_view,TQT_SIGNAL(destroyed()),this,TQT_SLOT(slotViewDestroyed()));
// If there is a project dialog this should be deleted so it will
- // use the m_view as parent. If the dialog will be needed again,
+ // use the m_view as tqparent. If the dialog will be needed again,
// it will be made at that point
if (m_projectDialog != 0) {
kdDebug() << "Deleting m_projectDialog because of new ViewInstance\n";
@@ -169,28 +169,28 @@ KoView *Part::createViewInstance(QWidget *parent, const char *name) {
void Part::editProject() {
- QWidget* parent = m_parentWidget;
+ TQWidget* tqparent = m_parentWidget;
if (m_view)
- parent = m_view;
+ tqparent = m_view;
if (m_projectDialog == 0)
// Make the dialog
- m_projectDialog = new ProjectDialog(*m_project, parent);
+ m_projectDialog = new ProjectDialog(*m_project, tqparent);
m_projectDialog->exec();
}
-bool Part::loadXML(QIODevice *, const QDomDocument &document) {
- QTime dt;
+bool Part::loadXML(TQIODevice *, const TQDomDocument &document) {
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
- QString value;
- QDomElement plan = document.documentElement();
+ TQString value;
+ TQDomElement plan = document.documentElement();
// Check if this is the right app
- value = plan.attribute("mime", QString::null);
+ value = plan.attribute("mime", TQString());
if (value.isEmpty()) {
kdError() << "No mime type specified!" << endl;
setErrorMessage(i18n("Invalid document. No mimetype specified."));
@@ -198,14 +198,14 @@ bool Part::loadXML(QIODevice *, const QDomDocument &document) {
}
else if (value != "application/x-vnd.kde.kplato") {
kdError() << "Unknown mime type " << value << endl;
- setErrorMessage(i18n("Invalid document. Expected mimetype application/x-vnd.kde.kplato, got %1").arg(value));
+ setErrorMessage(i18n("Invalid document. Expected mimetype application/x-vnd.kde.kplato, got %1").tqarg(value));
return false;
}
- QString m_syntaxVersion = plan.attribute("version", CURRENT_SYNTAX_VERSION);
+ TQString m_syntaxVersion = plan.attribute("version", CURRENT_SYNTAX_VERSION);
if (m_syntaxVersion > CURRENT_SYNTAX_VERSION) {
int ret = KMessageBox::warningContinueCancel(
0, i18n("This document was created with a newer version of KPlato (syntax version: %1)\n"
- "Opening it in this version of KPlato will lose some information.").arg(m_syntaxVersion),
+ "Opening it in this version of KPlato will lose some information.").tqarg(m_syntaxVersion),
i18n("File-Format Mismatch"), i18n("Continue") );
if (ret == KMessageBox::Cancel)
{
@@ -215,7 +215,7 @@ bool Part::loadXML(QIODevice *, const QDomDocument &document) {
}
emit sigProgress(5);
- QDomNodeList list = plan.childNodes();
+ TQDomNodeList list = plan.childNodes();
if (list.count() > 2) {
// TODO: Make a proper bitching about this
kdDebug() << "*** Error ***\n";
@@ -226,7 +226,7 @@ bool Part::loadXML(QIODevice *, const QDomDocument &document) {
m_xmlLoader.startLoad();
for (unsigned int i = 0; i < list.count(); ++i) {
if (list.item(i).isElement()) {
- QDomElement e = list.item(i).toElement();
+ TQDomElement e = list.item(i).toElement();
if (e.tagName() == "context") {
delete m_context;
@@ -265,14 +265,14 @@ bool Part::loadXML(QIODevice *, const QDomDocument &document) {
return true;
}
-QDomDocument Part::saveXML() {
- QDomDocument document("kplato");
+TQDomDocument Part::saveXML() {
+ TQDomDocument document("kplato");
document.appendChild(document.createProcessingInstruction(
"xml",
"version=\"1.0\" encoding=\"UTF-8\""));
- QDomElement doc = document.createElement("kplato");
+ TQDomElement doc = document.createElement("kplato");
doc.setAttribute("editor", "KPlato");
doc.setAttribute("mime", "application/x-vnd.kde.kplato");
doc.setAttribute("version", CURRENT_SYNTAX_VERSION);
@@ -301,7 +301,7 @@ void Part::slotDocumentRestored() {
}
-void Part::paintContent(QPainter &painter, const QRect &rect,
+void Part::paintContent(TQPainter &painter, const TQRect &rect,
bool /*transparent*/,
double zoomX, double /*zoomY*/)
{
@@ -328,7 +328,7 @@ void Part::paintContent(QPainter &painter, const QRect &rect,
{
kdWarning() << "Don't have any context to set!" << endl;
}
- painter.setClipRect(rect, QPainter::CoordPainter);
+ painter.setClipRect(rect, TQPainter::CoordPainter);
// We don't support zoom yet, so use the painters scaling
double d_zoom = 1.0;
setZoomAndResolution(100, KoGlobal::dpiX(), KoGlobal::dpiY());