kmail Library API Documentation

folderdiaacltab.h

00001 // -*- mode: C++; c-file-style: "gnu" -*- 00032 #ifndef FOLDERDIAACL_H 00033 #define FOLDERDIAACL_H 00034 00035 #include "kmfolderdia.h" 00036 #include "kmfoldertype.h" 00037 00038 class KMFolderImap; 00039 class KPushButton; 00040 class QWidgetStack; 00041 class QHBox; 00042 class QVButtonGroup; 00043 class KListView; 00044 namespace KIO { class Job; } 00045 00046 namespace KMail { 00047 00048 enum IMAPUserIdFormat { FullEmail, UserName }; 00049 00050 struct ACLListEntry; 00051 typedef QValueVector<KMail::ACLListEntry> ACLList; 00052 00053 class ImapAccountBase; 00054 00059 class ACLEntryDialog :public KDialogBase { 00060 Q_OBJECT 00061 00062 public: 00063 ACLEntryDialog( IMAPUserIdFormat userIdFormat, const QString& caption, QWidget* parent, const char* name = 0 ); 00064 00065 void setValues( const QString& userId, unsigned int permissions ); 00066 00067 QString userId() const; 00068 QStringList userIds() const; 00069 unsigned int permissions() const; 00070 00071 private slots: 00072 void slotSelectAddresses(); 00073 void slotChanged(); 00074 00075 private: 00076 QVButtonGroup* mButtonGroup; 00077 KLineEdit* mUserIdLineEdit; 00078 IMAPUserIdFormat mUserIdFormat; 00079 }; 00080 00085 class FolderDiaACLTab : public FolderDiaTab 00086 { 00087 Q_OBJECT 00088 00089 public: 00090 FolderDiaACLTab( KMFolderDialog* dlg, QWidget* parent, const char* name = 0 ); 00091 00092 virtual void load(); 00093 virtual bool save(); 00094 virtual AcceptStatus accept(); 00095 00096 static bool supports( KMFolder* refFolder ); 00097 00098 private slots: 00099 // Network (KIO) slots 00100 void slotConnectionResult( int, const QString& ); 00101 void slotReceivedACL( KMFolder*, KIO::Job*, const KMail::ACLList& ); 00102 void slotMultiSetACLResult(KIO::Job *); 00103 void slotACLChanged( const QString&, int ); 00104 void slotReceivedUserRights( KMFolder* folder ); 00105 void slotDirectoryListingFinished(KMFolderImap*); 00106 00107 // User (KListView) slots 00108 void slotEditACL(QListViewItem*); 00109 void slotSelectionChanged(QListViewItem*); 00110 00111 // User (pushbuttons) slots 00112 void slotAddACL(); 00113 void slotEditACL(); 00114 void slotRemoveACL(); 00115 00116 void slotChanged( bool b ); 00117 00118 private: 00119 KURL imapURL() const; 00120 void initializeWithValuesFromFolder( KMFolder* folder ); 00121 void startListing(); 00122 void loadListView( const KMail::ACLList& aclList ); 00123 void loadFinished( const KMail::ACLList& aclList ); 00124 void addACLs( const QStringList& userIds, unsigned int permissions ); 00125 00126 private: 00127 // The widget containing the ACL widgets (listview and buttons) 00128 QHBox* mACLWidget; 00129 //class ListView; 00130 class ListViewItem; 00131 KListView* mListView; 00132 KPushButton* mAddACL; 00133 KPushButton* mEditACL; 00134 KPushButton* mRemoveACL; 00135 00136 QStringList mRemovedACLs; 00137 QString mImapPath; 00138 ImapAccountBase* mImapAccount; 00139 int mUserRights; 00140 KMFolderType mFolderType; 00141 ACLList mInitialACLList; 00142 ACLList mACLList; // to be set 00143 IMAPUserIdFormat mUserIdFormat; 00144 00145 QLabel* mLabel; 00146 QWidgetStack* mStack; 00147 KMFolderDialog* mDlg; 00148 00149 bool mChanged; 00150 bool mAccepting; // i.e. close when done 00151 bool mSaving; 00152 }; 00153 00154 } // end of namespace KMail 00155 00156 #endif /* FOLDERDIAACL_H */ 00157
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:19:17 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003