cmQTWrapUICommand.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmQTWrapUICommand_h
  14. #define cmQTWrapUICommand_h
  15. #include "cmCommand.h"
  16. /** \class cmQTWrapUICommand
  17. * \brief Create .h and .cxx files rules for QT user interfaces files
  18. *
  19. * cmQTWrapUICommand is used to create wrappers for QT classes into normal C++
  20. */
  21. class cmQTWrapUICommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmQTWrapUICommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args);
  36. /**
  37. * This is called at the end after all the information
  38. * specified by the command is accumulated. Most commands do
  39. * not implement this method. At this point, reading and
  40. * writing to the cache can be done.
  41. */
  42. virtual void FinalPass();
  43. /**
  44. * The name of the command as specified in CMakeList.txt.
  45. */
  46. virtual const char* GetName() { return "QT_WRAP_UI";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Create QT user interfaces Wrappers.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. " QT_WRAP_UI(resultingLibraryName HeadersDestName\n"
  61. " SourcesDestName SourceLists ...)\n"
  62. "Produce .h and .cxx files for all the .ui file listed "
  63. "in the SourceLists. "
  64. "The .h files will be added to the library using the HeadersDestName"
  65. "source list. "
  66. "The .cxx files will be added to the library using the SourcesDestName"
  67. "source list.";
  68. }
  69. private:
  70. /**
  71. * List of produced files.
  72. */
  73. std::vector<cmSourceFile> m_WrapSourcesClasses;
  74. std::vector<cmSourceFile> m_WrapHeadersClasses;
  75. std::vector<cmSourceFile> m_WrapMocClasses;
  76. /**
  77. * List of header files that pprovide the source for m_WrapClasses.
  78. */
  79. std::vector<std::string> m_WrapUserInterface;
  80. std::string m_LibraryName;
  81. std::string m_HeaderList;
  82. std::string m_SourceList;
  83. };
  84. #endif