summaryrefslogtreecommitdiff
path: root/lyt/pane.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lyt/pane.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/lyt/pane.cpp b/lyt/pane.cpp
index bcba81b..7ae768a 100644
--- a/lyt/pane.cpp
+++ b/lyt/pane.cpp
@@ -27,7 +27,7 @@ LYTPane::~LYTPane() {
delete ptr;
}
-LYTPane *LYTPane::findPaneByName(QString name, bool recursive) {
+LYTPane *LYTPane::findPaneByName(QString name, bool recursive) const {
foreach (LYTPane *pane, this->children) {
if (pane->name == name)
return pane;
@@ -47,7 +47,11 @@ LYTLayout &LYTPane::layout() const {
}
-void LYTPane::dumpToDebug(bool showHeading) {
+Magic LYTPane::magic() const {
+ return Magic('pan1');
+}
+
+void LYTPane::dumpToDebug(bool showHeading) const {
if (showHeading)
qDebug() << "LYTPane" << name << "@" << (void*)this;
@@ -61,11 +65,11 @@ void LYTPane::dumpToDebug(bool showHeading) {
-void LYTPane::writeToDataStream(QDataStream &out) {
+void LYTPane::writeToDataStream(QDataStream &out) const {
out << (quint8)flags;
out << (quint8)origin;
out << (quint8)alpha;
- out.skipRawData(1); // padding
+ WritePadding(1, out);
WriteFixedLengthASCII(out, name, 0x10);
WriteFixedLengthASCII(out, userdata, 8);
@@ -102,3 +106,12 @@ void LYTPane::readFromDataStream(QDataStream &in) {
in >> (float&)width;
in >> (float&)height;
}
+
+
+void LYTPane::addFontRefsToList(QStringList &list) const {
+ //qDebug() << "Getting font refs for" << this->name;
+
+ foreach (LYTPane *p, this->children) {
+ p->addFontRefsToList(list);
+ }
+}