summaryrefslogtreecommitdiffstats
path: root/kmail/kmatmlistview.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kmail/kmatmlistview.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
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
Diffstat (limited to 'kmail/kmatmlistview.h')
-rw-r--r--kmail/kmatmlistview.h71
1 files changed, 71 insertions, 0 deletions
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 <markus.wuebben@kde.org>
+ */
+#ifndef __KMAIL_KMATMLISTVIEW_H__
+#define __KMAIL_KMATMLISTVIEW_H__
+
+#include <qlistview.h>
+#include <qcstring.h>
+
+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__