comparison src/settingsdialog.h @ 370:b9c153e00e84

Move source files to src/
author Chris Cannam
date Thu, 24 Mar 2011 10:27:51 +0000
parents settingsdialog.h@cc95394e2392
children c567fed39559
comparison
equal deleted inserted replaced
369:19cce6d2c470 370:b9c153e00e84
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 EasyMercurial
5
6 Based on HgExplorer by Jari Korhonen
7 Copyright (c) 2010 Jari Korhonen
8 Copyright (c) 2011 Chris Cannam
9 Copyright (c) 2011 Queen Mary, University of London
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2 of the
14 License, or (at your option) any later version. See the file
15 COPYING included with this distribution for more information.
16 */
17
18 #ifndef SETTINGS_DIALOG_H
19 #define SETTINGS_DIALOG_H
20
21 #include <QDialog>
22 #include <QLineEdit>
23 #include <QLabel>
24 #include <QPushButton>
25 #include <QCheckBox>
26 #include <QComboBox>
27
28 class SettingsDialog : public QDialog
29 {
30 Q_OBJECT
31
32 public:
33 SettingsDialog(QWidget *parent = 0);
34
35 bool presentationChanged() {
36 return m_presentationChanged;
37 }
38
39 static void findDefaultLocations(QString installPath = m_installPath);
40 static QString getUnbundledExtensionFileName();
41
42 private slots:
43 void hgPathBrowse();
44 void diffPathBrowse();
45 void mergePathBrowse();
46 void editPathBrowse();
47 void extensionPathBrowse();
48
49 void accept();
50 void reset();
51 void clear();
52 void restoreDefaults();
53
54 private:
55 QLineEdit *m_nameEdit;
56 QLineEdit *m_emailEdit;
57 QLineEdit *m_hgPathLabel;
58 QLineEdit *m_diffPathLabel;
59 QLineEdit *m_mergePathLabel;
60 QLineEdit *m_editPathLabel;
61
62 QCheckBox *m_useExtension;
63 QLineEdit *m_extensionPathLabel;
64
65 QCheckBox *m_showIconLabels;
66 QCheckBox *m_showExtraText;
67 QComboBox *m_dateFormat;
68 #ifdef NOT_IMPLEMENTED_YET
69 QComboBox *m_workHistoryArrangement;
70 #endif
71
72 QPushButton *m_ok;
73
74 bool m_presentationChanged;
75
76 void browseFor(QString, QLineEdit *);
77
78 static void findHgBinaryName();
79 static void findExtension();
80 static void findDiffBinaryName();
81 static void findMergeBinaryName();
82 static void findEditorBinaryName();
83
84 static QString m_installPath;
85 };
86
87 #endif