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:
xavier
2012-03-11 16:06:22 +00:00
parent fa34d7fbe6
commit 1f192b26c7
6 changed files with 67 additions and 6 deletions

View File

@@ -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.