KRename – powerful batch renamer
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.

helpdialog.h 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /***************************************************************************
  2. helpdialog.h - description
  3. -------------------
  4. begin : Fr Nov 15 13:44:19 CEST 2001
  5. copyright : (C) 2002 by Dominik Seichter
  6. email : domseichter@web.de
  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 HELPDIALOG_H
  17. #define HELPDIALOG_H
  18. #include <tqdialog.h>
  19. #include <tqstringlist.h>
  20. #include <tqpixmap.h>
  21. #include <tqmap.h>
  22. class TQVBoxLayout;
  23. class TQHBoxLayout;
  24. class TQGridLayout;
  25. class TQComboBox;
  26. class TQLineEdit;
  27. class TQPixmap;
  28. class TDEListView;
  29. class KPushButton;
  30. class HelpDialogData : public TQObject {
  31. Q_OBJECT
  32. public:
  33. HelpDialogData() {}
  34. ~HelpDialogData() {}
  35. void add( const TQString & headline, TQStringList* commands, const TQPixmap & icon, bool first = false );
  36. void remove( const TQString & headline );
  37. /** returns all available and supported tokens
  38. */
  39. TQStringList tokens() const;
  40. inline const TQMap<TQString,TQStringList> & map() const
  41. {
  42. return m_map;
  43. }
  44. inline const TQMap<TQString,TQPixmap> & icons() const
  45. {
  46. return m_icons;
  47. }
  48. inline const TQString & first() const
  49. {
  50. return m_first;
  51. }
  52. signals:
  53. void updateHeadline();
  54. void updateItems();
  55. private:
  56. TQMap<TQString,TQStringList> m_map;
  57. TQMap<TQString,TQPixmap> m_icons;
  58. TQString m_first;
  59. };
  60. class HelpDialog : public TQDialog
  61. {
  62. Q_OBJECT
  63. public:
  64. HelpDialog( HelpDialogData* data, TQWidget* parent = 0,
  65. const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
  66. ~HelpDialog();
  67. inline void setLineEdit( TQLineEdit* lineedit );
  68. public slots:
  69. void updateItems();
  70. void updateHeadline();
  71. private slots:
  72. void execute();
  73. private:
  74. TQComboBox* comboHeadline;
  75. TDEListView* list;
  76. KPushButton* buttonAdd;
  77. KPushButton* buttonClose;
  78. protected:
  79. HelpDialogData* m_data;
  80. TQLineEdit* text;
  81. TQVBoxLayout* HelpDialogLayout;
  82. TQHBoxLayout* Layout1;
  83. };
  84. void HelpDialog::setLineEdit( TQLineEdit* lineedit )
  85. {
  86. text = lineedit;
  87. }
  88. #endif // HELPDIALOG_H