logactivitiesdialog.h 1.49 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
  Copyright (c) 2017 Montel Laurent <montel@kde.org>

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License, version 2, as
  published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef LOGACTIVITIESDIALOG_H
#define LOGACTIVITIESDIALOG_H

#include <QDialog>
Laurent Montel's avatar
Laurent Montel committed
22
#include "pimcommon_private_export.h"
Laurent Montel's avatar
Laurent Montel committed
23
class QPushButton;
Laurent Montel's avatar
Laurent Montel committed
24
class QCheckBox;
25 26
namespace PimCommon
{
Laurent Montel's avatar
Laurent Montel committed
27
class LogActivitiesWidget;
Laurent Montel's avatar
Laurent Montel committed
28
class PIMCOMMON_TESTS_EXPORT LogActivitiesDialog : public QDialog
29
{
Laurent Montel's avatar
Laurent Montel committed
30
    Q_OBJECT
31 32 33
public:
    explicit LogActivitiesDialog(QWidget *parent = nullptr);
    ~LogActivitiesDialog();
Laurent Montel's avatar
Laurent Montel committed
34 35

    void setLog(const QString &str);
Laurent Montel's avatar
Laurent Montel committed
36 37 38 39

Q_SIGNALS:
    void logCleared();

Laurent Montel's avatar
Laurent Montel committed
40
private:
Laurent Montel's avatar
Laurent Montel committed
41
    void slotSave();
Laurent Montel's avatar
Laurent Montel committed
42
    void slotClear();
Laurent Montel's avatar
Laurent Montel committed
43 44
    void readConfig();
    void writeConfig();
Laurent Montel's avatar
Laurent Montel committed
45 46
    void slotLogEntryCleared();
    void slotLogEntryAdded(const QString &entry);
Laurent Montel's avatar
Laurent Montel committed
47
    void slotEnableLogActivities(bool state);
Laurent Montel's avatar
Laurent Montel committed
48

Laurent Montel's avatar
Laurent Montel committed
49
    LogActivitiesWidget *mLogWidget;
Laurent Montel's avatar
Laurent Montel committed
50
    QPushButton *mClearButton;
Laurent Montel's avatar
Laurent Montel committed
51
    QCheckBox *mEnableLogActivities;
52 53 54 55
};
}

#endif // LOGACTIVITIESDIALOG_H