mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user