add condition to enable the richtext menu entry

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2180 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-05-28 16:50:35 +00:00
parent b5cdfb233d
commit e8e005dfaa
3 changed files with 19 additions and 2 deletions

View File

@@ -1066,6 +1066,20 @@ QSet<DiagramTextItem *> Diagram::selectedTexts() const {
return(selected_texts);
}
/**
* @brief Diagram::selectedConductorTexts
* @return the list of conductor texts selected
*/
QSet<ConductorTextItem *> Diagram::selectedConductorTexts() const {
QSet<ConductorTextItem *> selected_texts;
foreach(QGraphicsItem *item, selectedItems()) {
if (ConductorTextItem *cti = qgraphicsitem_cast<ConductorTextItem *>(item)) {
selected_texts << cti;
}
}
return(selected_texts);
}
/// @return true si le presse-papier semble contenir un schema
bool Diagram::clipboardMayContainDiagram() {
QString clipboard_text = QApplication::clipboard() -> text().trimmed();