KnowIt – tool for managing notes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.0KB

  1. /***************************************************************************
  2. knowitpref.h - description
  3. -------------------
  4. begin : czw lis 28 2002
  5. copyright : (C) 2002-2004 by Micha³ Rudolf
  6. email : mrudolf@kdewebdev.org
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #ifndef KNOWITPREF_H
  17. #define KNOWITPREF_H
  18. #include <tqstring.h>
  19. #include <kdialogbase.h>
  20. class TQCheckBox;
  21. class TQSpinBox;
  22. class TQToolButton;
  23. class KLineEdit;
  24. class KColorButton;
  25. class KDualColorButton;
  26. class TDEConfig;
  27. class KComboBox;
  28. class KnowitOptions
  29. {
  30. public:
  31. /* General */
  32. bool docked;
  33. bool reopen;
  34. int autosave;
  35. bool unconditionalSave;
  36. bool multipleInstances;
  37. bool backup;
  38. /* GUI */
  39. bool horizontalSplit;
  40. int linkFormat;
  41. TQString defaultName;
  42. bool alternateTree;
  43. TQString alternateColor;
  44. bool autoCollapse;
  45. /* Links */
  46. bool firstLink;
  47. /* Editor */
  48. bool wordwrap;
  49. bool enterBreakLine;
  50. bool tabfocus;
  51. bool customColors;
  52. TQString backEditColor;
  53. TQString foreEditColor;
  54. bool customFont;
  55. TQString fontFamily;
  56. int fontSize;
  57. /* Date format */
  58. TQString insertDateFormat, insertDateColor;
  59. bool insertDateBold, insertDateItalic, insertDateUnderline;
  60. void save(TDEConfig* config) const;
  61. void read(TDEConfig* config);
  62. /* Export */
  63. int exportFlags;
  64. };
  65. class KnowitPreferences : public KDialogBase
  66. {
  67. Q_OBJECT
  68. private:
  69. TQCheckBox *docked, *reopen, *horizontalSplit, *multipleInstances, *backup;
  70. TQCheckBox *unconditionalSave;
  71. TQCheckBox *wordwrap, *tabfocus, *customColors;
  72. KDualColorButton* editColors;
  73. TQCheckBox *enterBreakLine;
  74. KLineEdit *defaultName;
  75. TQCheckBox *alternateTree;
  76. KColorButton *alternateColor;
  77. TQCheckBox* autoCollapse;
  78. TQCheckBox* customFont;
  79. KComboBox *fontFamily, *fontSize;
  80. KComboBox *linkFormat;
  81. KLineEdit *insertDateFormatEdit;
  82. KColorButton *insertDateColorButton;
  83. TQLabel *insertDatePreview;
  84. TQSpinBox* autosave;
  85. TQToolButton *insertDateItalicButton, *insertDateBoldButton, *insertDateUnderlineButton;
  86. bool firstLink;
  87. int exportFlags;
  88. public:
  89. KnowitPreferences();
  90. void setOptions(const KnowitOptions& Options);
  91. KnowitOptions getOptions() const;
  92. public slots:
  93. void slotUpdateDatePreview();
  94. };
  95. #endif