Show webfinger if displayName is unknown for an author.
[larjonas-pumpa.git] / src / pumpasettingsdialog.h
blob38cbd227031f6fee29659b1530165d3d0e3dca84
1 /*
2 Copyright 2013-2015 Mats Sjöberg
4 This file is part of the Pumpa programme.
6 Pumpa is free software: you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Pumpa is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Pumpa. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _PUMPASETTINGSDIALOG_H_
21 #define _PUMPASETTINGSDIALOG_H_
23 #include <QDialog>
24 #include <QDialogButtonBox>
25 #include <QPushButton>
26 #include <QVBoxLayout>
27 #include <QFormLayout>
28 #include <QGroupBox>
29 #include <QLabel>
30 #include <QSpinBox>
31 #include <QCheckBox>
32 #include <QComboBox>
33 #include "pumpasettings.h"
35 class PumpaSettingsDialog : public QDialog {
36 Q_OBJECT
38 public:
39 PumpaSettingsDialog(PumpaSettings* settings, QWidget* parent=0);
41 static int comboIndexToFeedInt(int i) {
42 return comboIndexConverter(i, false);
44 static int feedIntToComboIndex(int i) {
45 return comboIndexConverter(i, true);
48 signals:
49 void newAccount();
51 private slots:
52 void onOKClicked();
53 // void on_buttonBox_accepted();
55 protected:
56 void setVisible(bool visible);
58 private slots:
59 void onAuthButtonClicked();
61 private:
62 static int comboIndexConverter(int i, bool backwards=false);
63 void updateUI();
64 PumpaSettings* s;
66 QLabel* m_currentAccountLabel;
67 QPushButton* m_authButton;
68 QSpinBox* m_updateTimeSpinBox;
69 QCheckBox* m_useIconCheckBox;
70 QCheckBox* m_showCharCountCheckBox;
71 QDialogButtonBox* m_buttonBox;
72 QComboBox* m_highlightComboBox;
73 QComboBox* m_popupComboBox;
74 QComboBox* m_defaultToComboBox;
75 QComboBox* m_defaultCcComboBox;
77 // QFormLayout* m_formLayout;
78 QVBoxLayout* m_layout;
81 #endif /* _PUMPASETTINGSDIALOG_H_ */