mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 15:12:23 +01:00
byuu says: Updated to support latest phoenix changes. Converted Settings and Tools to TabFrame views. Errata: - phoenix/Windows ComboButton wasn't calling parent pWidget::setGeometry() [fixed locally] - TRACKBAR_CLASS draws COLOR_3DFACE for the background even when its parent is a WC_TABCONTROL
29 lines
618 B
C++
29 lines
618 B
C++
namespace phoenix {
|
|
|
|
void pCheckItem::setChecked(bool checked) {
|
|
qtAction->setChecked(checked);
|
|
}
|
|
|
|
void pCheckItem::setText(string text) {
|
|
qtAction->setText(QString::fromUtf8(text));
|
|
}
|
|
|
|
void pCheckItem::constructor() {
|
|
qtAction = new QAction(0);
|
|
qtAction->setCheckable(true);
|
|
connect(qtAction, SIGNAL(triggered()), SLOT(onToggle()));
|
|
}
|
|
|
|
void pCheckItem::destructor() {
|
|
if(action.state.menu) action.state.menu->remove(checkItem);
|
|
delete qtAction;
|
|
qtAction = nullptr;
|
|
}
|
|
|
|
void pCheckItem::onToggle() {
|
|
checkItem.state.checked = qtAction->isChecked();
|
|
if(checkItem.onToggle) checkItem.onToggle();
|
|
}
|
|
|
|
}
|