ctkCmdLineModuleMenuFactoryQtGui.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) University College London
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =============================================================================*/
  14. #ifndef CTKCMDLINEMODULEMENUFACTORYQTGUI_H
  15. #define CTKCMDLINEMODULEMENUFACTORYQTGUI_H
  16. #include <QMenu>
  17. #include <QList>
  18. #include "ctkCmdLineModuleReference.h"
  19. #include "ctkCommandLineModulesFrontendQtGuiExport.h"
  20. /**
  21. * \class ctkCmdLineModuleMenuFactoryQtGui
  22. * \brief Takes a QHash of filename and ctkCmdLineModuleReference and produces a QMenu.
  23. * \author m.clarkson@ucl.ac.uk
  24. * \ingroup CommandLineModulesFrontendQtGui
  25. */
  26. class CTK_CMDLINEMODULEQTGUI_EXPORT ctkCmdLineModuleMenuFactoryQtGui
  27. {
  28. public:
  29. ctkCmdLineModuleMenuFactoryQtGui();
  30. virtual ~ctkCmdLineModuleMenuFactoryQtGui();
  31. /**
  32. * \brief Constructs a menu, for all the items in the QHash.
  33. * \param list List of references, from which to build a menu.
  34. * \return QMenu* a menu.
  35. */
  36. QMenu* create(const QList<ctkCmdLineModuleReference>& list);
  37. };
  38. #endif // CTKCMDLINEMODULEMENUFACTORYQTGUI_H