PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/settings/settingstabother.h

https://gitlab.com/vladius/photoqt
C Header | 105 lines | 62 code | 21 blank | 22 comment | 0 complexity | 66aee54040e76d503bef74f671376bb2 MD5 | raw file
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation; either version 2 of the License, or
  5. * (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License along
  13. * with this program; if not, write to the Free Software Foundation, Inc.,
  14. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #ifndef SETTINGSTABGENERAL_H
  17. #define SETTINGSTABGENERAL_H
  18. #include "../customelements/customscrollbar.h"
  19. #include "../customelements/customlineedit.h"
  20. #include "../customelements/customlabel.h"
  21. #include "../customelements/custompushbutton.h"
  22. #include "../customelements/customtabwidget.h"
  23. #include "settingstabotherlanguagetiles.h"
  24. #include "settingstabothercontext.h"
  25. #include "settingstabotherfiletypestiles.h"
  26. #include "../flowlayout/flowlayout.h"
  27. #include <QWidget>
  28. #include <QStyleOption>
  29. #include <QPainter>
  30. #include <QLabel>
  31. #include <QVBoxLayout>
  32. #include <QScrollArea>
  33. #include <QButtonGroup>
  34. #include <QLineEdit>
  35. #include <QTextEdit>
  36. #include <QProcess>
  37. #include <QSignalMapper>
  38. #include <QFormLayout>
  39. #include <QImageReader>
  40. #include <QDesktopServices>
  41. class SettingsTabOther: public QWidget {
  42. Q_OBJECT
  43. public:
  44. SettingsTabOther(QWidget *parent = 0, QMap<QString,QVariant> set = QMap<QString,QVariant>(), bool verbose = false);
  45. ~SettingsTabOther();
  46. bool verbose;
  47. TabWidget *tabs;
  48. // The scrollbars
  49. CustomScrollbar *scrollbarOther;
  50. CustomScrollbar *scrollbarFile;
  51. // Global Settings
  52. QMap<QString, QVariant> globSet;
  53. QMap<QString, QVariant> updatedSet;
  54. QMap<QString, QVariant> defaults;
  55. // Load/Save Settings
  56. void loadSettings();
  57. void saveSettings();
  58. private:
  59. QWidget *tabOther;
  60. QWidget *tabFile;
  61. QMap<QString,SettingsTabOtherFileTypesTiles*> allCheckQt;
  62. QMap<QString,SettingsTabOtherFileTypesTiles*> allCheckGm;
  63. QMap<QString,SettingsTabOtherFileTypesTiles*> allCheckGmGhostscript;
  64. QMap<QString,SettingsTabOtherFileTypesTiles*> allCheckGmUntested;
  65. CustomLineEdit *extraQtEdit;
  66. QMap<QString,SettingsTabOtherFileTypesTiles*> allCheckExtra;
  67. QMap<QString,CustomLabel*> allExtraToolNotFound;
  68. // The language selection
  69. QStringList langDesc;
  70. QStringList langAuthor;
  71. QStringList langShort;
  72. QList<SettingsTabOtherLanguageTiles*> allLangTiles;
  73. // Quick Settings
  74. CustomCheckBox *quickSet;
  75. bool defaultValue;
  76. // Context menu adjusting area
  77. Context *context;
  78. // All the known file foormats
  79. CustomLineEdit *knownFile;
  80. private slots:
  81. void markAllNone(QString cat);
  82. void openWebsite(QString web) { QDesktopServices::openUrl(QUrl(web)); }
  83. };
  84. #endif // SETTINGSTABGENERAL_H