annotate src/settingsdialog.h @ 502:ba924fc4790a

Added tag easyhg_v1.0 for changeset 6bb2a1f3087c
author Chris Cannam
date Tue, 23 Aug 2011 12:05:48 +0100
parents 7e8688784980
children 533519ebc0cb
rev   line source
Chris@175 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@175 2
Chris@175 3 /*
Chris@175 4 EasyMercurial
Chris@175 5
Chris@175 6 Based on HgExplorer by Jari Korhonen
Chris@175 7 Copyright (c) 2010 Jari Korhonen
Chris@244 8 Copyright (c) 2011 Chris Cannam
Chris@244 9 Copyright (c) 2011 Queen Mary, University of London
Chris@175 10
Chris@175 11 This program is free software; you can redistribute it and/or
Chris@175 12 modify it under the terms of the GNU General Public License as
Chris@175 13 published by the Free Software Foundation; either version 2 of the
Chris@175 14 License, or (at your option) any later version. See the file
Chris@175 15 COPYING included with this distribution for more information.
Chris@175 16 */
Chris@175 17
Chris@175 18 #ifndef SETTINGS_DIALOG_H
Chris@175 19 #define SETTINGS_DIALOG_H
Chris@175 20
Chris@175 21 #include <QDialog>
Chris@175 22 #include <QLineEdit>
Chris@175 23 #include <QLabel>
Chris@175 24 #include <QPushButton>
Chris@176 25 #include <QCheckBox>
Chris@273 26 #include <QComboBox>
Chris@472 27 #include <QTabWidget>
Chris@175 28
Chris@175 29 class SettingsDialog : public QDialog
Chris@175 30 {
Chris@175 31 Q_OBJECT
Chris@175 32
Chris@175 33 public:
Chris@472 34 enum Tab {
Chris@472 35 PersonalDetailsTab,
Chris@472 36 PresentationTab,
Chris@472 37 PathsTab
Chris@472 38 };
Chris@472 39
Chris@175 40 SettingsDialog(QWidget *parent = 0);
Chris@230 41
Chris@472 42 void setCurrentTab(Tab tab);
Chris@472 43
Chris@230 44 bool presentationChanged() {
Chris@230 45 return m_presentationChanged;
Chris@230 46 }
Chris@239 47
Chris@239 48 static void findDefaultLocations(QString installPath = m_installPath);
Chris@240 49 static QString getUnbundledExtensionFileName();
Chris@175 50
Chris@175 51 private slots:
Chris@175 52 void hgPathBrowse();
Chris@175 53 void diffPathBrowse();
Chris@175 54 void mergePathBrowse();
chris@406 55 void sshPathBrowse();
Chris@176 56 void extensionPathBrowse();
Chris@175 57
Chris@175 58 void accept();
Chris@239 59 void reset();
Chris@239 60 void clear();
Chris@239 61 void restoreDefaults();
Chris@175 62
Chris@175 63 private:
Chris@472 64 QTabWidget *m_tabs;
Chris@472 65
Chris@175 66 QLineEdit *m_nameEdit;
Chris@175 67 QLineEdit *m_emailEdit;
Chris@195 68 QLineEdit *m_hgPathLabel;
Chris@195 69 QLineEdit *m_diffPathLabel;
Chris@195 70 QLineEdit *m_mergePathLabel;
chris@406 71 QLineEdit *m_sshPathLabel;
Chris@175 72
Chris@176 73 QCheckBox *m_useExtension;
Chris@195 74 QLineEdit *m_extensionPathLabel;
Chris@176 75
Chris@230 76 QCheckBox *m_showIconLabels;
Chris@230 77 QCheckBox *m_showExtraText;
Chris@273 78 QComboBox *m_dateFormat;
Chris@273 79 #ifdef NOT_IMPLEMENTED_YET
Chris@273 80 QComboBox *m_workHistoryArrangement;
Chris@273 81 #endif
Chris@230 82
Chris@175 83 QPushButton *m_ok;
Chris@181 84
Chris@230 85 bool m_presentationChanged;
Chris@230 86
Chris@195 87 void browseFor(QString, QLineEdit *);
Chris@239 88
Chris@239 89 static void findHgBinaryName();
Chris@239 90 static void findExtension();
Chris@239 91 static void findDiffBinaryName();
Chris@239 92 static void findMergeBinaryName();
chris@406 93 static void findSshBinaryName();
Chris@239 94
Chris@239 95 static QString m_installPath;
Chris@175 96 };
Chris@175 97
Chris@175 98 #endif