diff --git a/escher/include/escher/solid_color_view.h b/escher/include/escher/solid_color_view.h index 661f72367..de9c9f9e7 100644 --- a/escher/include/escher/solid_color_view.h +++ b/escher/include/escher/solid_color_view.h @@ -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; diff --git a/escher/include/escher/tab_view.h b/escher/include/escher/tab_view.h index 079d97ff1..58b6b6507 100644 --- a/escher/include/escher/tab_view.h +++ b/escher/include/escher/tab_view.h @@ -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: diff --git a/escher/include/escher/tab_view_cell.h b/escher/include/escher/tab_view_cell.h index 6b248c9d8..758828820 100644 --- a/escher/include/escher/tab_view_cell.h +++ b/escher/include/escher/tab_view_cell.h @@ -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; diff --git a/escher/src/solid_color_view.cpp b/escher/src/solid_color_view.cpp index 8dffd3f31..9c0506c9a 100644 --- a/escher/src/solid_color_view.cpp +++ b/escher/src/solid_color_view.cpp @@ -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 diff --git a/escher/src/tab_view.cpp b/escher/src/tab_view.cpp index f40463683..d35fe0b7c 100644 --- a/escher/src/tab_view.cpp +++ b/escher/src/tab_view.cpp @@ -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 diff --git a/escher/src/tab_view_cell.cpp b/escher/src/tab_view_cell.cpp index da42a51ff..448c232a9 100644 --- a/escher/src/tab_view_cell.cpp +++ b/escher/src/tab_view_cell.cpp @@ -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 diff --git a/escher/src/view.cpp b/escher/src/view.cpp index fd0a5daf4..158b1ab64 100644 --- a/escher/src/view.cpp +++ b/escher/src/view.cpp @@ -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) {