srcfilewin.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. ktigcc - TIGCC IDE for KDE
  3. Copyright (C) 2007 Kevin Kofler
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software Foundation,
  14. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #pragma once
  17. #include "ui_srcfilewin.h"
  18. class SourceFileWindow : public Q3MainWindow, public Ui::SourceFileWindow
  19. {
  20. Q_OBJECT
  21. public:
  22. SourceFileWindow(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags fl = Qt::WType_TopLevel);
  23. ~SourceFileWindow();
  24. virtual void initBase();
  25. void * createView( const QString & fileName, const QString & fileText, const QString & hlModeName, unsigned tabWidth );
  26. virtual int savePrompt( void );
  27. virtual void applyPreferences();
  28. public slots:
  29. virtual void destroy();
  30. virtual void te_popup_aboutToShow();
  31. virtual void te_popup_activated( int index );
  32. virtual void accel_activated( int index );
  33. virtual void fileSave();
  34. virtual void fileSaveAs();
  35. virtual void fileAddToProject();
  36. virtual void fileCompile();
  37. virtual void filePrint();
  38. virtual void filePrintQuickly();
  39. virtual void editUndo();
  40. virtual void editRedo();
  41. virtual void editClear();
  42. virtual void editCut();
  43. virtual void editCopy();
  44. virtual void editPaste();
  45. virtual void editSelectAll();
  46. virtual void editIncreaseIndent();
  47. virtual void editDecreaseIndent();
  48. virtual void findFind();
  49. virtual void findFind_next();
  50. virtual void findFind_highlight( const QString & unused_text, int matchingindex, int matchedlength );
  51. virtual void findFind_stop();
  52. virtual void findReplace();
  53. virtual void findReplace_next();
  54. virtual void findReplace_highlight( const QString & unused_text, int matchingindex, int matchedlength );
  55. virtual void findReplace_replace( const QString & text, int replacementIndex, int replacedLength, int matchedLength );
  56. virtual void findReplace_stop();
  57. virtual void findFunctions();
  58. virtual void findFunctions_functionListBox_highlighted( int index );
  59. virtual void findFunctions_functionListBox_selected( int index );
  60. virtual void findFunctions_prototypeButton_clicked();
  61. virtual void findFunctions_implementationButton_clicked();
  62. virtual void findFunctionsPopup_aboutToShow();
  63. virtual void findFunctionsPopup_aboutToHide();
  64. virtual void findFunctionsPopup_aboutToHide_async();
  65. virtual void findFunctionsPopup_activated( int id );
  66. virtual void findOpenFileAtCursor();
  67. virtual void findFindSymbolDeclaration();
  68. virtual void resizeEvent( QResizeEvent * event );
  69. virtual void statusBar_messageChanged( const QString & message );
  70. virtual void current_view_cursorPositionChanged();
  71. virtual void current_view_textChanged();
  72. virtual void current_view_undoChanged();
  73. virtual void current_view_selectionChanged();
  74. virtual void current_view_charactersInteractivelyInserted( int line, int col, const QString & characters );
  75. virtual void clipboard_dataChanged();
  76. virtual void KDirWatch_dirty( const QString & fileName );
  77. virtual void completionPopup_closed();
  78. protected:
  79. virtual void closeEvent( QCloseEvent * e );
  80. protected slots:
  81. virtual void languageChange();
  82. private:
  83. void removeTrailingSpacesFromView( void * view );
  84. void findReplace_next( bool firstTime );
  85. void updateSizes();
  86. void updateRightStatusLabel();
  87. void current_view_newLineHook();
  88. };