summaryrefslogtreecommitdiffstats
path: root/korganizer/plugins/timespanview
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/plugins/timespanview')
-rw-r--r--korganizer/plugins/timespanview/kotimespanview.cpp20
-rw-r--r--korganizer/plugins/timespanview/kotimespanview.h6
-rw-r--r--korganizer/plugins/timespanview/lineview.cpp10
-rw-r--r--korganizer/plugins/timespanview/lineview.h10
-rw-r--r--korganizer/plugins/timespanview/timeline.cpp16
-rw-r--r--korganizer/plugins/timespanview/timeline.h14
-rw-r--r--korganizer/plugins/timespanview/timespanview.cpp8
-rw-r--r--korganizer/plugins/timespanview/timespanview.h4
-rw-r--r--korganizer/plugins/timespanview/timespanwidget.cpp60
-rw-r--r--korganizer/plugins/timespanview/timespanwidget.h22
10 files changed, 85 insertions, 85 deletions
diff --git a/korganizer/plugins/timespanview/kotimespanview.cpp b/korganizer/plugins/timespanview/kotimespanview.cpp
index 507438a6a..eec3ab461 100644
--- a/korganizer/plugins/timespanview/kotimespanview.cpp
+++ b/korganizer/plugins/timespanview/kotimespanview.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <kstandarddirs.h>
@@ -35,16 +35,16 @@
#include "kotimespanview.h"
#include "kotimespanview.moc"
-KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent,
+KOTimeSpanView::KOTimeSpanView(Calendar *calendar, TQWidget *parent,
const char *name) :
KOEventView( calendar, parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
mTimeSpanWidget = new TimeSpanWidget( this );
topLayout->addWidget( mTimeSpanWidget );
- connect( mTimeSpanWidget, SIGNAL( dateRangeChanged() ), SLOT( updateView() ) );
+ connect( mTimeSpanWidget, TQT_SIGNAL( dateRangeChanged() ), TQT_SLOT( updateView() ) );
}
KOTimeSpanView::~KOTimeSpanView()
@@ -58,7 +58,7 @@ void KOTimeSpanView::readSettings()
KConfig config( "korganizerrc", true, false); // Open read-only, no kdeglobals
config.setGroup("Views");
- QValueList<int> sizes = config.readIntListEntry("Separator TimeSpanView");
+ TQValueList<int> sizes = config.readIntListEntry("Separator TimeSpanView");
if (sizes.count() == 2) {
mTimeSpanWidget->setSplitterSizes(sizes);
}
@@ -70,7 +70,7 @@ void KOTimeSpanView::writeSettings(KConfig *config)
config->setGroup("Views");
- QValueList<int> list = mTimeSpanWidget->splitterSizes();
+ TQValueList<int> list = mTimeSpanWidget->splitterSizes();
config->writeEntry("Separator TimeSpanView",list);
}
@@ -97,15 +97,15 @@ void KOTimeSpanView::updateView()
mTimeSpanWidget->endDateTime().date() );
}
-void KOTimeSpanView::showDates(const QDate &start, const QDate &end)
+void KOTimeSpanView::showDates(const TQDate &start, const TQDate &end)
{
- QDate s = start.addDays( -2 );
- QDate e = end.addDays( 2 );
+ TQDate s = start.addDays( -2 );
+ TQDate e = end.addDays( 2 );
insertItems( s, e );
}
-void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
+void KOTimeSpanView::insertItems(const TQDate &start, const TQDate &end)
{
mTimeSpanWidget->clear();
mTimeSpanWidget->setDateRange( start, end );
diff --git a/korganizer/plugins/timespanview/kotimespanview.h b/korganizer/plugins/timespanview/kotimespanview.h
index 142ba75f4..d115b630b 100644
--- a/korganizer/plugins/timespanview/kotimespanview.h
+++ b/korganizer/plugins/timespanview/kotimespanview.h
@@ -33,7 +33,7 @@ class KOTimeSpanView : public KOEventView
{
Q_OBJECT
public:
- KOTimeSpanView( Calendar *calendar, QWidget *parent = 0,
+ KOTimeSpanView( Calendar *calendar, TQWidget *parent = 0,
const char *name = 0 );
~KOTimeSpanView();
@@ -47,13 +47,13 @@ class KOTimeSpanView : public KOEventView
public slots:
virtual void updateView();
- virtual void showDates( const QDate &start, const QDate &end );
+ virtual void showDates( const TQDate &start, const TQDate &end );
virtual void showIncidences( const Incidence::List &incidenceList );
void changeIncidenceDisplay(Incidence *, int);
private:
- void insertItems( const QDate &start, const QDate & end );
+ void insertItems( const TQDate &start, const TQDate & end );
TimeSpanWidget *mTimeSpanWidget;
};
diff --git a/korganizer/plugins/timespanview/lineview.cpp b/korganizer/plugins/timespanview/lineview.cpp
index 26779bdb3..93a2f0bfa 100644
--- a/korganizer/plugins/timespanview/lineview.cpp
+++ b/korganizer/plugins/timespanview/lineview.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
@@ -31,8 +31,8 @@
#include "lineview.h"
#include "lineview.moc"
-LineView::LineView( QWidget *parent, const char *name ) :
- QScrollView( parent, name )
+LineView::LineView( TQWidget *parent, const char *name ) :
+ TQScrollView( parent, name )
{
mPixelWidth = 1000;
@@ -71,7 +71,7 @@ void LineView::clear()
update();
}
-void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
+void LineView::drawContents(TQPainter* p, int cx, int cy, int cw, int ch)
{
// kdDebug(5850) << "LineView::drawContents()" << endl;
@@ -112,7 +112,7 @@ void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
if ( cbottom > (cy+ch) ) cbottom = cy+ch;
// kdDebug(5850) << " drawContents(): ctop: " << ctop << " cbottom: "
// << cbottom << " s: " << s << " e: " << e << endl;
- p->fillRect( s, ctop, e - s + 1, cbottom - ctop + 1, QBrush("red") );
+ p->fillRect( s, ctop, e - s + 1, cbottom - ctop + 1, TQBrush("red") );
}
}
}
diff --git a/korganizer/plugins/timespanview/lineview.h b/korganizer/plugins/timespanview/lineview.h
index 0bb1788a7..e98d905b0 100644
--- a/korganizer/plugins/timespanview/lineview.h
+++ b/korganizer/plugins/timespanview/lineview.h
@@ -24,14 +24,14 @@
#ifndef LINEVIEW_H
#define LINEVIEW_H
-#include <qscrollview.h>
-#include <qptrlist.h>
+#include <tqscrollview.h>
+#include <tqptrlist.h>
class LineView : public QScrollView
{
Q_OBJECT
public:
- LineView( QWidget *parent = 0, const char *name = 0 );
+ LineView( TQWidget *parent = 0, const char *name = 0 );
virtual ~LineView();
int pixelWidth();
@@ -41,7 +41,7 @@ class LineView : public QScrollView
void clear();
protected:
- void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
+ void drawContents(TQPainter* p, int cx, int cy, int cw, int ch);
private:
struct Line {
@@ -51,7 +51,7 @@ class LineView : public QScrollView
int end;
};
- QPtrList<Line> mLines;
+ TQPtrList<Line> mLines;
int mPixelWidth;
};
diff --git a/korganizer/plugins/timespanview/timeline.cpp b/korganizer/plugins/timespanview/timeline.cpp
index 0d679e192..19ed75818 100644
--- a/korganizer/plugins/timespanview/timeline.cpp
+++ b/korganizer/plugins/timespanview/timeline.cpp
@@ -22,15 +22,15 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include "timeline.h"
#include "timeline.moc"
-TimeLine::TimeLine( QWidget *parent, const char *name ) :
- QScrollView( parent, name )
+TimeLine::TimeLine( TQWidget *parent, const char *name ) :
+ TQScrollView( parent, name )
{
mPixelWidth = 1000;
@@ -46,7 +46,7 @@ TimeLine::~TimeLine()
{
}
-void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
+void TimeLine::drawContents(TQPainter* p, int cx, int cy, int cw, int ch)
{
int spacingX = mDaySpacing;
int offsetX = mDayOffset;
@@ -59,14 +59,14 @@ void TimeLine::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
while (x < cx + cw) {
// kdDebug(5850) << " x: " << x << endl;
p->drawLine(x,cy,x,cy+ch);
- p->drawText( x + 5, 15, QString::number( mStartDate.addDays( cell + 1 ).date().day() ) );
+ p->drawText( x + 5, 15, TQString::number( mStartDate.addDays( cell + 1 ).date().day() ) );
x += spacingX;
cell++;
}
}
-void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
+void TimeLine::setDateRange( const TQDateTime &start, const TQDateTime &end )
{
mStartDate = start;
mEndDate = end;
@@ -75,7 +75,7 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
mDaySpacing = 60 * 60 * 24 / mSecsPerPixel;
- mDayOffset = QDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel;
+ mDayOffset = TQDateTime( mStartDate.date() ).secsTo( mStartDate ) / mSecsPerPixel;
kdDebug(5850) << "TimeLines::setDateRange(): mDaySpacing: " << mDaySpacing << " mDayOffset: "
<< mDayOffset << " mSecsPerPixel: " << mSecsPerPixel << endl;
@@ -83,5 +83,5 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
void TimeLine::setContentsPos( int pos )
{
- QScrollView::setContentsPos ( pos, 0 );
+ TQScrollView::setContentsPos ( pos, 0 );
}
diff --git a/korganizer/plugins/timespanview/timeline.h b/korganizer/plugins/timespanview/timeline.h
index 7c9bd8689..031763f72 100644
--- a/korganizer/plugins/timespanview/timeline.h
+++ b/korganizer/plugins/timespanview/timeline.h
@@ -24,27 +24,27 @@
#ifndef TIMELINE_H
#define TIMELINE_H
-#include <qscrollview.h>
-#include <qdatetime.h>
+#include <tqscrollview.h>
+#include <tqdatetime.h>
class TimeLine : public QScrollView
{
Q_OBJECT
public:
- TimeLine( QWidget *parent = 0, const char *name = 0 );
+ TimeLine( TQWidget *parent = 0, const char *name = 0 );
virtual ~TimeLine();
- void setDateRange( const QDateTime &start, const QDateTime &end );
+ void setDateRange( const TQDateTime &start, const TQDateTime &end );
public slots:
void setContentsPos( int pos );
protected:
- void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
+ void drawContents(TQPainter* p, int cx, int cy, int cw, int ch);
private:
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
int mPixelWidth;
int mDaySpacing;
diff --git a/korganizer/plugins/timespanview/timespanview.cpp b/korganizer/plugins/timespanview/timespanview.cpp
index be95a2c8d..24a45abb1 100644
--- a/korganizer/plugins/timespanview/timespanview.cpp
+++ b/korganizer/plugins/timespanview/timespanview.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -51,7 +51,7 @@ TimespanView::TimespanView(KOrg::MainWindow *parent, const char *name) :
setXMLFile( "plugins/timespanviewui.rc" );
- new KAction( i18n("&Timespan"), "timespan", 0, this, SLOT( showView() ),
+ new KAction( i18n("&Timespan"), "timespan", 0, this, TQT_SLOT( showView() ),
actionCollection(), "view_timespan" );
}
@@ -59,12 +59,12 @@ TimespanView::~TimespanView()
{
}
-QString TimespanView::info()
+TQString TimespanView::info()
{
return i18n("This plugin provides a Gantt-like Timespan view.");
}
-QString TimespanView::shortInfo()
+TQString TimespanView::shortInfo()
{
return i18n( "Timespan View Plugin" );
}
diff --git a/korganizer/plugins/timespanview/timespanview.h b/korganizer/plugins/timespanview/timespanview.h
index e88e140c5..cb2d17f70 100644
--- a/korganizer/plugins/timespanview/timespanview.h
+++ b/korganizer/plugins/timespanview/timespanview.h
@@ -29,8 +29,8 @@ class TimespanView : public KOrg::Part {
TimespanView(KOrg::MainWindow *, const char *);
~TimespanView();
- QString info();
- QString shortInfo();
+ TQString info();
+ TQString shortInfo();
private slots:
void showView();
diff --git a/korganizer/plugins/timespanview/timespanwidget.cpp b/korganizer/plugins/timespanview/timespanwidget.cpp
index 23d781f45..0e8f0c4b9 100644
--- a/korganizer/plugins/timespanview/timespanwidget.cpp
+++ b/korganizer/plugins/timespanview/timespanwidget.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qsplitter.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qpushbutton.h>
+#include <tqsplitter.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdebug.h>
@@ -39,19 +39,19 @@
#include "timespanwidget.h"
#include "timespanwidget.moc"
-TimeSpanWidget::TimeSpanWidget( QWidget *parent, const char *name ) :
- QWidget( parent, name )
+TimeSpanWidget::TimeSpanWidget( TQWidget *parent, const char *name ) :
+ TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- mSplitter = new QSplitter( this );
+ mSplitter = new TQSplitter( this );
topLayout->addWidget( mSplitter );
- mList = new QListView( mSplitter );
+ mList = new TQListView( mSplitter );
mList->addColumn( i18n("Summary") );
- QWidget *rightPane = new QWidget( mSplitter );
- QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane );
+ TQWidget *rightPane = new TQWidget( mSplitter );
+ TQBoxLayout *rightPaneLayout = new TQVBoxLayout( rightPane );
mTimeLine = new TimeLine( rightPane );
mTimeLine->setFixedHeight( mList->header()->height() );
@@ -60,44 +60,44 @@ TimeSpanWidget::TimeSpanWidget( QWidget *parent, const char *name ) :
mLineView = new LineView( rightPane );
rightPaneLayout->addWidget( mLineView );
- QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout );
+ TQBoxLayout *buttonLayout = new TQHBoxLayout( rightPaneLayout );
- QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane );
- connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) );
+ TQPushButton *zoomInButton = new TQPushButton( i18n("Zoom In"), rightPane );
+ connect( zoomInButton, TQT_SIGNAL( clicked() ), TQT_SLOT( zoomIn() ) );
buttonLayout->addWidget( zoomInButton );
- QPushButton *zoomOutButton = new QPushButton( i18n("Zoom Out"), rightPane );
- connect( zoomOutButton, SIGNAL( clicked() ), SLOT( zoomOut() ) );
+ TQPushButton *zoomOutButton = new TQPushButton( i18n("Zoom Out"), rightPane );
+ connect( zoomOutButton, TQT_SIGNAL( clicked() ), TQT_SLOT( zoomOut() ) );
buttonLayout->addWidget( zoomOutButton );
- QPushButton *centerButton = new QPushButton( i18n("Center View"), rightPane );
- connect( centerButton, SIGNAL( clicked() ), SLOT( centerView() ) );
+ TQPushButton *centerButton = new TQPushButton( i18n("Center View"), rightPane );
+ connect( centerButton, TQT_SIGNAL( clicked() ), TQT_SLOT( centerView() ) );
buttonLayout->addWidget( centerButton );
- connect(mLineView->horizontalScrollBar(),SIGNAL(valueChanged(int)),
- mTimeLine,SLOT(setContentsPos(int)));
+ connect(mLineView->horizontalScrollBar(),TQT_SIGNAL(valueChanged(int)),
+ mTimeLine,TQT_SLOT(setContentsPos(int)));
}
TimeSpanWidget::~TimeSpanWidget()
{
}
-QValueList<int> TimeSpanWidget::splitterSizes()
+TQValueList<int> TimeSpanWidget::splitterSizes()
{
return mSplitter->sizes();
}
-void TimeSpanWidget::setSplitterSizes( QValueList<int> sizes )
+void TimeSpanWidget::setSplitterSizes( TQValueList<int> sizes )
{
mSplitter->setSizes( sizes );
}
void TimeSpanWidget::addItem( KCal::Event *event )
{
- new QListViewItem( mList, event->summary() );
+ new TQListViewItem( mList, event->summary() );
- QDateTime startDt = event->dtStart();
- QDateTime endDt = event->dtEnd();
+ TQDateTime startDt = event->dtStart();
+ TQDateTime endDt = event->dtEnd();
// kdDebug(5850) << "TimeSpanWidget::addItem(): start: " << startDt.toString()
// << " end: " << endDt.toString() << endl;
@@ -130,7 +130,7 @@ void TimeSpanWidget::updateView()
#endif
}
-void TimeSpanWidget::setDateRange( const QDateTime &start, const QDateTime &end )
+void TimeSpanWidget::setDateRange( const TQDateTime &start, const TQDateTime &end )
{
mStartDate = start;
mEndDate = end;
@@ -140,12 +140,12 @@ void TimeSpanWidget::setDateRange( const QDateTime &start, const QDateTime &end
mSecsPerPixel = mStartDate.secsTo( mEndDate ) / mLineView->pixelWidth();
}
-QDateTime TimeSpanWidget::startDateTime()
+TQDateTime TimeSpanWidget::startDateTime()
{
return mStartDate;
}
-QDateTime TimeSpanWidget::endDateTime()
+TQDateTime TimeSpanWidget::endDateTime()
{
return mEndDate;
}
@@ -168,7 +168,7 @@ void TimeSpanWidget::zoomOut()
void TimeSpanWidget::centerView()
{
- QScrollBar *scrollBar = mLineView->horizontalScrollBar();
+ TQScrollBar *scrollBar = mLineView->horizontalScrollBar();
int min = scrollBar->minValue();
int max = scrollBar->maxValue();
scrollBar->setValue( min + (max-min) / 2 );
diff --git a/korganizer/plugins/timespanview/timespanwidget.h b/korganizer/plugins/timespanview/timespanwidget.h
index 316437023..38cdea6c8 100644
--- a/korganizer/plugins/timespanview/timespanwidget.h
+++ b/korganizer/plugins/timespanview/timespanwidget.h
@@ -24,7 +24,7 @@
#ifndef TimeSpanWidget_H
#define TimeSpanWidget_H
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KCal {
class Event;
@@ -39,20 +39,20 @@ class TimeSpanWidget : public QWidget
{
Q_OBJECT
public:
- TimeSpanWidget( QWidget *parent=0, const char *name=0 );
+ TimeSpanWidget( TQWidget *parent=0, const char *name=0 );
virtual ~TimeSpanWidget();
void addItem( KCal::Event * );
- QValueList<int> splitterSizes();
- void setSplitterSizes( QValueList<int> );
+ TQValueList<int> splitterSizes();
+ void setSplitterSizes( TQValueList<int> );
void clear();
- void setDateRange( const QDateTime &start, const QDateTime &end );
+ void setDateRange( const TQDateTime &start, const TQDateTime &end );
- QDateTime startDateTime();
- QDateTime endDateTime();
+ TQDateTime startDateTime();
+ TQDateTime endDateTime();
public slots:
void updateView();
@@ -65,13 +65,13 @@ class TimeSpanWidget : public QWidget
void dateRangeChanged();
private:
- QSplitter *mSplitter;
- QListView *mList;
+ TQSplitter *mSplitter;
+ TQListView *mList;
TimeLine *mTimeLine;
LineView *mLineView;
- QDateTime mStartDate;
- QDateTime mEndDate;
+ TQDateTime mStartDate;
+ TQDateTime mEndDate;
int mSecsPerPixel;
};