forked from gyunaev/birdtray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialogsettings.h
90 lines (70 loc) · 2.3 KB
/
dialogsettings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QDialog>
#include <QProgressDialog>
#include <QPalette>
#include <QtCore/QStringListModel>
#include "ui_dialogsettings.h"
#ifdef Q_OS_WIN
# define THUNDERBIRD_PROFILES_PATH "%AppData%\\Thunderbird\\Profiles"
#else
# define THUNDERBIRD_PROFILES_PATH "~/Library/Thunderbird/Profiles"
#endif
class ModelAccountTree;
class ModelNewEmails;
class DialogSettings : public QDialog, public Ui::DialogSettings
{
Q_OBJECT
public:
explicit DialogSettings(QWidget *parent = 0);
public slots:
void accept() override;
/**
* Called once the update check finished.
*
* @param hasUpdate true if a new update was found.
* @param errorMessage A message indicating an error during the check, or a null string.
*/
void onCheckUpdateFinished(bool foundUpdate, const QString &errorString);
/**
* Called when the currently viewed tab changes
*
* @param tabIndex The index of the tab that is now displayed.
*/
void activateTab(int tabIndex );
// Account buttons
/**
* Add one or multiple accounts.
*/
void accountAdd();
void accountEdit();
void accountEditIndex( const QModelIndex& index );
void accountRemove();
// New Email buttons
void newEmailAdd();
void newEmailEdit();
void newEmailEditIndex( const QModelIndex& index );
void newEmailRemove();
// Advanced buttons
void onCheckUpdateButton();
void onShowLogWindow();
// Icon change
void buttonChangeIcon();
void buttonChangeUnreadIcon();
/**
* The unread count border width changed.
* @param value The new border width.
*/
void onBorderWidthChanged(int value);
/**
* Show the translators dialog.
*/
static void onTranslatorsDialog();
private:
void changeIcon(QToolButton * button );
// Model to show the accounts
ModelAccountTree * mAccountModel;
// Model to show new emails
ModelNewEmails * mModelNewEmails;
};
#endif // SETTINGSDIALOG_H