annotate src/settingsdialog.h @ 682:751b21af6b6f

Work around font mis-hinting when scaled on Windows
author Chris Cannam
date Fri, 07 Dec 2018 14:29:23 +0000
parents ae67ea0af696
children
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@644 8 Copyright (c) 2013 Chris Cannam
Chris@644 9 Copyright (c) 2013 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@642 38 PathsTab,
Chris@642 39 ExtensionsTab
Chris@472 40 };
Chris@472 41
Chris@175 42 SettingsDialog(QWidget *parent = 0);
Chris@230 43
Chris@472 44 void setCurrentTab(Tab tab);
Chris@472 45
Chris@230 46 bool presentationChanged() {
Chris@230 47 return m_presentationChanged;
Chris@230 48 }
Chris@239 49
Chris@239 50 static void findDefaultLocations(QString installPath = m_installPath);
Chris@240 51 static QString getUnbundledExtensionFileName();
Chris@175 52
Chris@175 53 private slots:
Chris@175 54 void hgPathBrowse();
Chris@175 55 void diffPathBrowse();
Chris@175 56 void mergePathBrowse();
chris@406 57 void sshPathBrowse();
Chris@176 58 void extensionPathBrowse();
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
sam@634 75 QPushButton *m_extensionBrowse;
sam@634 76
sam@634 77 QCheckBox *m_multipleDiffInstances;
Chris@176 78 QCheckBox *m_useExtension;
Chris@195 79 QLineEdit *m_extensionPathLabel;
Chris@176 80
Chris@230 81 QCheckBox *m_showIconLabels;
Chris@230 82 QCheckBox *m_showExtraText;
sam@634 83 QCheckBox *m_showHistoryAutomatically;
Chris@273 84 QComboBox *m_dateFormat;
mikel@617 85
mikel@617 86 QDateEdit *m_dateFrom;
mikel@617 87
Chris@273 88 #ifdef NOT_IMPLEMENTED_YET
Chris@273 89 QComboBox *m_workHistoryArrangement;
Chris@273 90 #endif
Chris@230 91
Chris@175 92 QPushButton *m_ok;
Chris@181 93
Chris@230 94 bool m_presentationChanged;
Chris@230 95
Chris@195 96 void browseFor(QString, QLineEdit *);
Chris@239 97
Chris@239 98 static void findHgBinaryName();
Chris@239 99 static void findExtension();
Chris@239 100 static void findDiffBinaryName();
Chris@239 101 static void findMergeBinaryName();
chris@406 102 static void findSshBinaryName();
Chris@239 103
Chris@239 104 static QString m_installPath;
Chris@175 105 };
Chris@175 106
Chris@175 107 #endif