Move to Edit->Copy Viewport and add shortcut SHIFT-CTRL-C.

master
Torsten Paul 2015-05-16 17:41:52 +02:00
parent 591c98e979
commit ff2427cc1e
3 changed files with 10 additions and 6 deletions

View File

@ -196,7 +196,7 @@ private slots:
void actionExportSVG(); void actionExportSVG();
void actionExportCSG(); void actionExportCSG();
void actionExportImage(); void actionExportImage();
void actionExportToClipboard(); void actionCopyViewport();
void actionFlushCaches(); void actionFlushCaches();
public: public:

View File

@ -274,7 +274,6 @@
<addaction name="fileActionExportCSG"/> <addaction name="fileActionExportCSG"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="fileActionExportImage"/> <addaction name="fileActionExportImage"/>
<addaction name="fileActionExportClipboard"/>
</widget> </widget>
<addaction name="fileActionNew"/> <addaction name="fileActionNew"/>
<addaction name="fileActionOpen"/> <addaction name="fileActionOpen"/>
@ -303,6 +302,8 @@
<addaction name="editActionCopy"/> <addaction name="editActionCopy"/>
<addaction name="editActionPaste"/> <addaction name="editActionPaste"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="editActionCopyViewport"/>
<addaction name="separator"/>
<addaction name="editActionIndent"/> <addaction name="editActionIndent"/>
<addaction name="editActionUnindent"/> <addaction name="editActionUnindent"/>
<addaction name="editActionComment"/> <addaction name="editActionComment"/>
@ -1262,9 +1263,12 @@
<string>&amp;Cheat Sheet</string> <string>&amp;Cheat Sheet</string>
</property> </property>
</action> </action>
<action name="fileActionExportClipboard"> <action name="editActionCopyViewport">
<property name="text"> <property name="text">
<string>Export to Clipboard</string> <string>Copy Viewport</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+C</string>
</property> </property>
</action> </action>
</widget> </widget>

View File

@ -325,6 +325,7 @@ MainWindow::MainWindow(const QString &filename)
connect(this->editActionCut, SIGNAL(triggered()), editor, SLOT(cut())); connect(this->editActionCut, SIGNAL(triggered()), editor, SLOT(cut()));
connect(this->editActionCopy, SIGNAL(triggered()), editor, SLOT(copy())); connect(this->editActionCopy, SIGNAL(triggered()), editor, SLOT(copy()));
connect(this->editActionPaste, SIGNAL(triggered()), editor, SLOT(paste())); connect(this->editActionPaste, SIGNAL(triggered()), editor, SLOT(paste()));
connect(this->editActionCopyViewport, SIGNAL(triggered()), this, SLOT(actionCopyViewport()));
connect(this->editActionIndent, SIGNAL(triggered()), editor, SLOT(indentSelection())); connect(this->editActionIndent, SIGNAL(triggered()), editor, SLOT(indentSelection()));
connect(this->editActionUnindent, SIGNAL(triggered()), editor, SLOT(unindentSelection())); connect(this->editActionUnindent, SIGNAL(triggered()), editor, SLOT(unindentSelection()));
connect(this->editActionComment, SIGNAL(triggered()), editor, SLOT(commentSelection())); connect(this->editActionComment, SIGNAL(triggered()), editor, SLOT(commentSelection()));
@ -362,7 +363,6 @@ MainWindow::MainWindow(const QString &filename)
connect(this->fileActionExportSVG, SIGNAL(triggered()), this, SLOT(actionExportSVG())); connect(this->fileActionExportSVG, SIGNAL(triggered()), this, SLOT(actionExportSVG()));
connect(this->fileActionExportCSG, SIGNAL(triggered()), this, SLOT(actionExportCSG())); connect(this->fileActionExportCSG, SIGNAL(triggered()), this, SLOT(actionExportCSG()));
connect(this->fileActionExportImage, SIGNAL(triggered()), this, SLOT(actionExportImage())); connect(this->fileActionExportImage, SIGNAL(triggered()), this, SLOT(actionExportImage()));
connect(this->fileActionExportClipboard, SIGNAL(triggered()), this, SLOT(actionExportToClipboard()));
connect(this->designActionFlushCaches, SIGNAL(triggered()), this, SLOT(actionFlushCaches())); connect(this->designActionFlushCaches, SIGNAL(triggered()), this, SLOT(actionFlushCaches()));
// View menu // View menu
@ -2185,7 +2185,7 @@ void MainWindow::actionExportImage()
return; return;
} }
void MainWindow::actionExportToClipboard() void MainWindow::actionCopyViewport()
{ {
const QImage & image = qglview->grabFrame(); const QImage & image = qglview->grabFrame();
QClipboard *clipboard = QApplication::clipboard(); QClipboard *clipboard = QApplication::clipboard();