cmQTWrapUICommand.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. #include "cmSourceFile.h"
  17. /** \class cmQTWrapUICommand
  18. * \brief Create .h and .cxx files rules for QT user interfaces files
  19. *
  20. * cmQTWrapUICommand is used to create wrappers for QT classes into normal C++
  21. */
  22. class cmQTWrapUICommand : public cmCommand
  23. {
  24. public:
  25. cmTypeMacro(cmQTWrapUICommand, cmCommand);
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmQTWrapUICommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * This is called at the end after all the information
  40. * specified by the command is accumulated. Most commands do
  41. * not implement this method. At this point, reading and
  42. * writing to the cache can be done.
  43. */
  44. virtual void FinalPass();
  45. /**
  46. * The name of the command as specified in CMakeList.txt.
  47. */
  48. virtual const char* GetName() { return "QT_WRAP_UI";}
  49. /**
  50. * Succinct documentation.
  51. */
  52. virtual const char* GetTerseDocumentation()
  53. {
  54. return "Create QT user interfaces Wrappers.";
  55. }
  56. /**
  57. * More documentation.
  58. */
  59. virtual const char* GetFullDocumentation()
  60. {
  61. return
  62. " QT_WRAP_UI(resultingLibraryName HeadersDestName\n"
  63. " SourcesDestName SourceLists ...)\n"
  64. "Produce .h and .cxx files for all the .ui files listed "
  65. "in the SourceLists. "
  66. "The .h files will be added to the library using the HeadersDestName"
  67. "source list. "
  68. "The .cxx files will be added to the library using the SourcesDestName"
  69. "source list.";
  70. }
  71. private:
  72. /**
  73. * List of produced files.
  74. */
  75. std::vector<cmSourceFile> WrapSourcesClasses;
  76. std::vector<cmSourceFile> WrapHeadersClasses;
  77. std::vector<cmSourceFile> WrapMocClasses;
  78. /**
  79. * List of header files that pprovide the source for WrapClasses.
  80. */
  81. std::vector<std::string> WrapUserInterface;
  82. std::string LibraryName;
  83. std::string HeaderList;
  84. std::string SourceList;
  85. };
  86. #endif