kmail

folderrequester.h
1 /*
2  * Copyright (c) 2004 Carsten Burghardt <burghardt@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16  *
17  * In addition, as a special exception, the copyright holders give
18  * permission to link the code of this program with any edition of
19  * the TQt library by Trolltech AS, Norway (or with modified versions
20  * of TQt that use the same license as TQt), and distribute linked
21  * combinations including the two. You must obey the GNU General
22  * Public License in all respects for all of the code used other than
23  * TQt. If you modify this file, you may extend this exception to
24  * your version of the file, but you are not obligated to do so. If
25  * you do not wish to do so, delete this exception statement from
26  * your version.
27  */
28 
29 #ifndef folderrequester_h
30 #define folderrequester_h
31 
32 #include <tqwidget.h>
33 #include <klineedit.h>
34 
35 class KMFolder;
36 class KMFolderTree;
37 
38 namespace KMail {
39 
46  class FolderRequester: public TQWidget
47  {
48  TQ_OBJECT
49 
50 
51  public:
57  FolderRequester( TQWidget *parent, KMFolderTree* tree );
58  virtual ~FolderRequester();
59 
61  KMFolder* folder( void ) const;
62 
64  TQString folderId() const { return mFolderId; }
65 
67  TQString text() const { return edit->originalText(); }
68 
70  void setFolder( KMFolder* );
71  void setFolder( const TQString& idString );
72 
78  void setMustBeReadWrite( bool readwrite )
79  { mMustBeReadWrite = readwrite; }
80 
82  void setShowOutbox( bool show )
83  { mShowOutbox = show; }
84 
86  void setShowImapFolders( bool show )
87  { mShowImapFolders = show; }
88 
89  protected slots:
91  void slotOpenDialog();
92 
93  signals:
96 
97  protected:
99  virtual void keyPressEvent( TQKeyEvent * e );
100 
101  protected:
102  KLineEdit* edit;
103  KMFolder* mFolder;
104  KMFolderTree* mFolderTree;
105  TQString mFolderId;
106  bool mMustBeReadWrite;
107  bool mShowOutbox;
108  bool mShowImapFolders;
109  };
110 
111 } // namespace KMail
112 
113 #endif /*folderrequester_h*/
Mail folder.
Definition: kmfolder.h:69
A widget that contains a KLineEdit which shows the current folder and a button that fires a KMFolderS...
TQString text() const
Returns current text.
FolderRequester(TQWidget *parent, KMFolderTree *tree)
Constructor.
void setShowOutbox(bool show)
Set if the outbox should be shown.
KMFolder * folder(void) const
Returns selected folder.
virtual void keyPressEvent(TQKeyEvent *e)
Capture space key to open the dialog.
void setFolder(KMFolder *)
Preset the folder.
TQString folderId() const
Returns the folder id.
void setMustBeReadWrite(bool readwrite)
Set if readonly folders should be disabled Be aware that if you disable this the user can also select...
void slotOpenDialog()
Open the folder dialog.
void setShowImapFolders(bool show)
Set if the imap folders should be shown.
void folderChanged(KMFolder *)
Emitted when the folder changed.
folderdiaquotatab.h
Definition: aboutdata.cpp:40