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)
|
||||
{
|
||||
m_file = Q_NULLPTR;
|
||||
m_cse = Q_NULLPTR;
|
||||
m_file = nullptr;
|
||||
m_cse = nullptr;
|
||||
m_showGridAction = nullptr;
|
||||
m_enableBitShiftAction = nullptr;
|
||||
m_charSetEncoderAction = nullptr;
|
||||
|
||||
QGridLayout *qgl = new QGridLayout(this);
|
||||
setLayout(qgl);
|
||||
@ -64,26 +67,34 @@ bool CharSetViewer::optionsMenuItems(QMenu *menu)
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
QAction *action = new QAction("Show &Grid",menu);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
||||
showGrid(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
||||
connect(action, &QAction::toggled, this, &CharSetViewer::showGrid);
|
||||
menu->addAction(action);
|
||||
if (!m_showGridAction)
|
||||
{
|
||||
m_showGridAction = new QAction("Show &Grid",menu);
|
||||
m_showGridAction->setCheckable(true);
|
||||
m_showGridAction->setChecked(settings.value("CharSetViewer.ShowGrid",true).toBool());
|
||||
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);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
||||
enableBitShift(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
||||
connect(action, &QAction::toggled, this, &CharSetViewer::enableBitShift);
|
||||
menu->addAction(action);
|
||||
if (!m_enableBitShiftAction)
|
||||
{
|
||||
m_enableBitShiftAction = new QAction("&Enable Bit Shift",menu);
|
||||
m_enableBitShiftAction->setCheckable(true);
|
||||
m_enableBitShiftAction->setChecked(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
||||
enableBitShift(settings.value("CharSetViewer.EnableBitShift",true).toBool());
|
||||
connect(m_enableBitShiftAction, &QAction::toggled, this, &CharSetViewer::enableBitShift);
|
||||
menu->addAction(m_enableBitShiftAction);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
action = new QAction("&Character Set Explorer...");
|
||||
connect(action, &QAction::triggered, this, &CharSetViewer::showExplorer);
|
||||
menu->addAction(action);
|
||||
if (!m_charSetEncoderAction)
|
||||
{
|
||||
menu->addSeparator();
|
||||
|
||||
m_charSetEncoderAction = new QAction("&Character Set Explorer...");
|
||||
connect(m_charSetEncoderAction, &QAction::triggered, this, &CharSetViewer::showExplorer);
|
||||
menu->addAction(m_charSetEncoderAction);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,10 @@ private:
|
||||
CharacterSet m_charset;
|
||||
|
||||
CharacterSetExplorer *m_cse;
|
||||
|
||||
QAction *m_showGridAction;
|
||||
QAction *m_enableBitShiftAction;
|
||||
QAction *m_charSetEncoderAction;
|
||||
};
|
||||
|
||||
#endif // CHARSETVIEWER_H
|
||||
|
@ -234,8 +234,8 @@ void HiresScreenWidget::drawPixmap()
|
||||
doubleScan = 1;
|
||||
}
|
||||
|
||||
qDebug() << (byte & 0x01) << (byte & 0x02) << (byte & 0x04) << (byte & 0x08)
|
||||
<< (byte & 0x10) << (byte & 0x20) << (byte & 0x40) << "HI: " << (byte & 0x80);
|
||||
// qDebug() << (byte & 0x01) << (byte & 0x02) << (byte & 0x04) << (byte & 0x08)
|
||||
// << (byte & 0x10) << (byte & 0x20) << (byte & 0x40) << "HI: " << (byte & 0x80);
|
||||
|
||||
pmpainter.setPen(xoff & 0x01?oddColor:evenColor);
|
||||
pmpainter.setBrush(xoff & 0x01?oddColor:evenColor);
|
||||
|
Loading…
Reference in New Issue
Block a user