diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /korganizer/koeditorattachments.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/koeditorattachments.cpp')
-rw-r--r-- | korganizer/koeditorattachments.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/korganizer/koeditorattachments.cpp b/korganizer/koeditorattachments.cpp index 19a75a992..ddade8815 100644 --- a/korganizer/koeditorattachments.cpp +++ b/korganizer/koeditorattachments.cpp @@ -19,8 +19,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include "koeditorattachments.h" @@ -73,8 +73,8 @@ class AttachmentListItem : public KIconViewItem { public: - AttachmentListItem( KCal::Attachment*att, TQIconView *parent ) : - KIconViewItem( parent ) + AttachmentListItem( KCal::Attachment*att, TQIconView *tqparent ) : + KIconViewItem( tqparent ) { if ( att ) { mAttachment = new KCal::Attachment( *att ); @@ -151,7 +151,7 @@ class AttachmentListItem : public KIconViewItem if ( mAttachment->isUri() ) { mimeType = KMimeType::findByURL( mAttachment->uri() ); } else { - mimeType = KMimeType::tqfindByContent( mAttachment->decodedData() ); + mimeType = KMimeType::findByContent( mAttachment->decodedData() ); } mAttachment->setMimeType( mimeType->name() ); } @@ -164,8 +164,8 @@ class AttachmentListItem : public KIconViewItem }; AttachmentEditDialog::AttachmentEditDialog( AttachmentListItem *item, - TQWidget *parent ) - : KDialogBase ( Plain, i18n( "Add Attachment" ), Ok|Cancel, Ok, parent, 0, false, false ), + TQWidget *tqparent ) + : KDialogBase ( Plain, i18n( "Add Attachment" ), Ok|Cancel, Ok, tqparent, 0, false, false ), mItem( item ), mURLRequester( 0 ) { TQFrame *topFrame = plainPage(); @@ -313,16 +313,16 @@ void AttachmentEditDialog::urlSelected( const TQString &url ) mIcon->setPixmap( AttachmentListItem::icon( mMimeType, kurl.path() ) ); } -AttachmentIconView::AttachmentIconView( KOEditorAttachments* parent ) - : KIconView( parent ), - mParent( parent ) +AttachmentIconView::AttachmentIconView( KOEditorAttachments* tqparent ) + : KIconView( tqparent ), + mParent( tqparent ) { setSelectionMode( TQIconView::Extended ); setMode( KIconView::Select ); setItemTextPos( TQIconView::Right ); setArrangement( TQIconView::LeftToRight ); - setMaxItemWidth( QMAX(maxItemWidth(), 250) ); - setMinimumHeight( QMAX(fontMetrics().height(), 16) + 12 ); + setMaxItemWidth( TQMAX(maxItemWidth(), 250) ); + setMinimumHeight( TQMAX(fontMetrics().height(), 16) + 12 ); connect( this, TQT_SIGNAL( dropped ( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), this, TQT_SLOT( handleDrop( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ) ); @@ -337,10 +337,10 @@ KURL AttachmentIconView::tempFileForAttachment( KCal::Attachment *attachment ) KTempFile *file; if ( !patterns.empty() ) { - file = new KTempFile( TQString::null, + file = new KTempFile( TQString(), TQString( patterns.first() ).remove( '*' ),0600 ); } else { - file = new KTempFile( TQString::null, TQString::null, 0600 ); + file = new KTempFile( TQString(), TQString(), 0600 ); } file->setAutoDelete( true ); file->file()->open( IO_WriteOnly ); @@ -447,9 +447,9 @@ void AttachmentIconView::dragEnterEvent( TQDragEnterEvent *event ) mParent->dragEnterEvent( event ); } -KOEditorAttachments::KOEditorAttachments( int spacing, TQWidget *parent, +KOEditorAttachments::KOEditorAttachments( int spacing, TQWidget *tqparent, const char *name ) - : TQWidget( parent, name ) + : TQWidget( tqparent, name ) { TQBoxLayout *topLayout = new TQHBoxLayout( this ); topLayout->setSpacing( spacing ); @@ -574,7 +574,7 @@ void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source ) TQStringList lst = TQStringList::split( '\n', text, FALSE ); for ( TQStringList::ConstIterator it = lst.constBegin(); it != lst.constEnd(); ++it ) { urls.append( *it ); - labels.append( TQString::null ); + labels.append( TQString() ); } probablyWeHaveUris = true; } @@ -609,7 +609,7 @@ void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source ) if ( mAttachments->findItem( label ) ) { label += '~' + randomString( 3 ); } - addUriAttachment( (*it).url(), TQString::null, label, true ); + addUriAttachment( (*it).url(), TQString(), label, true ); } } else if ( action != DRAG_CANCEL ) { if ( probablyWeHaveUris ) { @@ -622,7 +622,7 @@ void KOEditorAttachments::handlePasteOrDrop( TQMimeSource* source ) if ( mAttachments->findItem( label ) ) { label += '~' + randomString( 3 ); } - addUriAttachment( (*it).url(), TQString::null, label, true ); + addUriAttachment( (*it).url(), TQString(), label, true ); } } else { // we take anything addDataAttachment( source->tqencodedData( source->format() ), @@ -675,7 +675,7 @@ void KOEditorAttachments::slotAddData() if ( label.isEmpty() ) { label = uri.prettyURL(); } - addUriAttachment( uri.url(), TQString::null, label, true ); + addUriAttachment( uri.url(), TQString(), label, true ); } } @@ -833,7 +833,7 @@ void KOEditorAttachments::addDataAttachment( const TQByteArray &data, item->setData( data ); item->setLabel( nlabel ); if ( mimeType.isEmpty() ) { - item->setMimeType( KMimeType::tqfindByContent( data )->name() ); + item->setMimeType( KMimeType::findByContent( data )->name() ); } else { item->setMimeType( mimeType ); } @@ -874,7 +874,7 @@ void KOEditorAttachments::writeIncidence( KCal::Incidence *i ) void KOEditorAttachments::slotCopy() { - TQApplication::clipboard()->setData( mAttachments->mimeData(), QClipboard::Clipboard ); + TQApplication::clipboard()->setData( mAttachments->mimeData(), TQClipboard::Clipboard ); } void KOEditorAttachments::slotCut() |