Fix typo found by Yuri Chornoivan
[kdepim.git] / knode / kncleanup.h
blobdc363bbefaaadfae785a34eac339bf599bfe2720
1 /*
2 KNode, the KDE newsreader
3 Copyright (c) 1999-2005 the KNode authors.
4 See file AUTHORS for details
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 You should have received a copy of the GNU General Public License
11 along with this program; if not, write to the Free Software Foundation,
12 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
15 #ifndef KNCLEANUP_H
16 #define KNCLEANUP_H
18 #include <QList>
20 #include <KDialog>
22 class QProgressBar;
23 class QCloseEvent;
24 class QLabel;
26 class KNArticleCollection;
27 class KNGroup;
28 class KNFolder;
30 namespace KNode {
31 class Cleanup;
35 /** This class handles group expiration and folder compaction. */
36 class KNCleanUp {
38 public:
39 KNCleanUp();
40 ~KNCleanUp();
42 void appendCollection(KNArticleCollection *c) { mColList.append( c ); }
43 void start();
44 void reset();
46 void expireGroup( KNGroup *g, bool showResult = false );
47 /** Compacts the given folder, ie. remove all deleted messages from the
48 * mbox file.
49 * @param f The folder to compact.
51 void compactFolder(KNFolder *f);
53 protected:
55 /** Cleanup progress dialog. */
56 class ProgressDialog : public KDialog {
58 public:
59 /** Creates a new progress dialog.
60 * @param steps The number of progress steps.
61 * @param parent The parent widget.
63 ProgressDialog( int steps, QWidget *parent = 0 );
64 ~ProgressDialog();
66 /** Shows a message in the progress dialog.
67 * @param s The message to show.
69 void showMessage(const QString &s);
70 /** Increments the progress counter by one. */
71 void doProgress();
73 protected:
74 void closeEvent(QCloseEvent *e);
76 QLabel *m_sg;
77 QProgressBar *mProgressBar;
80 ProgressDialog *d_lg;
81 QList<KNArticleCollection*> mColList;
85 #endif