annotate src/settingsdialog.h @ 633:db62a0cb3037

* Added setting to specify that diff command should be run once for each selected file, rather than passing all file names to diff command (p4merge doesn't like being given many files)
author Sam Izzo <sam@humbug.net>
date Mon, 27 Aug 2012 01:26:57 +1000
parents 5dc24f89b791
children 58ac1b197666
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@560 8 Copyright (c) 2012 Chris Cannam
Chris@560 9 Copyright (c) 2012 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>
mikel@617 28 #include <QDateEdit>
Chris@175 29
Chris@175 30 class SettingsDialog : public QDialog
Chris@175 31 {
Chris@175 32 Q_OBJECT
Chris@175 33
Chris@175 34 public:
Chris@472 35 enum Tab {
Chris@472 36 PersonalDetailsTab,
Chris@472 37 PresentationTab,
Chris@472 38 PathsTab
Chris@472 39 };
Chris@472 40
Chris@175 41 SettingsDialog(QWidget *parent = 0);
Chris@230 42
Chris@472 43 void setCurrentTab(Tab tab);
Chris@472 44
Chris@230 45 bool presentationChanged() {
Chris@230 46 return m_presentationChanged;
Chris@230 47 }
Chris@239 48
Chris@239 49 static void findDefaultLocations(QString installPath = m_installPath);
Chris@240 50 static QString getUnbundledExtensionFileName();
Chris@175 51
Chris@175 52 private slots:
Chris@175 53 void hgPathBrowse();
Chris@175 54 void diffPathBrowse();
Chris@175 55 void mergePathBrowse();
chris@406 56 void sshPathBrowse();
Chris@176 57 void extensionPathBrowse();
sam@628 58 void useExtension(int);
Chris@175 59
Chris@175 60 void accept();
Chris@239 61 void reset();
Chris@239 62 void clear();
Chris@239 63 void restoreDefaults();
Chris@175 64
Chris@175 65 private:
Chris@472 66 QTabWidget *m_tabs;
Chris@472 67
Chris@175 68 QLineEdit *m_nameEdit;
Chris@175 69 QLineEdit *m_emailEdit;
Chris@195 70 QLineEdit *m_hgPathLabel;
Chris@195 71 QLineEdit *m_diffPathLabel;
Chris@195 72 QLineEdit *m_mergePathLabel;
chris@406 73 QLineEdit *m_sshPathLabel;
Chris@175 74
Chris@176 75 QCheckBox *m_useExtension;
Chris@195 76 QLineEdit *m_extensionPathLabel;
Chris@176 77
Chris@230 78 QCheckBox *m_showIconLabels;
Chris@230 79 QCheckBox *m_showExtraText;
Chris@273 80 QComboBox *m_dateFormat;
mikel@617 81
mikel@617 82 QDateEdit *m_dateFrom;
mikel@617 83
Chris@273 84 #ifdef NOT_IMPLEMENTED_YET
Chris@273 85 QComboBox *m_workHistoryArrangement;
Chris@273 86 #endif
Chris@230 87
sam@633 88 QCheckBox *m_multipleDiffInstances;
sam@633 89
sam@628 90 QPushButton *m_extensionBrowse;
Chris@175 91 QPushButton *m_ok;
Chris@181 92
Chris@230 93 bool m_presentationChanged;
Chris@230 94
Chris@195 95 void browseFor(QString, QLineEdit *);
Chris@239 96
Chris@239 97 static void findHgBinaryName();
Chris@239 98 static void findExtension();
Chris@239 99 static void findDiffBinaryName();
Chris@239 100 static void findMergeBinaryName();
chris@406 101 static void findSshBinaryName();
Chris@239 102
Chris@239 103 static QString m_installPath;
Chris@175 104 };
Chris@175 105
Chris@175 106 #endif