mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2024-11-22 00:31:04 +00:00
Fixed menu error in CharSetViewer
This commit is contained in:
parent
7f4ca94e9a
commit
7002fc09ad
@ -6,8 +6,11 @@
|
|||||||
|
|
||||||
CharSetViewer::CharSetViewer(QWidget *parent) : FileViewerInterface(parent)
|
CharSetViewer::CharSetViewer(QWidget *parent) : FileViewerInterface(parent)
|
||||||
{
|
{
|
||||||
m_file = Q_NULLPTR;
|
m_file = nullptr;
|
||||||
m_cse = Q_NULLPTR;
|
m_cse = nullptr;
|
||||||
|
m_showGridAction = nullptr;
|
||||||
|
m_enableBitShiftAction = nullptr;
|
||||||
|
m_charSetEncoderAction = nullptr;
|
||||||
|
|
||||||
QGridLayout *qgl = new QGridLayout(this);
|
QGridLayout *qgl = new QGridLayout(this);
|
||||||
setLayout(qgl);
|
setLayout(qgl);
|
||||||
@ -64,26 +67,34 @@ bool CharSetViewer::optionsMenuItems(QMenu *menu)
|
|||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
QAction *action = new QAction("Show &Grid",menu);
|
if (!m_showGridAction)
|
||||||
action->setCheckable(true);
|
{
|
||||||
action->setChecked(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
m_showGridAction = new QAction("Show &Grid",menu);
|
||||||
showGrid(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
m_showGridAction->setCheckable(true);
|
||||||
connect(action, &QAction::toggled, this, &CharSetViewer::showGrid);
|
m_showGridAction->setChecked(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
||||||
menu->addAction(action);
|
showGrid(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
||||||
|
connect(m_showGridAction, &QAction::toggled, this, &CharSetViewer::showGrid);
|
||||||
|
menu->addAction(m_showGridAction);
|
||||||
|
}
|
||||||
|
|
||||||
action = new QAction("&Enable Bit Shift",menu);
|
if (!m_enableBitShiftAction)
|
||||||
action->setCheckable(true);
|
{
|
||||||
action->setChecked(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
m_enableBitShiftAction = new QAction("&Enable Bit Shift",menu);
|
||||||
enableBitShift(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
m_enableBitShiftAction->setCheckable(true);
|
||||||
connect(action, &QAction::toggled, this, &CharSetViewer::enableBitShift);
|
m_enableBitShiftAction->setChecked(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
||||||
menu->addAction(action);
|
enableBitShift(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
||||||
|
connect(m_enableBitShiftAction, &QAction::toggled, this, &CharSetViewer::enableBitShift);
|
||||||
|
menu->addAction(m_enableBitShiftAction);
|
||||||
|
}
|
||||||
|
|
||||||
menu->addSeparator();
|
if (!m_charSetEncoderAction)
|
||||||
|
{
|
||||||
action = new QAction("&Character Set Explorer...");
|
menu->addSeparator();
|
||||||
connect(action, &QAction::triggered, this, &CharSetViewer::showExplorer);
|
|
||||||
menu->addAction(action);
|
|
||||||
|
|
||||||
|
m_charSetEncoderAction = new QAction("&Character Set Explorer...");
|
||||||
|
connect(m_charSetEncoderAction, &QAction::triggered, this, &CharSetViewer::showExplorer);
|
||||||
|
menu->addAction(m_charSetEncoderAction);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,10 @@ private:
|
|||||||
CharacterSet m_charset;
|
CharacterSet m_charset;
|
||||||
|
|
||||||
CharacterSetExplorer *m_cse;
|
CharacterSetExplorer *m_cse;
|
||||||
|
|
||||||
|
QAction *m_showGridAction;
|
||||||
|
QAction *m_enableBitShiftAction;
|
||||||
|
QAction *m_charSetEncoderAction;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CHARSETVIEWER_H
|
#endif // CHARSETVIEWER_H
|
||||||
|
@ -234,8 +234,8 @@ void HiresScreenWidget::drawPixmap()
|
|||||||
doubleScan = 1;
|
doubleScan = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << (byte & 0x01) << (byte & 0x02) << (byte & 0x04) << (byte & 0x08)
|
// qDebug() << (byte & 0x01) << (byte & 0x02) << (byte & 0x04) << (byte & 0x08)
|
||||||
<< (byte & 0x10) << (byte & 0x20) << (byte & 0x40) << "HI: " << (byte & 0x80);
|
// << (byte & 0x10) << (byte & 0x20) << (byte & 0x40) << "HI: " << (byte & 0x80);
|
||||||
|
|
||||||
pmpainter.setPen(xoff & 0x01?oddColor:evenColor);
|
pmpainter.setPen(xoff & 0x01?oddColor:evenColor);
|
||||||
pmpainter.setBrush(xoff & 0x01?oddColor:evenColor);
|
pmpainter.setBrush(xoff & 0x01?oddColor:evenColor);
|
||||||
|
Loading…
Reference in New Issue
Block a user