diff options
Diffstat (limited to 'kgantt')
-rw-r--r-- | kgantt/kgantt/KGantt.cpp | 36 | ||||
-rw-r--r-- | kgantt/kgantt/KGantt.h | 20 | ||||
-rw-r--r-- | kgantt/kgantt/KGanttBarConfig.cpp | 10 | ||||
-rw-r--r-- | kgantt/kgantt/KGanttBarConfig.h | 6 | ||||
-rw-r--r-- | kgantt/kgantt/KGanttItem.cpp | 56 | ||||
-rw-r--r-- | kgantt/kgantt/KGanttItem.h | 72 | ||||
-rw-r--r-- | kgantt/kgantt/KGanttRelation.cpp | 24 | ||||
-rw-r--r-- | kgantt/kgantt/KGanttRelation.h | 36 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttBarView.cpp | 60 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttBarView.h | 8 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttBarViewPort.cpp | 174 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttBarViewPort.h | 58 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttBarViewPort_Events.cpp | 60 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttListView.cpp | 18 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttListView.h | 8 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttListViewPort.cpp | 38 | ||||
-rw-r--r-- | kgantt/kgantt/xQGanttListViewPort.h | 16 |
17 files changed, 350 insertions, 350 deletions
diff --git a/kgantt/kgantt/KGantt.cpp b/kgantt/kgantt/KGantt.cpp index 6e2c01c0a..f16d47762 100644 --- a/kgantt/kgantt/KGantt.cpp +++ b/kgantt/kgantt/KGantt.cpp @@ -9,14 +9,14 @@ #include "KGantt.h" -#include <qcolor.h> -#include <qstylefactory.h> -#include <qscrollview.h> +#include <tqcolor.h> +#include <tqstylefactory.h> +#include <tqscrollview.h> KGantt::KGantt(KGanttItem* toplevelitem, - QWidget* parent, const char * name, WFlags f) - : QWidget(parent,name,f) + TQWidget* parent, const char * name, WFlags f) + : TQWidget(parent,name,f) { #ifdef _DEBUG_ printf("KGantt::KGantt()\n"); @@ -24,8 +24,8 @@ KGantt::KGantt(KGanttItem* toplevelitem, if(toplevelitem == 0) { _toplevelitem = new KGanttItem(0, "toplevelitem", - QDateTime::currentDateTime(), - QDateTime::currentDateTime() ); + TQDateTime::currentDateTime(), + TQDateTime::currentDateTime() ); _toplevelitem->setMode(KGanttItem::Rubberband); _deleteItem = true; } @@ -34,19 +34,19 @@ KGantt::KGantt(KGanttItem* toplevelitem, _deleteItem = false; } - setBackgroundColor(QColor(white)); + setBackgroundColor(TQColor(white)); - _splitter = new QSplitter(this); + _splitter = new TQSplitter(this); /* -// QStyle *cdestyle=QStyleFactory::create("CDE"); +// TQStyle *cdestyle=TQStyleFactory::create("CDE"); // if(cdestyle) // _splitter->setStyle(cdestyle); */ - QPalette pal1(_splitter->palette()); -/* QPalette pal(_splitter->palette()); - QColorGroup cg(pal.active()); - cg.setColor( QColorGroup::Foreground, blue ); - cg.setColor( QColorGroup::Background, white ); + TQPalette pal1(_splitter->palette()); +/* TQPalette pal(_splitter->palette()); + TQColorGroup cg(pal.active()); + cg.setColor( TQColorGroup::Foreground, blue ); + cg.setColor( TQColorGroup::Background, white ); pal.setActive( cg ); _splitter->setPalette(pal);*/ @@ -58,8 +58,8 @@ KGantt::KGantt(KGanttItem* toplevelitem, _ganttbar = new xQGanttBarView(_toplevelitem, _splitter); _ganttbar->setPalette(pal1); - connect(_ganttbar, SIGNAL(contentsMoving(int,int)), - _ganttlist, SLOT(contentsMoved(int,int))); + connect(_ganttbar, TQT_SIGNAL(contentsMoving(int,int)), + _ganttlist, TQT_SLOT(contentsMoved(int,int))); _ganttlist->setBarView(_ganttbar); @@ -81,7 +81,7 @@ void KGantt::dumpItems() ///////////////////////// { - QTextOStream cout(stdout); + TQTextOStream cout(stdout); cout << "\n<Gantt>\n"; cout << " start : " << _toplevelitem->getStart().toString() << endl; diff --git a/kgantt/kgantt/KGantt.h b/kgantt/kgantt/KGantt.h index 90c3b86f9..fbde52d73 100644 --- a/kgantt/kgantt/KGantt.h +++ b/kgantt/kgantt/KGantt.h @@ -34,8 +34,8 @@ */ -#include <qwidget.h> -#include <qsplitter.h> +#include <tqwidget.h> +#include <tqsplitter.h> #include <kpopupmenu.h> #include <kdepimmacros.h> @@ -66,8 +66,8 @@ KGanttItem* t1 = new KGanttItem(toplevel, "task 1, no subtasks", - QDateTime::currentDateTime().addDays(10), - QDateTime::currentDateTime().addDays(20) ); + TQDateTime::currentDateTime().addDays(10), + TQDateTime::currentDateTime().addDays(20) ); ... @@ -102,7 +102,7 @@ public: * */ KGantt(KGanttItem* toplevelitem = 0, - QWidget* parent = 0, const char * name=0, WFlags f=0 ); + TQWidget* parent = 0, const char * name=0, WFlags f=0 ); /// Destructor. @@ -158,7 +158,7 @@ public: - QSplitter* splitter() { + TQSplitter* splitter() { return _splitter; } @@ -194,7 +194,7 @@ public: * you want to access the pointer to a already created toolbar you * can invoke this method without any parameter. */ - KToolBar* toolbar(QMainWindow* mw = 0) { + KToolBar* toolbar(TQMainWindow* mw = 0) { return _ganttbar->viewport()->toolbar(mw); } @@ -212,7 +212,7 @@ public: /*! * All selected KGanttItems will be added to the passed list. */ - void getSelectedItems(QPtrList<KGanttItem>& list) { + void getSelectedItems(TQPtrList<KGanttItem>& list) { _ganttbar->viewport()->getSelectedItems(list); } @@ -296,7 +296,7 @@ public slots: protected: - void resizeEvent(QResizeEvent* /*e*/) { + void resizeEvent(TQResizeEvent* /*e*/) { _splitter->resize(width(),height()); }; @@ -305,7 +305,7 @@ private: KGanttItem* _toplevelitem; - QSplitter *_splitter; + TQSplitter *_splitter; xQGanttBarView* _ganttbar; xQGanttListView* _ganttlist; diff --git a/kgantt/kgantt/KGanttBarConfig.cpp b/kgantt/kgantt/KGanttBarConfig.cpp index d5faa208a..ff5f4ee8e 100644 --- a/kgantt/kgantt/KGanttBarConfig.cpp +++ b/kgantt/kgantt/KGanttBarConfig.cpp @@ -13,20 +13,20 @@ KGanttBarConfig::KGanttBarConfig(xQGanttBarView* barview, - QWidget* parent, + TQWidget* parent, const char * name, WFlags f) - : QWidget(parent,name,f) + : TQWidget(parent,name,f) { _barview = barview; KColorButton* b = new KColorButton(this); - connect(b, SIGNAL(changed(const QColor&)), - this, SLOT(changeBackground(const QColor&))); + connect(b, TQT_SIGNAL(changed(const TQColor&)), + this, TQT_SLOT(changeBackground(const TQColor&))); } -void KGanttBarConfig::changeBackground(const QColor& color) { +void KGanttBarConfig::changeBackground(const TQColor& color) { _barview->viewport()->setBackgroundColor(color); } #include "KGanttBarConfig.moc" diff --git a/kgantt/kgantt/KGanttBarConfig.h b/kgantt/kgantt/KGanttBarConfig.h index 5be04f72d..88049feae 100644 --- a/kgantt/kgantt/KGanttBarConfig.h +++ b/kgantt/kgantt/KGanttBarConfig.h @@ -29,7 +29,7 @@ */ -#include <qwidget.h> +#include <tqwidget.h> class xQGanttBarView; @@ -42,12 +42,12 @@ class KGanttBarConfig : public QWidget public: KGanttBarConfig(xQGanttBarView* barview, - QWidget* parent = 0, const char* name=0, WFlags f=0); + TQWidget* parent = 0, const char* name=0, WFlags f=0); protected slots: - void changeBackground(const QColor& color); + void changeBackground(const TQColor& color); protected: diff --git a/kgantt/kgantt/KGanttItem.cpp b/kgantt/kgantt/KGanttItem.cpp index 9b086ae58..4ddddf01a 100644 --- a/kgantt/kgantt/KGanttItem.cpp +++ b/kgantt/kgantt/KGanttItem.cpp @@ -9,12 +9,12 @@ #include "KGanttItem.h" -QBrush KGanttItem::_selectBrush(QColor(255,0,0)); +TQBrush KGanttItem::_selectBrush(TQColor(255,0,0)); -KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text, - const QDateTime& start, const QDateTime& end) - : QObject() +KGanttItem::KGanttItem(KGanttItem* parentItem, const TQString& text, + const TQDateTime& start, const TQDateTime& end) + : TQObject() //////////////////////////////////////////////////////// { init(parentItem,text, start,end); @@ -22,9 +22,9 @@ KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text, -KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text, - const QDateTime& start, long durationMin) - : QObject() +KGanttItem::KGanttItem(KGanttItem* parentItem, const TQString& text, + const TQDateTime& start, long durationMin) + : TQObject() //////////////////////////////////////////////////////// { init(parentItem, text, start, start.addSecs( durationMin * 60)); @@ -33,8 +33,8 @@ KGanttItem::KGanttItem(KGanttItem* parentItem, const QString& text, void -KGanttItem::init(KGanttItem* parentItem, const QString& text, - const QDateTime& start, const QDateTime& end) +KGanttItem::init(KGanttItem* parentItem, const TQString& text, + const TQDateTime& start, const TQDateTime& end) /////////////////////////////////////////////////////////////// { _style = DrawAll - DrawHandle; @@ -44,9 +44,9 @@ KGanttItem::init(KGanttItem* parentItem, const QString& text, _mode = Normal; - _brush = QBrush(QColor(140,140,255)); - _pen = QPen(QColor(100,100,100)); - _textPen = QPen(QColor(black)); + _brush = TQBrush(TQColor(140,140,255)); + _pen = TQPen(TQColor(100,100,100)); + _textPen = TQPen(TQColor(black)); _height = 24; @@ -88,14 +88,14 @@ KGanttItem::~KGanttItem() KGanttRelation* KGanttItem::addRelation(KGanttItem* from, KGanttItem* to, - const QString& text) + const TQString& text) { if(_subitems.containsRef(from) > 0 && _subitems.containsRef(to) >0) { KGanttRelation* rel = new KGanttRelation(from,to,text); _relations.append(rel); - connect(rel, SIGNAL(destroyed(KGanttRelation*)), - this, SLOT(removeRelation(KGanttRelation*))); + connect(rel, TQT_SIGNAL(destroyed(KGanttRelation*)), + this, TQT_SLOT(removeRelation(KGanttRelation*))); emit changed(this, RelationAdded); return rel; @@ -130,8 +130,8 @@ KGanttItem::registerItem(KGanttItem* item) { _subitems.append(item); - connect(item, SIGNAL(changed(KGanttItem*, KGanttItem::Change)), - this, SLOT(subItemChanged(KGanttItem*, KGanttItem::Change)) ); + connect(item, TQT_SIGNAL(changed(KGanttItem*, KGanttItem::Change)), + this, TQT_SLOT(subItemChanged(KGanttItem*, KGanttItem::Change)) ); bool minChanged = false; bool maxChanged = false; @@ -204,7 +204,7 @@ KGanttItem::unregisterItem(KGanttItem* item) -QDateTime +TQDateTime KGanttItem::getStart() { if(_mode == Rubberband && _subitems.count()>0) @@ -216,7 +216,7 @@ KGanttItem::getStart() -QDateTime +TQDateTime KGanttItem::getEnd() ///////////////// { @@ -229,7 +229,7 @@ KGanttItem::getEnd() void -KGanttItem::setStart(const QDateTime& start) +KGanttItem::setStart(const TQDateTime& start) { if(!_editable) return; @@ -266,7 +266,7 @@ KGanttItem::setStart(const QDateTime& start) void -KGanttItem::setEnd(const QDateTime& end) +KGanttItem::setEnd(const TQDateTime& end) { if(!_editable) return; @@ -339,8 +339,8 @@ KGanttItem::adjustMinMax() // _min = start and _max = end. // - QDateTime min = _minDateTime; - QDateTime max = _maxDateTime; + TQDateTime min = _minDateTime; + TQDateTime max = _maxDateTime; Change c = NoChange; if(_subitems.count()==0) { @@ -419,7 +419,7 @@ KGanttItem::subItemChanged(KGanttItem* /*item*/, Change change) void -KGanttItem::setText(const QString& text) +KGanttItem::setText(const TQString& text) /////////////////////////////////////// { if(!_editable) return; @@ -500,7 +500,7 @@ KGanttItem::setStyle(int flag, bool includeSubItems) void -KGanttItem::setBrush(const QBrush& brush) +KGanttItem::setBrush(const TQBrush& brush) /////////////////////////////////////// { _brush = brush; @@ -509,7 +509,7 @@ KGanttItem::setBrush(const QBrush& brush) void -KGanttItem::setPen(const QPen& pen) +KGanttItem::setPen(const TQPen& pen) /////////////////////////////// { _pen = pen; @@ -562,7 +562,7 @@ KGanttItem::getWidth() void -KGanttItem::dump(QTextOStream& cout, const QString& pre) +KGanttItem::dump(TQTextOStream& cout, const TQString& pre) //////////////////////////////////////////////////// { cout << pre << "<Item. text = [" << _text << "]>\n"; @@ -599,7 +599,7 @@ QString KGanttItem::ChangeAsString(Change c) ////////////////////////////////// { - QString ret; + TQString ret; if(c & StartChanged) ret += "StartChanged, "; if(c & EndChanged) ret += "EndChanged, "; diff --git a/kgantt/kgantt/KGanttItem.h b/kgantt/kgantt/KGanttItem.h index 0528e4782..9971508cc 100644 --- a/kgantt/kgantt/KGanttItem.h +++ b/kgantt/kgantt/KGanttItem.h @@ -32,11 +32,11 @@ */ -#include <qobject.h> -#include <qdatetime.h> -#include <qtextstream.h> -#include <qptrlist.h> -#include <qpainter.h> +#include <tqobject.h> +#include <tqdatetime.h> +#include <tqtextstream.h> +#include <tqptrlist.h> +#include <tqpainter.h> #include <kdepimmacros.h> @@ -138,8 +138,8 @@ public: /*! * */ - KGanttItem(KGanttItem* parentItem, const QString& text, - const QDateTime& start, const QDateTime& end); + KGanttItem(KGanttItem* parentItem, const TQString& text, + const TQDateTime& start, const TQDateTime& end); @@ -147,8 +147,8 @@ public: /*! * */ - KGanttItem(KGanttItem* parentItem, const QString& text, - const QDateTime& start, long durationMin); + KGanttItem(KGanttItem* parentItem, const TQString& text, + const TQDateTime& start, long durationMin); @@ -165,7 +165,7 @@ public: * */ KGanttRelation* addRelation(KGanttItem* from, KGanttItem* to, - const QString& text); + const TQString& text); @@ -262,7 +262,7 @@ public: /*! * */ - void setBrush(const QBrush& brush); + void setBrush(const TQBrush& brush); @@ -270,7 +270,7 @@ public: /*! * */ - QBrush& getBrush() { + TQBrush& getBrush() { return _brush; } @@ -280,7 +280,7 @@ public: /*! * */ - QBrush& getSelectBrush() { + TQBrush& getSelectBrush() { return _selectBrush; } @@ -290,7 +290,7 @@ public: /*! * */ - void setPen(const QPen& pen); + void setPen(const TQPen& pen); @@ -298,7 +298,7 @@ public: /*! * */ - QPen& getPen() { + TQPen& getPen() { return _pen; } @@ -308,7 +308,7 @@ public: /*! * */ - void setTextPen(const QPen& pen) { + void setTextPen(const TQPen& pen) { _textPen = pen; } @@ -318,7 +318,7 @@ public: /*! * */ - QPen& getTextPen() { + TQPen& getTextPen() { return _textPen; } @@ -328,7 +328,7 @@ public: /*! * */ - void setText(const QString& text); + void setText(const TQString& text); @@ -336,7 +336,7 @@ public: /*! * */ - QString getText() { return _text; } + TQString getText() { return _text; } @@ -346,7 +346,7 @@ public: * subitems, start of the item is determined by the start of the * earliest subitem. <br> */ - QDateTime getStart(); + TQDateTime getStart(); @@ -354,7 +354,7 @@ public: /*! * */ - QDateTime getEnd(); + TQDateTime getEnd(); @@ -362,7 +362,7 @@ public: /*! * */ - void setStart(const QDateTime& start); + void setStart(const TQDateTime& start); @@ -370,7 +370,7 @@ public: /*! * */ - void setEnd(const QDateTime& end); + void setEnd(const TQDateTime& end); @@ -417,7 +417,7 @@ public: /*! * */ - QPtrList<KGanttItem>& getSubItems() { + TQPtrList<KGanttItem>& getSubItems() { return _subitems; } @@ -427,7 +427,7 @@ public: /*! * */ - QPtrList<KGanttRelation>& getRelations() { + TQPtrList<KGanttRelation>& getRelations() { return _relations; } @@ -457,7 +457,7 @@ public: /*! * */ - static QString ChangeAsString(Change c); + static TQString ChangeAsString(Change c); @@ -466,7 +466,7 @@ public: /*! * */ - void dump(QTextOStream& cout, const QString& pre); + void dump(TQTextOStream& cout, const TQString& pre); signals: @@ -501,8 +501,8 @@ private: void registerItem(KGanttItem* item); void unregisterItem(KGanttItem* item); - void init(KGanttItem* parentItem, const QString& text, - const QDateTime& start, const QDateTime& end); + void init(KGanttItem* parentItem, const TQString& text, + const TQDateTime& start, const TQDateTime& end); // set min/max date and time according to subitems @@ -526,21 +526,21 @@ private: KGanttItem* _parentItem; - QPtrList<KGanttItem> _subitems; - QPtrList<KGanttRelation> _relations; + TQPtrList<KGanttItem> _subitems; + TQPtrList<KGanttRelation> _relations; // start/end date. // start must always be earlier then _minDateTime // end must always be later then _maxDateTime - QDateTime _start, _end, _minDateTime, _maxDateTime; + TQDateTime _start, _end, _minDateTime, _maxDateTime; - QString _text; + TQString _text; - QBrush _brush; - QPen _pen, _textPen; + TQBrush _brush; + TQPen _pen, _textPen; - static QBrush _selectBrush; + static TQBrush _selectBrush; }; diff --git a/kgantt/kgantt/KGanttRelation.cpp b/kgantt/kgantt/KGanttRelation.cpp index b9123acc2..f95deea10 100644 --- a/kgantt/kgantt/KGanttRelation.cpp +++ b/kgantt/kgantt/KGanttRelation.cpp @@ -10,24 +10,24 @@ #include "KGanttItem.h" -QPen KGanttRelation::_selectPen(QColor(255,0,0)); +TQPen KGanttRelation::_selectPen(TQColor(255,0,0)); KGanttRelation::KGanttRelation(KGanttItem* from, KGanttItem* to, - const QString& text ) - : QObject() + const TQString& text ) + : TQObject() //////////////////////////////////////////////////////// { _from = from; _to = to; _text = text; - _pen = QPen(QColor(20,20,20),1); + _pen = TQPen(TQColor(20,20,20),1); - connect(from, SIGNAL(destroyed(KGanttItem*)), - this, SLOT(itemDestroyed(KGanttItem*))); + connect(from, TQT_SIGNAL(destroyed(KGanttItem*)), + this, TQT_SLOT(itemDestroyed(KGanttItem*))); - connect(to, SIGNAL(destroyed(KGanttItem*)), - this, SLOT(itemDestroyed(KGanttItem*))); + connect(to, TQT_SIGNAL(destroyed(KGanttItem*)), + this, TQT_SLOT(itemDestroyed(KGanttItem*))); } @@ -77,7 +77,7 @@ KGanttRelation::itemDestroyed(KGanttItem* /*item*/) void -KGanttRelation::setText(const QString& text) +KGanttRelation::setText(const TQString& text) /////////////////////////////////////// { if(!_editable) return; @@ -107,7 +107,7 @@ KGanttRelation::select(bool f) void -KGanttRelation::setPen(const QPen& pen) +KGanttRelation::setPen(const TQPen& pen) { _pen = pen; } @@ -116,7 +116,7 @@ KGanttRelation::setPen(const QPen& pen) void -KGanttRelation::dump(QTextOStream& cout, const QString& pre) +KGanttRelation::dump(TQTextOStream& cout, const TQString& pre) { cout << pre << "<Relation. text = [" << _text << "]>\n"; @@ -142,7 +142,7 @@ QString KGanttRelation::ChangeAsString(Change c) ////////////////////////////////// { - QString ret; + TQString ret; /* if(c & StartChanged) ret += "StartChanged, "; diff --git a/kgantt/kgantt/KGanttRelation.h b/kgantt/kgantt/KGanttRelation.h index 26baf7c4b..548789500 100644 --- a/kgantt/kgantt/KGanttRelation.h +++ b/kgantt/kgantt/KGanttRelation.h @@ -28,11 +28,11 @@ */ -#include <qobject.h> -#include <qdatetime.h> -#include <qtextstream.h> -#include <qptrlist.h> -#include <qpainter.h> +#include <tqobject.h> +#include <tqdatetime.h> +#include <tqtextstream.h> +#include <tqptrlist.h> +#include <tqpainter.h> class KGanttItem; @@ -113,7 +113,7 @@ public: /*! * */ - QPen& getSelectPen() { + TQPen& getSelectPen() { return _selectPen; } @@ -123,7 +123,7 @@ public: /*! * */ - void setPen(const QPen& pen); + void setPen(const TQPen& pen); @@ -131,7 +131,7 @@ public: /*! * */ - QPen& getPen() { + TQPen& getPen() { return _pen; } @@ -141,7 +141,7 @@ public: /*! * */ - void setTextPen(const QPen& pen) { + void setTextPen(const TQPen& pen) { _textPen = pen; } @@ -151,7 +151,7 @@ public: /*! * */ - QPen& getTextPen() { + TQPen& getTextPen() { return _textPen; } @@ -161,7 +161,7 @@ public: /*! * */ - void setText(const QString& text); + void setText(const TQString& text); @@ -169,7 +169,7 @@ public: /*! * */ - QString getText() { return _text; } + TQString getText() { return _text; } @@ -195,10 +195,10 @@ public: /*! * */ - void dump(QTextOStream& cout, const QString& pre); + void dump(TQTextOStream& cout, const TQString& pre); - QString ChangeAsString(Change c); + TQString ChangeAsString(Change c); signals: @@ -232,7 +232,7 @@ protected: * */ KGanttRelation(KGanttItem* from, KGanttItem* to, - const QString& text ); + const TQString& text ); private: @@ -245,11 +245,11 @@ private: KGanttItem* _from; KGanttItem* _to; - QString _text; + TQString _text; - QPen _pen, _textPen; + TQPen _pen, _textPen; - static QPen _selectPen; + static TQPen _selectPen; }; diff --git a/kgantt/kgantt/xQGanttBarView.cpp b/kgantt/kgantt/xQGanttBarView.cpp index 4a79de600..7cc410d11 100644 --- a/kgantt/kgantt/xQGanttBarView.cpp +++ b/kgantt/kgantt/xQGanttBarView.cpp @@ -12,18 +12,18 @@ xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem, - QWidget* parent, + TQWidget* parent, const char * name, WFlags f) - : QScrollView(parent,name,f) + : TQScrollView(parent,name,f) { _config = NULL; _toplevelitem = toplevelitem; - setFrameStyle(QFrame::Sunken); + setFrameStyle(TQFrame::Sunken); setLineWidth(1); - _headerBackBrush = QBrush(QColor(250,250,250)); + _headerBackBrush = TQBrush(TQColor(250,250,250)); setMargins( 1, TOPMARGIN , 1, 1 ); @@ -33,14 +33,14 @@ xQGanttBarView::xQGanttBarView(KGanttItem* toplevelitem, _viewport->setMode(xQGanttBarViewPort::Select); - connect(_viewport, SIGNAL(scroll(int,int)), - this, SLOT(scrollBy(int,int)) ); + connect(_viewport, TQT_SIGNAL(scroll(int,int)), + this, TQT_SLOT(scrollBy(int,int)) ); - connect(_viewport, SIGNAL(recalculated()), - this, SLOT(drawHeader()) ); + connect(_viewport, TQT_SIGNAL(recalculated()), + this, TQT_SLOT(drawHeader()) ); - connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(horizontalScrollBarChanged(int)) ); + connect(horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(horizontalScrollBarChanged(int)) ); } @@ -67,12 +67,12 @@ void xQGanttBarView::drawHeader() //////////////////////////////// { - static QPen _dotPen( QColor(35,35,35), 0, DotLine); - static QPen _normalPen(QColor(0,0,0)); - static QPen _redPen(QColor(254,0,0)); - static QPen _greyPen(QColor(150,150,150)); + static TQPen _dotPen( TQColor(35,35,35), 0, DotLine); + static TQPen _normalPen(TQColor(0,0,0)); + static TQPen _redPen(TQColor(254,0,0)); + static TQPen _greyPen(TQColor(150,150,150)); - QPainter p(this); + TQPainter p(this); p.setPen( _normalPen ); p.fillRect(0,0,width(),TOPMARGIN, _headerBackBrush ); @@ -87,10 +87,10 @@ xQGanttBarView::drawHeader() int wx = _viewport->worldX(contentsX()); - QDate startDate = _toplevelitem->getStart().addSecs( wx * 60 ).date(); + TQDate startDate = _toplevelitem->getStart().addSecs( wx * 60 ).date(); wx = _viewport->worldX(contentsX()+width()); - QDate endDate = _toplevelitem->getStart().addSecs( wx * 60 ).date(); + TQDate endDate = _toplevelitem->getStart().addSecs( wx * 60 ).date(); endDate = endDate.addDays(1); int end = (int) startDate.daysTo(endDate); @@ -98,12 +98,12 @@ xQGanttBarView::drawHeader() // draw week, which first day is not visible - QDate t = startDate.addDays(-startDate.dayOfWeek()+1); + TQDate t = startDate.addDays(-startDate.dayOfWeek()+1); tmp = _toplevelitem->getStart().secsTo(t)/60; a = _viewport->screenX(tmp) - contentsX(); - p.fillRect(a, top, (int) (5. * dayWidth), height, QBrush(QColor(240,240,240))); + p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240))); p.drawRect(a, top, (int) (5. * dayWidth), height ); // draw month, which first day is not visible @@ -114,12 +114,12 @@ xQGanttBarView::drawHeader() a = _viewport->screenX(tmp) - contentsX(); e = t.daysInMonth(); - p.fillRect(a, top + height + skip, (int) (e*dayWidth), height, QBrush(QColor(240,240,240))); + p.fillRect(a, top + height + skip, (int) (e*dayWidth), height, TQBrush(TQColor(240,240,240))); p.drawRect(a, top + height + skip, (int) (e*dayWidth), height ); if(a<0) a = 0; p.drawText(a+5, int( top + height + skip + (0.8*height) ), - t.shortMonthName(t.month()) + " " + QString::number(t.year()) ); + t.shortMonthName(t.month()) + " " + TQString::number(t.year()) ); // draw snapgrid for first month @@ -146,15 +146,15 @@ xQGanttBarView::drawHeader() tmp = _toplevelitem->getStart().secsTo(t)/60; a = _viewport->screenX(tmp) - contentsX(); - p.setPen( QPen(QColor(black)) ); + p.setPen( TQPen(TQColor(black)) ); if(t.dayOfWeek() == 1) { - p.fillRect(a, top, (int) (5. * dayWidth), height, QBrush(QColor(240,240,240))); + p.fillRect(a, top, (int) (5. * dayWidth), height, TQBrush(TQColor(240,240,240))); p.drawRect(a, top, (int) (5. * dayWidth), height ); if(!drawDays) - p.drawText(a+5, (int) (top + (0.8*height)), QString::number(t.day()) ); + p.drawText(a+5, (int) (top + (0.8*height)), TQString::number(t.day()) ); } @@ -162,15 +162,15 @@ xQGanttBarView::drawHeader() if(a<0) a = 0; - QString str = t.shortDayName(t.dayOfWeek()) + " " + QString::number(t.day()); - QRect rect = p.boundingRect(a+5, (int)(0.8 * height), + TQString str = t.shortDayName(t.dayOfWeek()) + " " + TQString::number(t.day()); + TQRect rect = p.boundingRect(a+5, (int)(0.8 * height), (int) dayWidth, height, AlignLeft, str ); if(t.dayOfWeek() > 5) p.fillRect(rect.x(), rect.y(), rect.width(), -rect.height(), _headerBackBrush ); else p.fillRect(rect.x(), rect.y(), - rect.width(), -rect.height(), QBrush(QColor(240,240,240))); + rect.width(), -rect.height(), TQBrush(TQColor(240,240,240))); p.drawText(a+5, (int)(0.8 * height), str ); @@ -188,12 +188,12 @@ xQGanttBarView::drawHeader() p.setPen(_normalPen); p.fillRect(a, top + height + skip, - (int) (e * dayWidth), height, QBrush(QColor(240,240,240))); + (int) (e * dayWidth), height, TQBrush(TQColor(240,240,240))); p.drawRect(a, top + height + skip, (int) (e * dayWidth), height ); p.drawText(a+5, top + (int)(1.8 * height) + skip, - t.shortMonthName(t.month()) + " " + QString::number(t.year()) ); + t.shortMonthName(t.month()) + " " + TQString::number(t.year()) ); // draw snapgrid @@ -214,7 +214,7 @@ xQGanttBarView::drawHeader() void -xQGanttBarView::paintEvent(QPaintEvent * /*e*/) +xQGanttBarView::paintEvent(TQPaintEvent * /*e*/) { drawHeader(); } diff --git a/kgantt/kgantt/xQGanttBarView.h b/kgantt/kgantt/xQGanttBarView.h index 4bb3446fa..08105727c 100644 --- a/kgantt/kgantt/xQGanttBarView.h +++ b/kgantt/kgantt/xQGanttBarView.h @@ -33,7 +33,7 @@ #define TOPMARGIN 45 -#include <qscrollview.h> +#include <tqscrollview.h> #include "xQGanttBarViewPort.h" @@ -61,7 +61,7 @@ public: /*! * */ - xQGanttBarView(KGanttItem* toplevelitem, QWidget* parent = 0, + xQGanttBarView(KGanttItem* toplevelitem, TQWidget* parent = 0, const char * name=0, WFlags f=0 ); @@ -107,9 +107,9 @@ protected: xQGanttBarViewPort* _viewport; - QBrush _headerBackBrush; + TQBrush _headerBackBrush; - void paintEvent(QPaintEvent * e); + void paintEvent(TQPaintEvent * e); KGanttItem* _toplevelitem; KGanttBarConfig* _config; diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp index feabc07e0..b0985dd7f 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort.cpp @@ -8,8 +8,8 @@ #include "xQGanttBarViewPort.h" #include "xQGanttBarView.h" -#include <qcolor.h> -#include <qtoolbutton.h> +#include <tqcolor.h> +#include <tqtoolbutton.h> #include "lupe.xpm" #include "open.xpm" @@ -24,44 +24,44 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem, xQGanttBarView* parent, const char * name, WFlags f) - : QFrame(parent,name,f) + : TQFrame(parent,name,f) ///////////////////////////////////////////////////////////////////////////// { _parent = parent; - closedIcon = QPixmap(open_xpm); - openedIcon = QPixmap(close_xpm); + closedIcon = TQPixmap(open_xpm); + openedIcon = TQPixmap(close_xpm); _observedList = NULL; _toolbar = NULL; - _gItemList = QPtrDict<xQTaskPosition>(449); + _gItemList = TQPtrDict<xQTaskPosition>(449); _gItemList.setAutoDelete(true); _toplevelitem = toplevelitem; - _itemInfo = new QLabel(this); - _itemInfo->setBackgroundColor(QColor(235,235,255)); + _itemInfo = new TQLabel(this); + _itemInfo->setBackgroundColor(TQColor(235,235,255)); _itemInfo->setFrameStyle( Panel | Sunken ); _itemInfo->setMargin( 5 ); _itemInfo->setLineWidth(1); _itemInfo->hide(); - _itemTextEdit = new QLineEdit(this); + _itemTextEdit = new TQLineEdit(this); _itemTextEdit->hide(); _itemTextEdit->setFrame(false); - connect(_itemTextEdit, SIGNAL(returnPressed ()), - this, SLOT(textEdited())); + connect(_itemTextEdit, TQT_SIGNAL(returnPressed ()), + this, TQT_SLOT(textEdited())); _iconloader = new KIconLoader(); initMenu(); - setBackgroundColor(QColor(white)); + setBackgroundColor(TQColor(white)); /* - QPixmap back("background.png"); + TQPixmap back("background.png"); setBackgroundPixmap ( back ); */ @@ -79,16 +79,16 @@ xQGanttBarViewPort::xQGanttBarViewPort(KGanttItem* toplevelitem, _margin = 4; // margin item in pixel - _startPoint = new QPoint(); _endPoint = new QPoint(); + _startPoint = new TQPoint(); _endPoint = new TQPoint(); - _cursor_lupe = new QCursor( QPixmap(lupe) ); + _cursor_lupe = new TQCursor( TQPixmap(lupe) ); - connect(_toplevelitem, SIGNAL(changed(KGanttItem*, KGanttItem::Change)), - this, SLOT(toplevelitemChanged(KGanttItem*, KGanttItem::Change)) ); + connect(_toplevelitem, TQT_SIGNAL(changed(KGanttItem*, KGanttItem::Change)), + this, TQT_SLOT(toplevelitemChanged(KGanttItem*, KGanttItem::Change)) ); recalc(); adjustSize(); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); _mode = Init; } @@ -103,11 +103,11 @@ xQGanttBarViewPort::~xQGanttBarViewPort() KToolBar* -xQGanttBarViewPort::toolbar(QMainWindow* mw) +xQGanttBarViewPort::toolbar(TQMainWindow* mw) { if(_toolbar || mw == 0) return _toolbar; - _toolbar = new KToolBar(mw,QMainWindow::DockTop); + _toolbar = new KToolBar(mw,TQMainWindow::DockTop); mw->addToolBar(_toolbar); @@ -116,8 +116,8 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw) _toolbar->insertButton("ganttSelect.png", 0, - SIGNAL(clicked()), - this, SLOT(setSelect()), + TQT_SIGNAL(clicked()), + this, TQT_SLOT(setSelect()), true, i18n("Select") ); KPopupMenu *selectMenu = new KPopupMenu(_toolbar); @@ -126,9 +126,9 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw) /* select all items */ - QPixmap pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 ); + TQPixmap pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttSelecttask.png not found !\n"); - selectMenu->insertItem(pix, i18n("Select All"), this, SLOT(selectAll()) ); + selectMenu->insertItem(pix, i18n("Select All"), this, TQT_SLOT(selectAll()) ); /* @@ -136,7 +136,7 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw) */ pix = _iconloader->loadIcon("ganttUnselecttask", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttUnselecttask.png not found !\n"); - selectMenu->insertItem(pix, i18n("Unselect All"), this, SLOT(unselectAll()) ); + selectMenu->insertItem(pix, i18n("Unselect All"), this, TQT_SLOT(unselectAll()) ); KToolBarButton* b = _toolbar->getButton(0); @@ -144,31 +144,31 @@ xQGanttBarViewPort::toolbar(QMainWindow* mw) _toolbar->insertButton("viewmag.png", 1, - SIGNAL(clicked()), - this, SLOT(setZoom()), + TQT_SIGNAL(clicked()), + this, TQT_SLOT(setZoom()), true, i18n("Zoom") ); KPopupMenu* zoomMenu = new KPopupMenu(_toolbar); pix = _iconloader->loadIcon("viewmag.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag.png not found !\n"); - zoomMenu->insertItem(pix, i18n("Zoom All"), this, SLOT(zoomAll()) ); + zoomMenu->insertItem(pix, i18n("Zoom All"), this, TQT_SLOT(zoomAll()) ); zoomMenu->insertSeparator(); pix = _iconloader->loadIcon("viewmag+.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag+.png not found !\n"); - zoomMenu->insertItem(pix, i18n("Zoom In +"), this, SLOT(zoomIn()) ); + zoomMenu->insertItem(pix, i18n("Zoom In +"), this, TQT_SLOT(zoomIn()) ); pix = _iconloader->loadIcon("viewmag-.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag-.png not found !\n"); - zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, SLOT(zoomOut()) ); + zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, TQT_SLOT(zoomOut()) ); b = _toolbar->getButton(1); b->setDelayedPopup(zoomMenu); _toolbar->insertButton("move.png", 2, - SIGNAL(clicked()), - this, SLOT(setMove()), + TQT_SIGNAL(clicked()), + this, TQT_SLOT(setMove()), true, i18n("Move") ); return _toolbar; @@ -189,19 +189,19 @@ xQGanttBarViewPort::initMenu() _selectMenu = new KPopupMenu(_menu); - QPixmap pix = _iconloader->loadIcon("ganttSelect.png", KIcon::Toolbar , 16 ); + TQPixmap pix = _iconloader->loadIcon("ganttSelect.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttSelect.png not found !\n"); - _selectMenu->insertItem(pix, i18n("Select Mode"), this, SLOT(setSelect())); + _selectMenu->insertItem(pix, i18n("Select Mode"), this, TQT_SLOT(setSelect())); _selectMenu->insertSeparator(); pix = _iconloader->loadIcon("ganttSelecttask.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttSelecttask.png not found !\n"); - _selectMenu->insertItem(pix, i18n("Select All"), this, SLOT(selectAll()) ); + _selectMenu->insertItem(pix, i18n("Select All"), this, TQT_SLOT(selectAll()) ); pix = _iconloader->loadIcon("ganttUnselecttask", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("ganttUnselecttask.png not found !\n"); - _selectMenu->insertItem(pix, i18n("Unselect All"), this, SLOT(unselectAll()) ); + _selectMenu->insertItem(pix, i18n("Unselect All"), this, TQT_SLOT(unselectAll()) ); _menu->insertItem( i18n("Select"), _selectMenu); @@ -214,32 +214,32 @@ xQGanttBarViewPort::initMenu() pix = _iconloader->loadIcon("viewmag.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag.png not found !\n"); - _zoomMenu->insertItem(i18n("Zoom Mode"), this, SLOT(setZoom()) ); + _zoomMenu->insertItem(i18n("Zoom Mode"), this, TQT_SLOT(setZoom()) ); _zoomMenu->insertSeparator(); - _zoomMenu->insertItem(pix, i18n("Zoom All"), this, SLOT(zoomAll()) ); + _zoomMenu->insertItem(pix, i18n("Zoom All"), this, TQT_SLOT(zoomAll()) ); _zoomMenu->insertSeparator(); pix = _iconloader->loadIcon("viewmag+.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag+.png not found !\n"); - _zoomMenu->insertItem(pix, i18n("Zoom In +"), this, SLOT(zoomIn()) ); + _zoomMenu->insertItem(pix, i18n("Zoom In +"), this, TQT_SLOT(zoomIn()) ); pix = _iconloader->loadIcon("viewmag-.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("viewmag-.png not found !\n"); - _zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, SLOT(zoomOut()) ); + _zoomMenu->insertItem(pix, i18n("Zoom Out -"), this, TQT_SLOT(zoomOut()) ); _menu->insertItem( "Zoom", _zoomMenu); pix = _iconloader->loadIcon("move.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("move.png not found !\n"); - _menu->insertItem(pix, i18n("Move Mode"), this, SLOT(setMove()) ); + _menu->insertItem(pix, i18n("Move Mode"), this, TQT_SLOT(setMove()) ); _menu->insertSeparator(); pix = _iconloader->loadIcon("configure.png", KIcon::Toolbar , 16 ); if(pix.isNull()) printf("configure.png not found !\n"); - _menu->insertItem(pix, i18n("Configure Gantt..."), _parent, SLOT(showConfig())); + _menu->insertItem(pix, i18n("Configure Gantt..."), _parent, TQT_SLOT(showConfig())); } @@ -286,26 +286,26 @@ void xQGanttBarViewPort::update(int x1, int y1, int x2, int y2) ////////////////////////////////////////////////////////// { - QPainter p(this); + TQPainter p(this); - // QTime time1 = QTime::currentTime(); + // TQTime time1 = TQTime::currentTime(); if(_drawGrid) drawGrid(&p, x1, y1, x2, y2); - // QTime time2 = QTime::currentTime(); + // TQTime time2 = TQTime::currentTime(); // printf("%d msec for drawing grid.\n", time1.msecsTo( time2 ) ); // drawContents(&p, x1, y1, x2, y2); - drawItem(_toplevelitem, &p, QRect(x1, y1, x2-x1, y2-y1) ); + drawItem(_toplevelitem, &p, TQRect(x1, y1, x2-x1, y2-y1) ); - // time1 = QTime::currentTime(); + // time1 = TQTime::currentTime(); // printf("%d msec for drawing contents.\n", time2.msecsTo( time1 ) ); if(_drawHeader) drawHeader(&p, x1, y1, x2, y2); - // time2 = QTime::currentTime();< + // time2 = TQTime::currentTime();< // printf("%d msec for drawing header.\n", time1.msecsTo( time2 ) ); } @@ -313,28 +313,28 @@ xQGanttBarViewPort::update(int x1, int y1, int x2, int y2) void -xQGanttBarViewPort::drawGrid(QPainter* p, int x1, int y1, int x2, int y2) +xQGanttBarViewPort::drawGrid(TQPainter* p, int x1, int y1, int x2, int y2) //////////////////////////////////////////////////////////////// { y2 += 5; // avoid white lines at bottom of redrawn region static int a, w, end, tmp; - static QBrush _sat( QColor(200,200,200)); - static QBrush _sun( QColor(255,110,110)); - static QBrush _hol( QColor(200,200,250)); - static QPen penDay( QColor(235,235,235), 0, DotLine); - static QPen penMonth( QColor(0,150,0), 3, DashDotLine); - static QPen penHour( QColor(0,0,150), 0, DashDotLine); + static TQBrush _sat( TQColor(200,200,200)); + static TQBrush _sun( TQColor(255,110,110)); + static TQBrush _hol( TQColor(200,200,250)); + static TQPen penDay( TQColor(235,235,235), 0, DotLine); + static TQPen penMonth( TQColor(0,150,0), 3, DashDotLine); + static TQPen penHour( TQColor(0,0,150), 0, DashDotLine); - QDate start( _toplevelitem->getStart().addSecs(worldX(x1)*60).date() ); + TQDate start( _toplevelitem->getStart().addSecs(worldX(x1)*60).date() ); end = (int) ((x2-x1)/(1440.*_scaleX))+1; w = (int) (1440. * _scaleX + 0.5); // draw holydays - QDate* ptrDate; - QDate cmp(start.addDays(-1)); + TQDate* ptrDate; + TQDate cmp(start.addDays(-1)); for(ptrDate = _holidays.first(); ptrDate != 0; ptrDate = _holidays.next() ) { if(*ptrDate > cmp) { @@ -456,8 +456,8 @@ xQGanttBarViewPort::recalc(KGanttItem* item, int xPos, int yPos, void -xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p, - const QRect& rect ) +xQGanttBarViewPort::drawItem(KGanttItem* item, TQPainter* p, + const TQRect& rect ) { xQTaskPosition* tpos = _gItemList[item]; @@ -478,7 +478,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p, p->drawLine(tpos->_screenX, tpos->_screenY, tpos->_screenX, tpos->_screenY + tpos->_screenH ); - QPointArray a(4); + TQPointArray a(4); a.setPoint(0, tpos->_screenX, tpos->_screenY + _margin ); a.setPoint(1, tpos->_screenX - tpos->_screenH / 2 + _margin, tpos->_screenY + tpos->_screenH / 2 ); @@ -534,7 +534,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p, ((style & KGanttItem::DrawHandleWSubitems) && item->getSubItems().count()>0) ) { /* - p->setBrush(QColor("steelblue")); + p->setBrush(TQColor("steelblue")); p->drawRect(tpos->_screenHandleX, tpos->_screenHandleY, tpos->_screenHandleW, tpos->_screenHandleH); */ @@ -553,7 +553,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p, if(item->isSelected()) { - p->setPen( QPen(QColor(red),1)); + p->setPen( TQPen(TQColor(red),1)); p->setBrush(NoBrush); p->drawRect(tpos->_screenX - 2, tpos->_screenY, @@ -580,7 +580,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, QPainter* p, void -xQGanttBarViewPort::drawRelation(QPainter* p, +xQGanttBarViewPort::drawRelation(TQPainter* p, KGanttRelation* rel) { static int hw = 20; @@ -594,7 +594,7 @@ xQGanttBarViewPort::drawRelation(QPainter* p, p->setPen(rel->getPen()); - QPointArray a(6); + TQPointArray a(6); int x,y; int i=0; @@ -638,7 +638,7 @@ xQGanttBarViewPort::drawRelation(QPainter* p, p->drawChord( a.point(0).x()-3, a.point(0).y()-3, 6, 6, 0, 5760 ); - QPointArray b(3); + TQPointArray b(3); b.setPoint(0, x,y); b.setPoint(1, x -5, y - 5); @@ -651,18 +651,18 @@ xQGanttBarViewPort::drawRelation(QPainter* p, void -xQGanttBarViewPort::drawHeader(QPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/) +xQGanttBarViewPort::drawHeader(TQPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/) ////////////////////////////////////////////////////////////////////////// { bool drawDays = false; int a,e,tmp; - QDate start( _toplevelitem->getStart().addSecs(-_marginX * 60 ).date() ); + TQDate start( _toplevelitem->getStart().addSecs(-_marginX * 60 ).date() ); // subtract 1 month to draw first month - QDate t(start.year(), start.month()-1, start.day() ); + TQDate t(start.year(), start.month()-1, start.day() ); - QDateTime itemstart = _toplevelitem->getStart(); + TQDateTime itemstart = _toplevelitem->getStart(); int end = (int) (width()/(1440*_scaleX)); @@ -670,7 +670,7 @@ xQGanttBarViewPort::drawHeader(QPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, end += 30; // add 30 days to draw last month - p->setPen( QPen(QColor(black)) ); + p->setPen( TQPen(TQColor(black)) ); for(int i=0; i<=end; i++, t = t.addDays(1) ) { @@ -679,22 +679,22 @@ xQGanttBarViewPort::drawHeader(QPainter* p, int /*x1*/, int /*y1*/, int /*x2*/, if(t.dayOfWeek() == 1) { - p->fillRect(a, 0, (int)( 1440*5*_scaleX ), 20, QBrush(QColor(240,240,240))); + p->fillRect(a, 0, (int)( 1440*5*_scaleX ), 20, TQBrush(TQColor(240,240,240))); p->drawRect(a, 0, (int)( 1440*5*_scaleX ), 20 ); if(!drawDays) - p->drawText(a+5, 15, QString::number(t.day()) ); + p->drawText(a+5, 15, TQString::number(t.day()) ); } if(drawDays) { - p->drawText(a+5, 15, t.shortDayName(t.dayOfWeek()) + " " + QString::number(t.day()) ); + p->drawText(a+5, 15, t.shortDayName(t.dayOfWeek()) + " " + TQString::number(t.day()) ); } if(t.day()==1) { e = t.daysInMonth(); - p->fillRect(a, 21, (int)( 1440*e*_scaleX ), 20, QBrush(QColor(240,240,240))); + p->fillRect(a, 21, (int)( 1440*e*_scaleX ), 20, TQBrush(TQColor(240,240,240))); p->drawRect(a, 21, (int)( 1440*e*_scaleX ), 20 ); if(a<0) a = 0; @@ -841,7 +841,7 @@ xQGanttBarViewPort::zoom(double sfactor, int sx, int sy) _parent->center(screenX(wx), screenY(wy) ); - QWidget::update(); + TQWidget::update(); printf("zoom ok.\n"); @@ -885,9 +885,9 @@ xQGanttBarViewPort::zoomAll() void xQGanttBarViewPort::addHoliday(int y, int m, int d) { - QDate* date = new QDate(y,m,d); + TQDate* date = new TQDate(y,m,d); - QDate* ptrDate; + TQDate* ptrDate; int i=0; for(ptrDate = _holidays.first(); @@ -910,7 +910,7 @@ xQGanttBarViewPort::addHoliday(int y, int m, int d) xQGanttBarViewPort::Position xQGanttBarViewPort::check(KGanttItem** founditem, int x, int y) { - QPtrDictIterator<xQTaskPosition> it(_gItemList); + TQPtrDictIterator<xQTaskPosition> it(_gItemList); static int ty, ty2, tx, tx2, hx, hx2, hy, hy2; bool increased; @@ -970,7 +970,7 @@ void xQGanttBarViewPort::unselectAll() { selectItem(_toplevelitem, false); - QWidget::update(); + TQWidget::update(); } @@ -979,7 +979,7 @@ void xQGanttBarViewPort::selectAll() { selectItem(_toplevelitem, true); - QWidget::update(); + TQWidget::update(); } @@ -1006,7 +1006,7 @@ xQGanttBarViewPort::deleteSelectedItems() printf("-> xQGanttBarViewPort::deleteSelectedItems()\n"); #endif - QPtrList<KGanttItem> list; + TQPtrList<KGanttItem> list; observeList(&list); getSelectedItems(_toplevelitem,list); @@ -1017,8 +1017,8 @@ xQGanttBarViewPort::deleteSelectedItems() #ifdef _DEBUG_ printf(" : %s \n", subitem->getText().latin1() ); #endif - connect(subitem, SIGNAL(destroyed(KGanttItem*)), - this, SLOT(itemDestroyed(KGanttItem*))); + connect(subitem, TQT_SIGNAL(destroyed(KGanttItem*)), + this, TQT_SLOT(itemDestroyed(KGanttItem*))); } list.remove(_toplevelitem); @@ -1036,7 +1036,7 @@ xQGanttBarViewPort::deleteSelectedItems() void -xQGanttBarViewPort::observeList(QPtrList<KGanttItem> *list) +xQGanttBarViewPort::observeList(TQPtrList<KGanttItem> *list) { _observedList = list; } @@ -1053,7 +1053,7 @@ xQGanttBarViewPort::itemDestroyed(KGanttItem* item) void xQGanttBarViewPort::getSelectedItems (KGanttItem* item, - QPtrList<KGanttItem>& list) + TQPtrList<KGanttItem>& list) { if(item->isSelected()) list.append(item); @@ -1071,7 +1071,7 @@ xQGanttBarViewPort::getSelectedItems (KGanttItem* item, void xQGanttBarViewPort::insertIntoSelectedItem() { - QPtrList<KGanttItem> list; + TQPtrList<KGanttItem> list; getSelectedItems(_toplevelitem,list); diff --git a/kgantt/kgantt/xQGanttBarViewPort.h b/kgantt/kgantt/xQGanttBarViewPort.h index 7f30ad297..1b3de985f 100644 --- a/kgantt/kgantt/xQGanttBarViewPort.h +++ b/kgantt/kgantt/xQGanttBarViewPort.h @@ -32,16 +32,16 @@ #include "KGanttItem.h" -#include <qcursor.h> -#include <qtimer.h> -#include <qlabel.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqlabel.h> #include <kpopupmenu.h> #include <ktoolbar.h> -#include <qptrdict.h> -#include <qaction.h> -#include <qlineedit.h> +#include <tqptrdict.h> +#include <tqaction.h> +#include <tqlineedit.h> class xQGanttBarView; @@ -123,7 +123,7 @@ public: - QPtrDict<xQTaskPosition> _gItemList; + TQPtrDict<xQTaskPosition> _gItemList; /// Add holiday. @@ -154,7 +154,7 @@ public: /*! * */ - KToolBar* toolbar(QMainWindow* mw = 0); + KToolBar* toolbar(TQMainWindow* mw = 0); // zoom by factor sfactor and move wx,wy to the center @@ -164,7 +164,7 @@ public: void zoom(double sfactor); - void getSelectedItems(QPtrList<KGanttItem>& list) { + void getSelectedItems(TQPtrList<KGanttItem>& list) { getSelectedItems(_toplevelitem, list); } @@ -175,7 +175,7 @@ signals: void scroll(int x, int y); void resized(); void recalculated(); - void message(const QString& msg); + void message(const TQString& msg); protected slots: @@ -257,10 +257,10 @@ private: int _margin; - QCursor* _cursor_lupe; + TQCursor* _cursor_lupe; - QLabel* _itemInfo; - QLineEdit* _itemTextEdit; + TQLabel* _itemInfo; + TQLineEdit* _itemTextEdit; // all item are stored here @@ -275,49 +275,49 @@ private: KToolBar* _toolbar; - QPoint* _startPoint, *_endPoint; + TQPoint* _startPoint, *_endPoint; - QPtrList<QDate> _holidays; + TQPtrList<TQDate> _holidays; - QPtrList<KGanttItem> *_observedList; + TQPtrList<KGanttItem> *_observedList; /// void initMenu(); - void drawGrid(QPainter*, int x1, int y1, int x2, int y2); - void drawHeader(QPainter*, int x1, int y1, int x2, int y2); - void drawItem(KGanttItem* item, QPainter* p, const QRect& rect ); + void drawGrid(TQPainter*, int x1, int y1, int x2, int y2); + void drawHeader(TQPainter*, int x1, int y1, int x2, int y2); + void drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect ); - void drawRelation(QPainter*, KGanttRelation*); + void drawRelation(TQPainter*, KGanttRelation*); void recalc(KGanttItem* item, int xPos, int yPos, int depth, int nr ); void recalc(); void selectItem(KGanttItem*,bool); - void getSelectedItems(KGanttItem*, QPtrList<KGanttItem>&); + void getSelectedItems(KGanttItem*, TQPtrList<KGanttItem>&); void adjustSize(); - void observeList(QPtrList<KGanttItem>*); + void observeList(TQPtrList<KGanttItem>*); Position check(KGanttItem** founditem, int x, int y); - void mousePressEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent*); + void mousePressEvent(TQMouseEvent*); + void mouseReleaseEvent(TQMouseEvent*); - void wheelEvent ( QWheelEvent * /*e*/) { + void wheelEvent ( TQWheelEvent * /*e*/) { printf("wheelEvent\n"); } - void mouseMoveEvent(QMouseEvent*); - void keyPressEvent(QKeyEvent* e); - void paintEvent(QPaintEvent * e); + void mouseMoveEvent(TQMouseEvent*); + void keyPressEvent(TQKeyEvent* e); + void paintEvent(TQPaintEvent * e); - QPixmap closedIcon, openedIcon; + TQPixmap closedIcon, openedIcon; }; diff --git a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp index 8609962b7..1791689e3 100644 --- a/kgantt/kgantt/xQGanttBarViewPort_Events.cpp +++ b/kgantt/kgantt/xQGanttBarViewPort_Events.cpp @@ -23,11 +23,11 @@ static int _timediff; static bool _changeEnd, _changeStart; static int oldw = -1, oldx = -1; -QDateTime _tmpStartDateTime, _tmpEndDateTime; +TQDateTime _tmpStartDateTime, _tmpEndDateTime; void -xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) +xQGanttBarViewPort::mousePressEvent(TQMouseEvent* e) { // set _currentItem to pushed mousebutton _currentMButton = e->button(); @@ -67,9 +67,9 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) if(e->button() == MidButton && _mode == Select) { xQTaskPosition* tp = _gItemList.find(_currentItem); - QPainter p(this); + TQPainter p(this); - QRect rect = p.boundingRect(tp->_textPosX, + TQRect rect = p.boundingRect(tp->_textPosX, tp->_textPosY, 200, tp->_screenH, AlignLeft, _currentItem->getText() ); @@ -109,7 +109,7 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) if(e->state() == ShiftButton) { - QString tmp; tmp.sprintf("%s\n", _currentItem->getText().latin1() ); + TQString tmp; tmp.sprintf("%s\n", _currentItem->getText().latin1() ); tmp += _currentItem->getStart().toString(); tmp += " - "; @@ -154,7 +154,7 @@ xQGanttBarViewPort::mousePressEvent(QMouseEvent* e) void -xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) +xQGanttBarViewPort::mouseReleaseEvent(TQMouseEvent* e) { switch(_mode) { @@ -176,7 +176,7 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) oldx = -1; oldw = -1; recalc(); - QWidget::update(); + TQWidget::update(); } } @@ -193,7 +193,7 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) _currentItem->select( !state ); } - QWidget::update(); + TQWidget::update(); _selectItem = false; } @@ -226,8 +226,8 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) if(_currentMButton == LeftButton) { - QPainter p(this); - QPen pen(DashLine); + TQPainter p(this); + TQPen pen(DashLine); pen.setColor(red); p.setRasterOp(XorROP); p.setPen( pen ); @@ -269,14 +269,14 @@ xQGanttBarViewPort::mouseReleaseEvent(QMouseEvent* e) void -xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) +xQGanttBarViewPort::mouseMoveEvent(TQMouseEvent* e) { if(fabs((float)(_startPoint->x() - e->x())) < 2 && fabs((float)(_startPoint->y() - e->y())) < 2 ) return; - static QPen _dashPen(QColor(255,0,0),DashLine); - static QPen _solidPen(QColor(200,200,200)); + static TQPen _dashPen(TQColor(255,0,0),DashLine); + static TQPen _solidPen(TQColor(200,200,200)); _Mousemoved = true; @@ -286,13 +286,13 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_currentMButton == LeftButton && _currentItem) { - QPainter p(this); + TQPainter p(this); p.setRasterOp(XorROP); - // QPen pen(DashLine); + // TQPen pen(DashLine); // pen.setColor(red); p.setPen( _dashPen ); - QString stmp; + TQString stmp; stmp.sprintf("%s\n", _currentItem->getText().latin1() ); int pixeldiff = e->x() - _startPoint->x(); @@ -318,10 +318,10 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_changeStart) { - QDateTime movedStart( _currentItem->getStart().addSecs(_timediff*60) ); + TQDateTime movedStart( _currentItem->getStart().addSecs(_timediff*60) ); _tmpStartDateTime.setDate( movedStart.date() ); - _tmpStartDateTime.setTime(QTime(0,0,0,0)); + _tmpStartDateTime.setTime(TQTime(0,0,0,0)); double diff = _tmpStartDateTime.secsTo(movedStart)/60; @@ -341,10 +341,10 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_changeEnd) { - QDateTime movedEnd( _currentItem->getEnd().addSecs(_timediff*60) ); + TQDateTime movedEnd( _currentItem->getEnd().addSecs(_timediff*60) ); _tmpEndDateTime.setDate( movedEnd.date() ); - _tmpEndDateTime.setTime(QTime(0,0,0,0)); + _tmpEndDateTime.setTime(TQTime(0,0,0,0)); double diff = _tmpEndDateTime.secsTo(movedEnd)/60; @@ -372,7 +372,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(oldx > 0) { p.fillRect(oldx, _gItemList.find(_currentItem)->_screenY, oldw, _gItemList.find(_currentItem)->_screenH, - QBrush(QColor(50,50,50), Dense4Pattern)); + TQBrush(TQColor(50,50,50), Dense4Pattern)); p.drawRect(oldx, _gItemList.find(_currentItem)->_screenY, oldw, _gItemList.find(_currentItem)->_screenH); @@ -388,7 +388,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) p.setPen(_dashPen); p.fillRect(x, _gItemList.find(_currentItem)->_screenY, w, _gItemList.find(_currentItem)->_screenH, - QBrush(QColor(50,50,50), Dense4Pattern) ); + TQBrush(TQColor(50,50,50), Dense4Pattern) ); p.drawRect(x, _gItemList.find(_currentItem)->_screenY, w, _gItemList.find(_currentItem)->_screenH); @@ -444,15 +444,15 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) if(_currentMButton == LeftButton) { - static QString strpos; + static TQString strpos; strpos = ""; int s = worldX(_startPoint->x()); - QDateTime d1 = _toplevelitem->getStart().addSecs(s*60); + TQDateTime d1 = _toplevelitem->getStart().addSecs(s*60); s = worldX(e->x()); - QDateTime d2 = _toplevelitem->getStart().addSecs(s*60); + TQDateTime d2 = _toplevelitem->getStart().addSecs(s*60); strpos += d1.date().toString(); strpos += " - "; @@ -460,8 +460,8 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) emit message(strpos); - QPainter p(this); - QPen pen(DashLine); + TQPainter p(this); + TQPen pen(DashLine); pen.setColor(red); p.setRasterOp(XorROP); @@ -473,7 +473,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) _endPoint->x()-_startPoint->x(), _endPoint->y() - _startPoint->y()); - QBrush _selectedbrush( QColor(50,50,50), Dense4Pattern ); + TQBrush _selectedbrush( TQColor(50,50,50), Dense4Pattern ); p.fillRect( _startPoint->x(), _startPoint->y(), _endPoint->x()-_startPoint->x(), _endPoint->y() - _startPoint->y(), @@ -509,7 +509,7 @@ xQGanttBarViewPort::mouseMoveEvent(QMouseEvent* e) void -xQGanttBarViewPort::keyPressEvent(QKeyEvent* e) +xQGanttBarViewPort::keyPressEvent(TQKeyEvent* e) { printf("xQGanttBarViewPort::keyPressEvent() key = %d \n", e->key() ); @@ -577,7 +577,7 @@ xQGanttBarViewPort::keyPressEvent(QKeyEvent* e) void -xQGanttBarViewPort::paintEvent(QPaintEvent * e) +xQGanttBarViewPort::paintEvent(TQPaintEvent * e) ///////////////////////////////////////////////// { update(e->rect().left(), e->rect().top(), diff --git a/kgantt/kgantt/xQGanttListView.cpp b/kgantt/kgantt/xQGanttListView.cpp index 01b4ac246..3f5f44c28 100644 --- a/kgantt/kgantt/xQGanttListView.cpp +++ b/kgantt/kgantt/xQGanttListView.cpp @@ -7,20 +7,20 @@ #include "xQGanttListView.h" -#include <qcolor.h> +#include <tqcolor.h> #include <klocale.h> -xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, QWidget* parent, +xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent, const char * name, WFlags f) - : QScrollView(parent,name,f) + : TQScrollView(parent,name,f) ///////////////////////////////////////////////////////// { _toplevelitem = toplevelitem; - setFrameStyle(QFrame::Sunken); + setFrameStyle(TQFrame::Sunken); setLineWidth(1); - _headerBackBrush = QBrush(QColor(230,230,230)); + _headerBackBrush = TQBrush(TQColor(230,230,230)); setMargins( 1, TOPMARGIN , 1, 1 ); @@ -29,7 +29,7 @@ xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, QWidget* parent, _viewport = new xQGanttListViewPort(toplevelitem,viewport()); addChild(_viewport); - viewport()->setBackgroundColor(QColor(white)); + viewport()->setBackgroundColor(TQColor(white)); } @@ -47,8 +47,8 @@ xQGanttListView::drawHeader() { // printf("xQGanttListView::drawHeader()\n"); - QPainter p(this); - p.setPen( QPen(QColor(black)) ); + TQPainter p(this); + p.setPen( TQPen(TQColor(black)) ); p.fillRect(0,0,width(),TOPMARGIN, _headerBackBrush ); p.drawText(5, (int)(0.8 * TOPMARGIN), i18n("Items")); @@ -68,7 +68,7 @@ xQGanttListView::contentsMoved(int x, int y) void -xQGanttListView::paintEvent(QPaintEvent * /*e*/) +xQGanttListView::paintEvent(TQPaintEvent * /*e*/) { drawHeader(); } diff --git a/kgantt/kgantt/xQGanttListView.h b/kgantt/kgantt/xQGanttListView.h index 36a2bbc02..ff002a7b1 100644 --- a/kgantt/kgantt/xQGanttListView.h +++ b/kgantt/kgantt/xQGanttListView.h @@ -34,7 +34,7 @@ #include "xQGanttBarView.h" #include "xQGanttListViewPort.h" -#include <qscrollview.h> +#include <tqscrollview.h> @@ -58,7 +58,7 @@ public: /*! * */ - xQGanttListView(KGanttItem* toplevelitem, QWidget* parent = 0, + xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent = 0, const char * name=0, WFlags f=0 ); @@ -90,13 +90,13 @@ protected: // ptr to toplevelitem KGanttItem* _toplevelitem; - QBrush _headerBackBrush; + TQBrush _headerBackBrush; xQGanttBarView* _barview; xQGanttListViewPort* _viewport; void drawHeader(); - void paintEvent(QPaintEvent * e); + void paintEvent(TQPaintEvent * e); }; diff --git a/kgantt/kgantt/xQGanttListViewPort.cpp b/kgantt/kgantt/xQGanttListViewPort.cpp index 573d8fbe9..a792ad992 100644 --- a/kgantt/kgantt/xQGanttListViewPort.cpp +++ b/kgantt/kgantt/xQGanttListViewPort.cpp @@ -7,26 +7,26 @@ #include "xQGanttListViewPort.h" -#include <qcolor.h> +#include <tqcolor.h> int xQGanttListViewPort::_ListViewCounter = 0; -xQGanttListViewPort::xQGanttListViewPort(KGanttItem* toplevelitem, QWidget* parent, +xQGanttListViewPort::xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent, const char * name, WFlags f ) - : QFrame(parent,name,f) + : TQFrame(parent,name,f) { _toplevelitem = toplevelitem; - setBackgroundColor(QColor(white)); + setBackgroundColor(TQColor(white)); _barviewport = NULL; _width = 1000; - brush1 = QBrush(QColor(200,200,230)); - brush2 = QBrush(QColor(240,240,240)); + brush1 = TQBrush(TQColor(200,200,230)); + brush2 = TQBrush(TQColor(240,240,240)); } @@ -50,16 +50,16 @@ xQGanttListViewPort::setBarViewPort(xQGanttBarViewPort* v) printf("setBarViewPort()\n"); - connect(_barviewport, SIGNAL(resized()), - this, SLOT(barViewResized())); + connect(_barviewport, TQT_SIGNAL(resized()), + this, TQT_SLOT(barViewResized())); - connect(_barviewport, SIGNAL(recalculated()), - this, SLOT(update())); + connect(_barviewport, TQT_SIGNAL(recalculated()), + this, TQT_SLOT(update())); /* - connect(_barviewport, SIGNAL(contentsRepainted()), - this, SLOT(barViewRepainted())); + connect(_barviewport, TQT_SIGNAL(contentsRepainted()), + this, TQT_SLOT(barViewRepainted())); */ } @@ -85,7 +85,7 @@ xQGanttListViewPort::barViewResized() void -xQGanttListViewPort::drawContents(QPainter* p, int x1, int y1, int x2, int y2) +xQGanttListViewPort::drawContents(TQPainter* p, int x1, int y1, int x2, int y2) ////////////////////////////////////////////////////////////////////////////// { /*printf("\nxQGanttListViewPort::drawContents(%d,%d,%d,%d)\n", @@ -95,7 +95,7 @@ xQGanttListViewPort::drawContents(QPainter* p, int x1, int y1, int x2, int y2) _ListViewCounter = 0; if(_barviewport) { - drawItem(_toplevelitem, p, QRect(x1, y1, x2-x1, y2-y1), 5 ); + drawItem(_toplevelitem, p, TQRect(x1, y1, x2-x1, y2-y1), 5 ); } } @@ -103,7 +103,7 @@ xQGanttListViewPort::drawContents(QPainter* p, int x1, int y1, int x2, int y2) void -xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect, +xQGanttListViewPort::drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect, int offsetX ) ///////////////////////////////////////////////////////////////////////////// { @@ -118,7 +118,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect, ((tpos->_screenY + tpos->_screenH)+5 >= rect.y() && (tpos->_screenY + tpos->_screenH)-5 <= rect.y() + rect.height() ) ) { - p->setPen(QPen(QColor(black))); + p->setPen(TQPen(TQColor(black))); int y = tpos->_screenY; int h = tpos->_screenH; @@ -130,7 +130,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect, p->fillRect(0 + margin, y + margin, _width - 2* margin, h - 2* margin, brush2); - QString str = item->getText() + " [" + + TQString str = item->getText() + " [" + item->getStart().toString() + " / " + item->getEnd().toString() + "]"; @@ -149,7 +149,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, QPainter* p, const QRect& rect, } - p->setPen(QPen(QColor(blue),2)); + p->setPen(TQPen(TQColor(blue),2)); p->drawLine(offsetX + 3, tpos->_textPosY + 3, offsetX + 3, tpos->_screenY + tpos->_screenHS - 3); @@ -162,7 +162,7 @@ void xQGanttListViewPort::update(int x1, int y1, int x2, int y2) ///////////////////////////////////////////////// { - QPainter p(this); + TQPainter p(this); /* printf("\nxQGanttListViewPort::update(%d,%d,%d,%d)\n", diff --git a/kgantt/kgantt/xQGanttListViewPort.h b/kgantt/kgantt/xQGanttListViewPort.h index d133d129b..cc16ca8c8 100644 --- a/kgantt/kgantt/xQGanttListViewPort.h +++ b/kgantt/kgantt/xQGanttListViewPort.h @@ -34,7 +34,7 @@ #include "KGanttItem.h" -#include <qcursor.h> +#include <tqcursor.h> @@ -60,7 +60,7 @@ public: /*! * */ - xQGanttListViewPort(KGanttItem* toplevelitem, QWidget* parent = 0, + xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent = 0, const char * name=0, WFlags f=0 ); @@ -94,8 +94,8 @@ protected: void setBarViewPort(xQGanttBarViewPort* v); - void drawContents(QPainter*, int x1, int y1, int x2, int y2); - void drawItem(KGanttItem*, QPainter* p, const QRect&, int); + void drawContents(TQPainter*, int x1, int y1, int x2, int y2); + void drawItem(KGanttItem*, TQPainter* p, const TQRect&, int); xQGanttBarViewPort* _barviewport; @@ -103,15 +103,15 @@ protected: KGanttItem* _toplevelitem; - void paintEvent(QPaintEvent * e) { + void paintEvent(TQPaintEvent * e) { // printf("xQGanttListViewPort::paintEvent()\n"); update(e->rect().left(), e->rect().top(), e->rect().right(), e->rect().bottom() ); } - QPopupMenu* _menu; + TQPopupMenu* _menu; - void mousePressEvent(QMouseEvent* e) { + void mousePressEvent(TQMouseEvent* e) { if(e->button() == RightButton && e->state() == ControlButton ) { _menu->popup(e->globalPos()); @@ -121,7 +121,7 @@ protected: } - QBrush brush1, brush2; + TQBrush brush1, brush2; static int _ListViewCounter; |