annotate src/settingsdialog.h @ 411:d0ebd797c5a1

Ah, OK -- it seems we get escapes for backslashes generally, so handle that
author Chris Cannam
date Tue, 07 Jun 2011 11:00:16 +0100
parents c567fed39559
children 2d57b81671de
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@175 27
Chris@175 28 class SettingsDialog : public QDialog
Chris@175 29 {
Chris@175 30 Q_OBJECT
Chris@175 31
Chris@175 32 public:
Chris@175 33 SettingsDialog(QWidget *parent = 0);
Chris@230 34
Chris@230 35 bool presentationChanged() {
Chris@230 36 return m_presentationChanged;
Chris@230 37 }
Chris@239 38
Chris@239 39 static void findDefaultLocations(QString installPath = m_installPath);
Chris@240 40 static QString getUnbundledExtensionFileName();
Chris@175 41
Chris@175 42 private slots:
Chris@175 43 void hgPathBrowse();
Chris@175 44 void diffPathBrowse();
Chris@175 45 void mergePathBrowse();
chris@406 46 void sshPathBrowse();
Chris@178 47 void editPathBrowse();
Chris@176 48 void extensionPathBrowse();
Chris@175 49
Chris@175 50 void accept();
Chris@239 51 void reset();
Chris@239 52 void clear();
Chris@239 53 void restoreDefaults();
Chris@175 54
Chris@175 55 private:
Chris@175 56 QLineEdit *m_nameEdit;
Chris@175 57 QLineEdit *m_emailEdit;
Chris@195 58 QLineEdit *m_hgPathLabel;
Chris@195 59 QLineEdit *m_diffPathLabel;
Chris@195 60 QLineEdit *m_mergePathLabel;
chris@406 61 QLineEdit *m_sshPathLabel;
Chris@195 62 QLineEdit *m_editPathLabel;
Chris@175 63
Chris@176 64 QCheckBox *m_useExtension;
Chris@195 65 QLineEdit *m_extensionPathLabel;
Chris@176 66
Chris@230 67 QCheckBox *m_showIconLabels;
Chris@230 68 QCheckBox *m_showExtraText;
Chris@273 69 QComboBox *m_dateFormat;
Chris@273 70 #ifdef NOT_IMPLEMENTED_YET
Chris@273 71 QComboBox *m_workHistoryArrangement;
Chris@273 72 #endif
Chris@230 73
Chris@175 74 QPushButton *m_ok;
Chris@181 75
Chris@230 76 bool m_presentationChanged;
Chris@230 77
Chris@195 78 void browseFor(QString, QLineEdit *);
Chris@239 79
Chris@239 80 static void findHgBinaryName();
Chris@239 81 static void findExtension();
Chris@239 82 static void findDiffBinaryName();
Chris@239 83 static void findMergeBinaryName();
chris@406 84 static void findSshBinaryName();
Chris@239 85 static void findEditorBinaryName();
Chris@239 86
Chris@239 87 static QString m_installPath;
Chris@175 88 };
Chris@175 89
Chris@175 90 #endif