AntiSpamFrame::~AntiSpamFrame() { clearTreeWidget(treeWidget_WHITE); clearTreeWidget(treeWidget_BLACK); clearTreeWidget(treeWidget_BLACK); if (AntiSpam::getInstance()) { AntiSpam::getInstance()->saveLists(); AntiSpam::getInstance()->saveSettings(); } }
void AnnotationWorkstationExtensionPlugin::onClearButtonPressed() { if (_generatedAnnotation) { PolyQtAnnotation* tmp = dynamic_cast<PolyQtAnnotation*>(_generatedAnnotation); if (tmp) { if (tmp->getInterpolationType() == "spline") { std::dynamic_pointer_cast<SplineAnnotationTool>(_annotationTools[2])->cancelAnnotation(); } else { std::dynamic_pointer_cast<PolyAnnotationTool>(_annotationTools[1])->cancelAnnotation(); } } else { PointSetQtAnnotation* tmp2 = dynamic_cast<PointSetQtAnnotation*>(_generatedAnnotation); if (tmp2) { std::dynamic_pointer_cast<PointSetAnnotationTool>(_annotationTools[3])->cancelAnnotation(); } } } _treeWidget->clearSelection(); clearTreeWidget(); clearQtAnnotations(); clearAnnotationList(); _annotationGroupIndex = 0; _annotationIndex = 0; }
void AntiSpamFrame::loadList(QTreeWidget *tree, QList<QString> &list) { if (!tree) return; clearTreeWidget(tree); for (int i = 0; i < list.size(); i++) { QTreeWidgetItem *it = new QTreeWidgetItem(tree); it->setText(0, list.at(i)); } }
void AntiSpamFrame::slotClearWhite() { clearTreeWidget(treeWidget_WHITE); if (AntiSpam::getInstance()) AntiSpam::getInstance()->clearWhite(); }
void AntiSpamFrame::slotClearGray() { clearTreeWidget(treeWidget_GRAY); if (AntiSpam::getInstance()) AntiSpam::getInstance()->clearGray(); }
void AntiSpamFrame::slotClearBlack() { clearTreeWidget(treeWidget_BLACK); if (AntiSpam::getInstance()) AntiSpam::getInstance()->clearBlack(); }