MCPcopy Create free account
hub / github.com/KLayout/klayout / is_valid_widget

Function is_valid_widget

src/laybasic/laybasic/gtf.cc:1086–1098  ·  view source on GitHub ↗

* @brief A helper function telling if we shall log for the widget given * * This method defines which widgets not to log for. These include ToolBar widgets * and Menu widgets as well as special ones used internally by Qt. */

Source from the content-addressed store, hash-verified

1084 * and Menu widgets as well as special ones used internally by Qt.
1085 */
1086static bool
1087is_valid_widget (QWidget *w)
1088{
1089 if (dynamic_cast <QToolBar *> (w) != 0 ||
1090 dynamic_cast <QMenuBar *> (w) != 0 ||
1091 dynamic_cast <QMenu *> (w) != 0) {
1092 return false;
1093 } else if (w->parentWidget () == 0) {
1094 return (dynamic_cast <QDialog *> (w) != 0 || dynamic_cast <QMainWindow *> (w) != 0);
1095 } else {
1096 return is_valid_widget (w->parentWidget ());
1097 }
1098}
1099
1100class ErrorLogRecorder
1101 : public tl::Channel

Callers 1

eventFilterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected