Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.45 KB | None | 0 0
  1. class Exf2dProfileWidget : public GVWidget
  2. {
  3.   Q_OBJECT
  4. private:
  5.   void createActions();
  6.  
  7.   QAction * _show0ProfileAction;
  8.   QAction * _show1ProfileAction;
  9.   QAction * _show2ProfileAction;
  10.   QAction * _show3ProfileAction;
  11.   QAction * _show4ProfileAction;
  12.   QAction * _show5ProfileAction;
  13.   QAction * _show6ProfileAction;
  14.  
  15. };
  16. void exf2d::Exf2dProfileWidget::createActions()
  17. {
  18.   _show0ProfileAction = new QAction("None", this);
  19.   connect(_show0ProfileAction, SIGNAL(triggered()), this, SLOT(onShow0Profile()));
  20.  
  21.   _show1ProfileAction = new QAction("1", this);
  22.   connect(_show1ProfileAction, SIGNAL(triggered()), this, SLOT(onShow1Profile()));
  23.  
  24.   _show2ProfileAction = new QAction("2", this);
  25.   connect(_show2ProfileAction, SIGNAL(triggered()), this, SLOT(onShow2Profile()));
  26.  
  27.   _show3ProfileAction = new QAction("3", this);
  28.   connect(_show3ProfileAction, SIGNAL(triggered()), this, SLOT(onShow3Profile()));
  29.  
  30.   _show4ProfileAction = new QAction("4", this);
  31.   connect(_show4ProfileAction, SIGNAL(triggered()), this, SLOT(onShow4Profile()));
  32.  
  33.   _show5ProfileAction = new QAction("5", this);
  34.   connect(_show5ProfileAction, SIGNAL(triggered()), this, SLOT(onShow5Profile()));
  35.  
  36.   _show6ProfileAction = new QAction("6", this);
  37.   connect(_show6ProfileAction, SIGNAL(triggered()), this, SLOT(onShow6Profile()));
  38.  
  39. }
  40.  
  41. /**
  42.  * Slot show none Profile
  43.  */
  44. void exf2d::Exf2dProfileWidget::onShow0Profile()
  45. {
  46.   _legend1->setNumberOfProfiles(0);
  47.   _legend1->drawProfileLegend();
  48. }
  49.  
  50. /**
  51.  * Slot show one Profile
  52.  */
  53. void exf2d::Exf2dProfileWidget::onShow1Profile()
  54. {
  55.   _legend1->setNumberOfProfiles(1);
  56.   _legend1->drawProfileLegend();
  57. }
  58.  
  59. /**
  60.  * Slot show two Profiles
  61.  */
  62. void exf2d::Exf2dProfileWidget::onShow2Profile()
  63. {
  64.   _legend1->setNumberOfProfiles(2);
  65.   _legend1->drawProfileLegend();
  66. }
  67.  
  68. /**
  69.  * Slot show three Profiles
  70.  */
  71. void exf2d::Exf2dProfileWidget::onShow3Profile()
  72. {
  73.   _legend1->setNumberOfProfiles(3);
  74.   _legend1->drawProfileLegend();
  75. }
  76.  
  77. /**
  78.  * Slot show four Profiles
  79.  */
  80. void exf2d::Exf2dProfileWidget::onShow4Profile()
  81. {
  82.   _legend1->setNumberOfProfiles(4);
  83.   _legend1->drawProfileLegend();
  84. }
  85.  
  86. /**
  87.  * Slot show five Profiles
  88.  */
  89. void exf2d::Exf2dProfileWidget::onShow5Profile()
  90. {
  91.   _legend1->setNumberOfProfiles(5);
  92.   _legend1->drawProfileLegend();
  93. }
  94.  
  95. /**
  96.  * Slot show six Profiles
  97.  */
  98. void exf2d::Exf2dProfileWidget::onShow6Profile()
  99. {
  100.   _legend1->setNumberOfProfiles(6);
  101.   _legend1->drawProfileLegend();
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement