TQt conversion of scintilla for Qt3
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.

qscintillaplugin.cpp 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. // This implements the TQScintilla plugin for TQt Designer.
  2. #include <tqwidgetplugin.h>
  3. #include "../qt/qextscintilla.h"
  4. static const char *qscintilla_pixmap[]={
  5. "22 22 35 1",
  6. "m c #000000",
  7. "n c #000033",
  8. "p c #003300",
  9. "r c #003333",
  10. "v c #330000",
  11. "o c #330033",
  12. "l c #333300",
  13. "h c #333333",
  14. "c c #333366",
  15. "d c #336666",
  16. "u c #336699",
  17. "E c #3366cc",
  18. "k c #663333",
  19. "i c #663366",
  20. "b c #666666",
  21. "e c #666699",
  22. "A c #6666cc",
  23. "G c #669966",
  24. "f c #669999",
  25. "j c #6699cc",
  26. "y c #6699ff",
  27. "t c #996666",
  28. "a c #999999",
  29. "g c #9999cc",
  30. "s c #9999ff",
  31. "C c #99cc99",
  32. "x c #99cccc",
  33. "w c #99ccff",
  34. "F c #cc99ff",
  35. "q c #cccccc",
  36. "# c #ccccff",
  37. "B c #ccffcc",
  38. "z c #ccffff",
  39. "D c #ffffcc",
  40. ". c none",
  41. "........#abcda........",
  42. "......abefghdidcf.....",
  43. ".....cadhfaehjheck....",
  44. "....leh.m.ncbehjddo...",
  45. "...depn.hqhqhr#mccch..",
  46. "..bb.hcaeh.hqersjhjcd.",
  47. ".tcm.uqn.hc.uvwxhuygha",
  48. ".feh.n.hb.hhzemcwhmuAm",
  49. "Bgehghqqme.eo#wlnysbnj",
  50. "awhdAzn.engjepswhmuyuj",
  51. "bCh#m.de.jpqwbmcwemlcz",
  52. "hcb#xh.nd#qrbswfehwzbm",
  53. "bd#d.A#zor#qmgbzwgjgws",
  54. "ajbcuqhqzchwwbemewchmr",
  55. "Dcn#cwmhgwehgsxbmhEjAc",
  56. ".uanauFrhbgeahAAbcbuhh",
  57. ".bohdAegcccfbbebuucmhe",
  58. "..briuauAediddeclchhh.",
  59. "...hcbhjccdecbceccch..",
  60. "....nhcmeccdccephcp...",
  61. ".....crbhchhhrhhck....",
  62. "......tcmdhohhcnG....."
  63. };
  64. class TQScintillaPlugin : public TQWidgetPlugin
  65. {
  66. public:
  67. TQScintillaPlugin() {};
  68. TQStringList keys() const;
  69. TQWidget *create(const TQString &classname, TQWidget *parent = 0, const char *name = 0);
  70. TQString group(const TQString &) const;
  71. TQIconSet iconSet(const TQString &) const;
  72. TQString includeFile(const TQString &) const;
  73. TQString toolTip(const TQString &) const;
  74. TQString whatsThis(const TQString &) const;
  75. bool isContainer(const TQString &) const;
  76. };
  77. TQStringList TQScintillaPlugin::keys() const
  78. {
  79. TQStringList list;
  80. list << "QextScintilla";
  81. return list;
  82. }
  83. TQWidget *TQScintillaPlugin::create(const TQString &key, TQWidget *parent, const char *name)
  84. {
  85. if (key == "QextScintilla")
  86. return new QextScintilla(parent, name);
  87. return 0;
  88. }
  89. TQString TQScintillaPlugin::group(const TQString &feature) const
  90. {
  91. if (feature == "QextScintilla")
  92. return "Input";
  93. return TQString();
  94. }
  95. TQIconSet TQScintillaPlugin::iconSet(const TQString &) const
  96. {
  97. return TQIconSet(TQPixmap(qscintilla_pixmap));
  98. }
  99. TQString TQScintillaPlugin::includeFile(const TQString &feature) const
  100. {
  101. if (feature == "QextScintilla")
  102. return "qextscintilla.h";
  103. return TQString();
  104. }
  105. TQString TQScintillaPlugin::toolTip(const TQString &feature) const
  106. {
  107. if (feature == "QextScintilla")
  108. return "TQScintilla Programmer's Editor";
  109. return TQString();
  110. }
  111. TQString TQScintillaPlugin::whatsThis(const TQString &feature) const
  112. {
  113. if (feature == "QextScintilla")
  114. return "A port to TQt of the Scintilla programmer's editor";
  115. return TQString();
  116. }
  117. bool TQScintillaPlugin::isContainer(const TQString &) const
  118. {
  119. return FALSE;
  120. }
  121. TQ_EXPORT_PLUGIN(TQScintillaPlugin)