mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 00:30:53 +01:00
Title block template editor: implemented copy operation.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1556 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -130,6 +130,38 @@ void TitleBlockTemplateView::zoomReset() {
|
||||
resetMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
Export currently selected cells to the clipboard before setting them as
|
||||
empty.
|
||||
*/
|
||||
void TitleBlockTemplateView::cut() {
|
||||
/// TODO
|
||||
}
|
||||
|
||||
/**
|
||||
Export currently selected cells to the clipboard.
|
||||
*/
|
||||
void TitleBlockTemplateView::copy() {
|
||||
if (!tbtemplate_) return;
|
||||
|
||||
QDomDocument xml_export;
|
||||
QDomElement tbtpartial = xml_export.createElement("titleblocktemplate-partial");
|
||||
xml_export.appendChild(tbtpartial);
|
||||
foreach (TitleBlockCell *cell, selectedCells()) {
|
||||
tbtemplate_ -> exportCellToXml(cell, tbtpartial);
|
||||
}
|
||||
|
||||
QClipboard *clipboard = QApplication::clipboard();
|
||||
clipboard -> setText(xml_export.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
Import the cells described in the clipboard.
|
||||
*/
|
||||
void TitleBlockTemplateView::paste() {
|
||||
/// TODO
|
||||
}
|
||||
|
||||
/**
|
||||
Add a column right before the last index selected when calling the context
|
||||
menu.
|
||||
|
||||
Reference in New Issue
Block a user