From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- korganizer/navigatorbar.cpp | 72 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'korganizer/navigatorbar.cpp') diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index dd7b45ea6..0ece74c57 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -22,13 +22,13 @@ without including the source code for Qt in the source distribution. */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,73 +42,73 @@ #include "navigatorbar.h" -ActiveLabel::ActiveLabel( QWidget *parent, const char *name ) - : QLabel( parent, name ) +ActiveLabel::ActiveLabel( TQWidget *parent, const char *name ) + : TQLabel( parent, name ) { } -void ActiveLabel::mouseReleaseEvent( QMouseEvent * ) +void ActiveLabel::mouseReleaseEvent( TQMouseEvent * ) { emit clicked(); } -NavigatorBar::NavigatorBar( QWidget *parent, const char *name ) - : QWidget( parent, name ), mHasMinWidth( false ) +NavigatorBar::NavigatorBar( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mHasMinWidth( false ) { - QFont tfont = font(); + TQFont tfont = font(); tfont.setPointSize( 10 ); tfont.setBold( false ); bool isRTL = KOGlobals::self()->reverseLayout(); - QPixmap pix; + TQPixmap pix; // Create backward navigation buttons - mPrevYear = new QPushButton( this ); + mPrevYear = new TQPushButton( this ); pix = KOGlobals::self()->smallIcon( isRTL ? "2rightarrow" : "2leftarrow" ); mPrevYear->setPixmap( pix ); - mPrevYear->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mPrevYear, i18n("Previous year") ); + mPrevYear->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mPrevYear, i18n("Previous year") ); pix = KOGlobals::self()->smallIcon( isRTL ? "1rightarrow" : "1leftarrow"); - mPrevMonth = new QPushButton( this ); + mPrevMonth = new TQPushButton( this ); mPrevMonth->setPixmap( pix ); - mPrevMonth->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mPrevMonth, i18n("Previous month") ); + mPrevMonth->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mPrevMonth, i18n("Previous month") ); // Create forward navigation buttons pix = KOGlobals::self()->smallIcon( isRTL ? "1leftarrow" : "1rightarrow"); - mNextMonth = new QPushButton( this ); + mNextMonth = new TQPushButton( this ); mNextMonth->setPixmap( pix ); - mNextMonth->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mNextMonth, i18n("Next month") ); + mNextMonth->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mNextMonth, i18n("Next month") ); pix = KOGlobals::self()->smallIcon( isRTL ? "2leftarrow" : "2rightarrow"); - mNextYear = new QPushButton( this ); + mNextYear = new TQPushButton( this ); mNextYear->setPixmap( pix ); - mNextYear->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); - QToolTip::add( mNextYear, i18n("Next year") ); + mNextYear->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + TQToolTip::add( mNextYear, i18n("Next year") ); // Create month name button mMonth = new ActiveLabel( this ); mMonth->setFont( tfont ); mMonth->setAlignment( AlignCenter ); mMonth->setMinimumHeight( mPrevYear->sizeHint().height() ); - QToolTip::add( mMonth, i18n("Select a month") ); + TQToolTip::add( mMonth, i18n("Select a month") ); // set up control frame layout - QBoxLayout *ctrlLayout = new QHBoxLayout( this, 0, 4 ); + TQBoxLayout *ctrlLayout = new TQHBoxLayout( this, 0, 4 ); ctrlLayout->addWidget( mPrevYear, 3 ); ctrlLayout->addWidget( mPrevMonth, 3 ); ctrlLayout->addWidget( mMonth, 3 ); ctrlLayout->addWidget( mNextMonth, 3 ); ctrlLayout->addWidget( mNextYear, 3 ); - connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); - connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); - connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); - connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); - connect( mMonth, SIGNAL( clicked() ), SLOT( selectMonth() ) ); + connect( mPrevYear, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goPrevYear() ) ); + connect( mPrevMonth, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goPrevMonth() ) ); + connect( mNextMonth, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goNextMonth() ) ); + connect( mNextYear, TQT_SIGNAL( clicked() ), TQT_SIGNAL( goNextYear() ) ); + connect( mMonth, TQT_SIGNAL( clicked() ), TQT_SLOT( selectMonth() ) ); } NavigatorBar::~NavigatorBar() @@ -148,7 +148,7 @@ void NavigatorBar::selectDates( const KCal::DateList &dateList ) int maxwidth = 0; for( i = 1; i <= calSys->monthsInYear( mDate ); ++i ) { - int w = QFontMetrics( mMonth->font() ).width( QString("%1 8888") + int w = TQFontMetrics( mMonth->font() ).width( TQString("%1 8888") .arg( calSys->monthName( i, calSys->year( mDate ) ) ) ); if ( w > maxwidth ) maxwidth = w; } @@ -171,7 +171,7 @@ void NavigatorBar::selectMonth() int i, month, months = calSys->monthsInYear( mDate ); - QPopupMenu *popup = new QPopupMenu( mMonth ); + TQPopupMenu *popup = new TQPopupMenu( mMonth ); for ( i = 1; i <= months; i++ ) popup->insertItem( calSys->monthName( i, calSys->year( mDate ) ), i ); @@ -179,7 +179,7 @@ void NavigatorBar::selectMonth() popup->setActiveItem( calSys->month( mDate ) - 1 ); popup->setMinimumWidth( mMonth->width() ); - if ( ( month = popup->exec( mMonth->mapToGlobal( QPoint( 0, 0 ) ), + if ( ( month = popup->exec( mMonth->mapToGlobal( TQPoint( 0, 0 ) ), calSys->month( mDate ) - 1 ) ) == -1 ) { delete popup; return; // canceled -- cgit v1.2.1