mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Escher: Add more attributes when logging views
Change-Id: Ic8632e7fbfcaba143f7ff0ea4965f6a34948f041
This commit is contained in:
@@ -10,6 +10,7 @@ public:
|
||||
protected:
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
const char * className() const override;
|
||||
void logAttributes(std::ostream &os) const override;
|
||||
#endif
|
||||
private:
|
||||
KDColor m_color;
|
||||
|
||||
@@ -19,6 +19,7 @@ public:
|
||||
protected:
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
const char * className() const override;
|
||||
void logAttributes(std::ostream &os) const override;
|
||||
#endif
|
||||
void storeSubviewAtIndex(View * view, int index) override;
|
||||
private:
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
protected:
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
const char * className() const override;
|
||||
void logAttributes(std::ostream &os) const override;
|
||||
#endif
|
||||
private:
|
||||
bool m_active;
|
||||
|
||||
@@ -14,4 +14,9 @@ void SolidColorView::drawRect(KDRect rect) const {
|
||||
const char * SolidColorView::className() const {
|
||||
return "SolidColorView";
|
||||
}
|
||||
|
||||
void SolidColorView::logAttributes(std::ostream &os) const {
|
||||
View::logAttributes(os);
|
||||
os << " color=\"" << (int)m_color << "\"";
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -61,4 +61,10 @@ void TabView::storeSubviewAtIndex(View * view, int index) {
|
||||
const char * TabView::className() const {
|
||||
return "TabView";
|
||||
}
|
||||
|
||||
void TabView::logAttributes(std::ostream &os) const {
|
||||
View::logAttributes(os);
|
||||
os << " numberOfTabs=\"" << (int)m_numberOfTabs << "\"";
|
||||
os << " activeTabIndex=\"" << (int)m_activeTabIndex << "\"";
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -28,5 +28,10 @@ void TabViewCell::drawRect(KDRect rect) const {
|
||||
const char * TabViewCell::className() const {
|
||||
return "TabViewCell";
|
||||
}
|
||||
#endif
|
||||
|
||||
void TabViewCell::logAttributes(std::ostream &os) const {
|
||||
View::logAttributes(os);
|
||||
os << " active=\"" << m_active << "\"";
|
||||
os << " name=\"" << m_name << "\"";
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -137,8 +137,8 @@ const char * View::className() const {
|
||||
}
|
||||
|
||||
void View::logAttributes(std::ostream &os) const {
|
||||
os << " address=\"" << this << "\"";
|
||||
os << " frame=\"" << m_frame.x << "," << m_frame.y << "," << m_frame.width << "," << m_frame.height << "\"";
|
||||
//os << " child_count=\"" << numberOfSubviews() << "\"";
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const View &view) {
|
||||
|
||||
Reference in New Issue
Block a user