selectionpopup.h
上传用户:center1979
上传日期:2022-07-26
资源大小:50633k
文件大小:2k
源码类别:

OpenGL

开发平台:

Visual C++

  1. /***************************************************************************
  2.                           selectionpopup.h  -  description
  3.                              -------------------
  4.     begin                : 2003-05-06
  5.     copyright            : (C) 2002 by Christophe Teyssier
  6.     email                : chris@teyssier.org
  7.  ***************************************************************************/
  8. /***************************************************************************
  9.  *                                                                         *
  10.  *   This program is free software; you can redistribute it and/or modify  *
  11.  *   it under the terms of the GNU General Public License as published by  *
  12.  *   the Free Software Foundation; either version 2 of the License, or     *
  13.  *   (at your option) any later version.                                   *
  14.  *                                                                         *
  15.  ***************************************************************************/
  16. #ifndef SELECTIONPOPUP_H
  17. #define SELECTIONPOPUP_H
  18. #include <kpopupmenu.h>
  19. #include "celestiacore.h"
  20. #ifdef HAVE_CONFIG_H
  21. #include <config.h>
  22. #endif
  23. #include <vector>
  24. class SelectionPopup : public KPopupMenu {
  25. Q_OBJECT
  26. public:
  27.     SelectionPopup(QWidget* parent, CelestiaCore* appCore, Selection sel);
  28.     ~SelectionPopup();
  29.     void init();
  30.     void process(int id);
  31. protected:
  32.     CelestiaCore* appCore;
  33.     const char* getSelectionName(const Selection& sel) const;
  34.     Selection getSelectionFromId(int id);
  35.     void insert(KPopupMenu* popup, Selection sel, bool showSubObjects = true);
  36.     Selection sel;
  37.     std::vector< std::pair<int, Selection> > baseIds;
  38.     int baseId;
  39.     void insertPlanetaryMenu(KPopupMenu* popup, const string& parentName, const PlanetarySystem* psys);
  40. };
  41. #endif // SELECTIONPOPUP_H