From 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/kmatmlistview.h | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 kmail/kmatmlistview.h (limited to 'kmail/kmatmlistview.h') diff --git a/kmail/kmatmlistview.h b/kmail/kmatmlistview.h new file mode 100644 index 000000000..f50d4e398 --- /dev/null +++ b/kmail/kmatmlistview.h @@ -0,0 +1,71 @@ +/* -*- mode: C++; c-file-style: "gnu" -*- + * KMAtmListViewItem Header File + * Author: Markus Wuebben + */ +#ifndef __KMAIL_KMATMLISTVIEW_H__ +#define __KMAIL_KMATMLISTVIEW_H__ + +#include +#include + +class KMComposeWin; +class MessageComposer; +class QCheckBox; + +class KMAtmListViewItem : public QObject, public QListViewItem +{ + Q_OBJECT + +public: + KMAtmListViewItem( QListView *parent ); + virtual ~KMAtmListViewItem(); + + //A custom compare function is needed because the size column is + //human-readable and therefore doesn't sort correctly. + virtual int compare( QListViewItem *i, int col, bool ascending ) const; + + virtual void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ); + + void setUncompressedMimeType( const QCString & type, const QCString & subtype ) { + mType = type; mSubtype = subtype; + } + void setAttachmentSize( int numBytes ) { + mAttachmentSize = numBytes; + } + void uncompressedMimeType( QCString & type, QCString & subtype ) const { + type = mType; subtype = mSubtype; + } + void setUncompressedCodec( const QCString &codec ) { mCodec = codec; } + QCString uncompressedCodec() const { return mCodec; } + + void enableCryptoCBs( bool on ); + void setEncrypt( bool on ); + bool isEncrypt(); + void setSign( bool on ); + bool isSign(); + void setCompress( bool on ); + bool isCompress(); + +signals: + void compress( int ); + void uncompress( int ); + +private slots: + void slotCompress(); + void slotHeaderChange( int, int, int ); + void slotHeaderClick( int ); + +protected: + + void updateCheckBox( int headerSection, QCheckBox *cb ); + void updateAllCheckBoxes(); + +private: + QCheckBox *mCBEncrypt; + QCheckBox *mCBSign; + QCheckBox *mCBCompress; + QCString mType, mSubtype, mCodec; + int mAttachmentSize; +}; + +#endif // __KMAIL_KMATMLISTVIEW_H__ -- cgit v1.2.1