From cdcfb07b963cc844f78db0015c0d51298dd8bc90 Mon Sep 17 00:00:00 2001 From: nils Date: Mon, 8 Aug 2011 18:14:23 +0000 Subject: changed removeNoteByClassname to hideNoteByClassname since remove doesn't work git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@509 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- editorpage.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'editorpage.cpp') diff --git a/editorpage.cpp b/editorpage.cpp index 7725e02..f6c6504 100644 --- a/editorpage.cpp +++ b/editorpage.cpp @@ -65,27 +65,18 @@ void EditorPage::showNotificationWidget(QWidget *widget, const char *className) mainLayout->addWidget(widget); } -void EditorPage::removeNoteByClass(const char *className) { +void EditorPage::hideNoteByClass(const char *className) +{ qDebug() << "length:" << this->children().length(); - - foreach(QObject *tmp, this->children()) { - qDebug() << "bla" << tmp->property(className); - if (tmp->property(className) == true) { - mainLayout->removeWidget(qobject_cast (tmp)); + QList widgets = findChildren(); + foreach(QWidget * widget, widgets) + { + if (widget->property(className) == true) { + widget->hide(); } } } -void EditorPage::showVerifyLabel(bool showLabel) -{ - if (showLabel == true) { - notificationWidget->show(); - } else { - notificationWidget->hide(); - } - -} - void setSaveState() { // curPage()->setFilePath(""); -- cgit v1.2.3