TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

folderdiaquotatab.h 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // -*- mode: C++; c-file-style: "gnu" -*-
  2. /**
  3. * folderdiaquotatab.h
  4. *
  5. * Copyright (c) 2006 Till Adam <adam@kde.org>
  6. *
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; version 2 of the License
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  20. *
  21. * In addition, as a special exception, the copyright holders give
  22. * permission to link the code of this program with any edition of
  23. * the TQt library by Trolltech AS, Norway (or with modified versions
  24. * of TQt that use the same license as TQt), and distribute linked
  25. * combinations including the two. You must obey the GNU General
  26. * Public License in all respects for all of the code used other than
  27. * TQt. If you modify this file, you may extend this exception to
  28. * your version of the file, but you are not obligated to do so. If
  29. * you do not wish to do so, delete this exception statement from
  30. * your version.
  31. */
  32. #ifndef FOLDERDIAQUOTA_H
  33. #define FOLDERDIAQUOTA_H
  34. #include "kmfolderdia.h"
  35. #include "kmfoldertype.h"
  36. #include "quotajobs.h"
  37. namespace KMail {
  38. class QuotaWidget;
  39. }
  40. class TQVBox;
  41. class TQWidgetStack;
  42. namespace KMail {
  43. class ImapAccountBase;
  44. /**
  45. * "Quota" tab in the folder dialog
  46. * Internal class, only used by KMFolderDialog
  47. */
  48. class FolderDiaQuotaTab : public FolderDiaTab
  49. {
  50. Q_OBJECT
  51. public:
  52. FolderDiaQuotaTab( KMFolderDialog* dlg, TQWidget* parent, const char* name = 0 );
  53. virtual void load();
  54. virtual bool save();
  55. virtual AccepStatus accept();
  56. static bool supports( KMFolder* refFolder );
  57. private:
  58. void initializeWithValuesFromFolder( KMFolder* folder );
  59. void showQuotaWidget();
  60. private slots:
  61. // Network (TDEIO) slots
  62. void slotConnectionResult( int, const TQString& );
  63. void slotReceivedQuotaInfo( KMFolder*, TDEIO::Job*, const KMail::QuotaInfo& );
  64. private:
  65. TQLabel* mLabel;
  66. KMail::QuotaWidget* mQuotaWidget;
  67. TQWidgetStack* mStack;
  68. ImapAccountBase* mImapAccount;
  69. TQString mImapPath;
  70. KMFolderDialog* mDlg;
  71. QuotaInfo mQuotaInfo;
  72. KMFolderType mFolderType;
  73. };
  74. } // end of namespace KMail
  75. #endif /* FOLDERDIAQUOTA_H */