Load files into QList of PageBase objects
A document is first loaded as a generic PageBase before being converted to
level one pages afterwards.
This is preparation for loading pages of other types such as DRCS and Public
Object Pages. The latter will need further work as the non-TTI file loaders
blindly assume X/1 to X/25 are 7-bit odd parity coded.
This also reverts 0a1c018 putting back the copy constructor that allows
a PageBase to be converted to a LevelOnePage.
This commit is contained in:
@@ -33,6 +33,24 @@ LevelOnePage::LevelOnePage()
|
||||
clearPage();
|
||||
}
|
||||
|
||||
LevelOnePage::LevelOnePage(const PageBase &other)
|
||||
{
|
||||
m_enhancements.reserve(maxEnhancements());
|
||||
clearPage();
|
||||
|
||||
for (int y=0; y<26; y++)
|
||||
if (other.packetExists(y))
|
||||
setPacket(y, other.packet(y));
|
||||
|
||||
for (int y=26; y<29; y++)
|
||||
for (int d=0; d<16; d++)
|
||||
if (other.packetExists(y, d))
|
||||
setPacket(y, d, other.packet(y, d));
|
||||
|
||||
for (int b=PageBase::C4ErasePage; b<=PageBase::C14NOS; b++)
|
||||
setControlBit(b, other.controlBit(b));
|
||||
}
|
||||
|
||||
// So far we only call clearPage() once, within the constructor
|
||||
void LevelOnePage::clearPage()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user