summaryrefslogtreecommitdiffstats
path: root/korganizer/journalentry.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /korganizer/journalentry.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/journalentry.cpp')
-rw-r--r--korganizer/journalentry.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 3c680c654..ae80a8d6f 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -25,12 +25,12 @@
//
// Journal Entry
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqtoolbutton.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -60,32 +60,32 @@
class JournalTitleLable : public KActiveLabel
{
public:
- JournalTitleLable( QWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {}
+ JournalTitleLable( TQWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {}
- void openLink( const QString &/*link*/ ) {}
+ void openLink( const TQString &/*link*/ ) {}
};
-JournalDateEntry::JournalDateEntry( Calendar *calendar, QWidget *parent ) :
- QVBox( parent ), mCalendar( calendar )
+JournalDateEntry::JournalDateEntry( Calendar *calendar, TQWidget *parent ) :
+ TQVBox( parent ), mCalendar( calendar )
{
//kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl;
mChanger = 0;
mTitle = new JournalTitleLable( this );
mTitle->setMargin(2);
- mTitle->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
- connect( mTitle, SIGNAL( linkClicked( const QString & ) ),
- this, SLOT( emitNewJournal() ) );
+ mTitle->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
+ connect( mTitle, TQT_SIGNAL( linkClicked( const TQString & ) ),
+ this, TQT_SLOT( emitNewJournal() ) );
}
JournalDateEntry::~JournalDateEntry()
{
}
-void JournalDateEntry::setDate(const QDate &date)
+void JournalDateEntry::setDate(const TQDate &date)
{
- QString dtstring = QString( "<qt><center><b><i>%1</i></b> " )
+ TQString dtstring = TQString( "<qt><center><b><i>%1</i></b> " )
.arg( KGlobal::locale()->formatDate(date) );
dtstring += " <font size=\"-1\"><a href=\"#\">" +
@@ -99,9 +99,9 @@ void JournalDateEntry::setDate(const QDate &date)
void JournalDateEntry::clear()
{
- QValueList<JournalEntry*> values( mEntries.values() );
+ TQValueList<JournalEntry*> values( mEntries.values() );
- QValueList<JournalEntry*>::Iterator it = values.begin();
+ TQValueList<JournalEntry*>::Iterator it = values.begin();
for ( ; it != values.end(); ++it ) {
delete (*it);
}
@@ -111,7 +111,7 @@ void JournalDateEntry::clear()
// should only be called by the KOJournalView now.
void JournalDateEntry::addJournal( Journal *j )
{
- QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( j );
+ TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( j );
if ( pos != mEntries.end() ) return;
JournalEntry *entry = new JournalEntry( j, this );
@@ -120,23 +120,23 @@ void JournalDateEntry::addJournal( Journal *j )
entry->setIncidenceChanger( mChanger );
mEntries.insert( j, entry );
- connect( this, SIGNAL( setIncidenceChangerSignal( IncidenceChangerBase * ) ),
- entry, SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) );
- connect( this, SIGNAL( setDateSignal( const QDate & ) ),
- entry, SLOT( setDate( const QDate & ) ) );
- connect( this, SIGNAL( flushEntries() ),
- entry, SLOT( flushEntry() ) );
- connect( entry, SIGNAL( deleteIncidence( Incidence* ) ),
- this, SIGNAL( deleteIncidence( Incidence* ) ) );
- connect( entry, SIGNAL( editIncidence( Incidence* ) ),
- this, SIGNAL( editIncidence( Incidence* ) ) );
+ connect( this, TQT_SIGNAL( setIncidenceChangerSignal( IncidenceChangerBase * ) ),
+ entry, TQT_SLOT( setIncidenceChanger( IncidenceChangerBase * ) ) );
+ connect( this, TQT_SIGNAL( setDateSignal( const TQDate & ) ),
+ entry, TQT_SLOT( setDate( const TQDate & ) ) );
+ connect( this, TQT_SIGNAL( flushEntries() ),
+ entry, TQT_SLOT( flushEntry() ) );
+ connect( entry, TQT_SIGNAL( deleteIncidence( Incidence* ) ),
+ this, TQT_SIGNAL( deleteIncidence( Incidence* ) ) );
+ connect( entry, TQT_SIGNAL( editIncidence( Incidence* ) ),
+ this, TQT_SIGNAL( editIncidence( Incidence* ) ) );
}
Journal::List JournalDateEntry::journals() const
{
- QValueList<Journal*> jList( mEntries.keys() );
+ TQValueList<Journal*> jList( mEntries.keys() );
Journal::List l;
- QValueList<Journal*>::Iterator it = jList.begin();
+ TQValueList<Journal*>::Iterator it = jList.begin();
for ( ; it != jList.end(); ++it ) {
l.append( *it );
}
@@ -156,7 +156,7 @@ void JournalDateEntry::emitNewJournal()
void JournalDateEntry::journalEdited( Journal *journal )
{
- QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
+ TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
if ( pos == mEntries.end() ) return;
pos.data()->setJournal( journal );
@@ -165,7 +165,7 @@ void JournalDateEntry::journalEdited( Journal *journal )
void JournalDateEntry::journalDeleted( Journal *journal )
{
- QMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
+ TQMap<Journal*,JournalEntry*>::Iterator pos = mEntries.find( journal );
if ( pos == mEntries.end() ) return;
delete pos.data();
@@ -175,8 +175,8 @@ void JournalDateEntry::journalDeleted( Journal *journal )
-JournalEntry::JournalEntry( Journal* j, QWidget *parent ) :
- QWidget( parent ), mJournal( j )
+JournalEntry::JournalEntry( Journal* j, TQWidget *parent ) :
+ TQWidget( parent ), mJournal( j )
{
//kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl;
mDirty = false;
@@ -184,65 +184,65 @@ JournalEntry::JournalEntry( Journal* j, QWidget *parent ) :
mChanger = 0;
mReadOnly = false;
- mLayout = new QGridLayout( this );
+ mLayout = new TQGridLayout( this );
mLayout->setSpacing( KDialog::spacingHint() );
mLayout->setMargin( KDialog::marginHint() );
- QString whatsThis = i18n("Sets the Title of this journal entry.");
+ TQString whatsThis = i18n("Sets the Title of this journal entry.");
- mTitleLabel = new QLabel( i18n("&Title: "), this );
+ mTitleLabel = new TQLabel( i18n("&Title: "), this );
mLayout->addWidget( mTitleLabel, 0, 0 );
mTitleEdit = new KLineEdit( this );
mLayout->addWidget( mTitleEdit, 0, 1 );
mTitleLabel->setBuddy( mTitleEdit );
- QWhatsThis::add( mTitleLabel, whatsThis );
- QWhatsThis::add( mTitleEdit, whatsThis );
+ TQWhatsThis::add( mTitleLabel, whatsThis );
+ TQWhatsThis::add( mTitleEdit, whatsThis );
- mTimeCheck = new QCheckBox( i18n("Ti&me: "), this );
+ mTimeCheck = new TQCheckBox( i18n("Ti&me: "), this );
mLayout->addWidget( mTimeCheck, 0, 2 );
mTimeEdit = new KTimeEdit( this );
mLayout->addWidget( mTimeEdit, 0, 3 );
- connect( mTimeCheck, SIGNAL(toggled(bool)),
- this, SLOT(timeCheckBoxToggled(bool)) );
- QWhatsThis::add( mTimeCheck, i18n("Determines whether this journal entry has "
+ connect( mTimeCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(timeCheckBoxToggled(bool)) );
+ TQWhatsThis::add( mTimeCheck, i18n("Determines whether this journal entry has "
"a time associated with it") );
- QWhatsThis::add( mTimeEdit, i18n( "Sets the time associated with this journal "
+ TQWhatsThis::add( mTimeEdit, i18n( "Sets the time associated with this journal "
"entry" ) );
- mDeleteButton = new QToolButton( this, "deleteButton" );
- QPixmap pix = KOGlobals::self()->smallIcon( "editdelete" );
+ mDeleteButton = new TQToolButton( this, "deleteButton" );
+ TQPixmap pix = KOGlobals::self()->smallIcon( "editdelete" );
mDeleteButton->setPixmap( pix );
- mDeleteButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mDeleteButton, i18n("Delete this journal entry") );
- QWhatsThis::add( mDeleteButton, i18n("Delete this journal entry") );
+ mDeleteButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mDeleteButton, i18n("Delete this journal entry") );
+ TQWhatsThis::add( mDeleteButton, i18n("Delete this journal entry") );
mLayout->addWidget( mDeleteButton, 0, 4 );
- connect( mDeleteButton, SIGNAL(pressed()), this, SLOT(deleteItem()) );
+ connect( mDeleteButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(deleteItem()) );
- mEditButton = new QToolButton( this, "editButton" );
+ mEditButton = new TQToolButton( this, "editButton" );
mEditButton->setPixmap( KOGlobals::self()->smallIcon( "edit" ) );
- mEditButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mEditButton, i18n("Edit this journal entry") );
- QWhatsThis::add( mEditButton, i18n("Opens an editor dialog for this journal entry") );
+ mEditButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mEditButton, i18n("Edit this journal entry") );
+ TQWhatsThis::add( mEditButton, i18n("Opens an editor dialog for this journal entry") );
mLayout->addWidget( mEditButton, 0, 5 );
- connect( mEditButton, SIGNAL(clicked()), this, SLOT( editItem() ) );
+ connect( mEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( editItem() ) );
#ifndef KORG_NOPRINTER
- mPrintButton = new QToolButton( this, "printButton" );
+ mPrintButton = new TQToolButton( this, "printButton" );
mPrintButton->setPixmap( KOGlobals::self()->smallIcon( "printer1" ) );
- mPrintButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- QToolTip::add( mPrintButton, i18n("Print this journal entry") );
- QWhatsThis::add( mPrintButton, i18n("Opens the print dialog for this journal entry") );
+ mPrintButton->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ TQToolTip::add( mPrintButton, i18n("Print this journal entry") );
+ TQWhatsThis::add( mPrintButton, i18n("Opens the print dialog for this journal entry") );
mLayout->addWidget( mPrintButton, 0, 6 );
- connect( mPrintButton, SIGNAL(clicked()), this, SLOT( printItem() ) );
+ connect( mPrintButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( printItem() ) );
#endif
mEditor = new KTextEdit(this);
mLayout->addMultiCellWidget( mEditor, 1, 2, 0, 6 );
- connect( mTitleEdit, SIGNAL(textChanged( const QString& )), SLOT(setDirty()) );
- connect( mTimeCheck, SIGNAL(toggled(bool)), SLOT(setDirty()) );
- connect( mTimeEdit, SIGNAL(timeChanged(QTime)), SLOT(setDirty()) );
- connect( mEditor, SIGNAL(textChanged()), SLOT(setDirty()) );
+ connect( mTitleEdit, TQT_SIGNAL(textChanged( const TQString& )), TQT_SLOT(setDirty()) );
+ connect( mTimeCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setDirty()) );
+ connect( mTimeEdit, TQT_SIGNAL(timeChanged(TQTime)), TQT_SLOT(setDirty()) );
+ connect( mEditor, TQT_SIGNAL(textChanged()), TQT_SLOT(setDirty()) );
mEditor->installEventFilter(this);
@@ -282,13 +282,13 @@ void JournalEntry::printItem()
if ( mJournal ) {
KOCoreHelper helper;
CalPrinter printer( this, 0, &helper );
- connect( this, SIGNAL(configChanged()), &printer, SLOT(updateConfig()) );
+ connect( this, TQT_SIGNAL(configChanged()), &printer, TQT_SLOT(updateConfig()) );
Incidence::List selectedIncidences;
selectedIncidences.append( mJournal );
printer.print( KOrg::CalPrinterBase::Incidence,
- QDate(), QDate(), selectedIncidences );
+ TQDate(), TQDate(), selectedIncidences );
}
#endif
}
@@ -304,7 +304,7 @@ void JournalEntry::setReadOnly( bool readonly )
}
-void JournalEntry::setDate(const QDate &date)
+void JournalEntry::setDate(const TQDate &date)
{
writeJournal();
mDate = date;
@@ -328,15 +328,15 @@ void JournalEntry::setDirty()
kdDebug(5850) << "JournalEntry::setDirty()" << endl;
}
-bool JournalEntry::eventFilter( QObject *o, QEvent *e )
+bool JournalEntry::eventFilter( TQObject *o, TQEvent *e )
{
// kdDebug(5850) << "JournalEntry::event received " << e->type() << endl;
- if ( e->type() == QEvent::FocusOut || e->type() == QEvent::Hide ||
- e->type() == QEvent::Close ) {
+ if ( e->type() == TQEvent::FocusOut || e->type() == TQEvent::Hide ||
+ e->type() == TQEvent::Close ) {
writeJournal();
}
- return QWidget::eventFilter( o, e ); // standard event processing
+ return TQWidget::eventFilter( o, e ); // standard event processing
}
@@ -358,8 +358,8 @@ void JournalEntry::writeJournalPrivate( Journal *j )
{
j->setSummary( mTitleEdit->text() );
bool hasTime = mTimeCheck->isChecked();
- QTime tm( mTimeEdit->getTime() );
- j->setDtStart( QDateTime( mDate, hasTime?tm:QTime(0,0,0) ) );
+ TQTime tm( mTimeEdit->getTime() );
+ j->setDtStart( TQDateTime( mDate, hasTime?tm:TQTime(0,0,0) ) );
j->setFloats( !hasTime );
j->setDescription( mEditor->text() );
}