| 1 |
namespace phoenix { |
| 2 |
|
| 3 |
void pAction::setEnabled(bool enabled) { |
| 4 |
if(dynamic_cast<Menu*>(&action)) { |
| 5 |
((Menu&)action).p.qtMenu->setEnabled(enabled); |
| 6 |
} else if(dynamic_cast<Separator*>(&action)) { |
| 7 |
((Separator&)action).p.qtAction->setEnabled(enabled); |
| 8 |
} else if(dynamic_cast<Item*>(&action)) { |
| 9 |
((Item&)action).p.qtAction->setEnabled(enabled); |
| 10 |
} else if(dynamic_cast<CheckItem*>(&action)) { |
| 11 |
((CheckItem&)action).p.qtAction->setEnabled(enabled); |
| 12 |
} else if(dynamic_cast<RadioItem*>(&action)) { |
| 13 |
((RadioItem&)action).p.qtAction->setEnabled(enabled); |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
void pAction::setFont(string font) { |
| 18 |
QFont qtFont = pFont::create(font); |
| 19 |
|
| 20 |
if(dynamic_cast<Menu*>(&action)) { |
| 21 |
((Menu&)action).p.setFont(font); |
| 22 |
} else if(dynamic_cast<Separator*>(&action)) { |
| 23 |
((Separator&)action).p.qtAction->setFont(qtFont); |
| 24 |
} else if(dynamic_cast<Item*>(&action)) { |
| 25 |
((Item&)action).p.qtAction->setFont(qtFont); |
| 26 |
} else if(dynamic_cast<CheckItem*>(&action)) { |
| 27 |
((CheckItem&)action).p.qtAction->setFont(qtFont); |
| 28 |
} else if(dynamic_cast<RadioItem*>(&action)) { |
| 29 |
((RadioItem&)action).p.qtAction->setFont(qtFont); |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
void pAction::setVisible(bool visible) { |
| 34 |
if(dynamic_cast<Menu*>(&action)) { |
| 35 |
((Menu&)action).p.qtMenu->menuAction()->setVisible(visible); |
| 36 |
} else if(dynamic_cast<Separator*>(&action)) { |
| 37 |
((Separator&)action).p.qtAction->setVisible(visible); |
| 38 |
} else if(dynamic_cast<Item*>(&action)) { |
| 39 |
((Item&)action).p.qtAction->setVisible(visible); |
| 40 |
} else if(dynamic_cast<CheckItem*>(&action)) { |
| 41 |
((CheckItem&)action).p.qtAction->setVisible(visible); |
| 42 |
} else if(dynamic_cast<RadioItem*>(&action)) { |
| 43 |
((RadioItem&)action).p.qtAction->setVisible(visible); |
| 44 |
} |
| 45 |
} |
| 46 |
|
| 47 |
void pAction::constructor() { |
| 48 |
} |
| 49 |
|
| 50 |
void pAction::destructor() { |
| 51 |
} |
| 52 |
|
| 53 |
} |