Commit 14ef815d authored by Matthias Möller's avatar Matthias Möller

- extra button for pasting view and the window size

- old "paste View" paste only the view

refs #531

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14363 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c06f18cb
......@@ -434,7 +434,7 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
QAction* copyView = _menu->addAction(tr("Copy View"));
copyView->setToolTip(tr("Copy current view to clipboard"));
copyView->setToolTip(tr("Copy current view, window size and toolbar size to clipboard"));
copyView->setIcon( QIcon(iconPath+"edit-copy.png") );
connect(copyView, SIGNAL(triggered()), this, SLOT(slotCopyView()) );
......@@ -447,6 +447,13 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
QAction* pasteViewAndWindow = _menu->addAction(tr("Paste View and Window Size"));
pasteViewAndWindow->setToolTip(tr("Paste current view, window size and the toolbox size from clipboard"));
pasteViewAndWindow->setIcon( QIcon(iconPath+"edit-paste.png") );
connect(pasteViewAndWindow, SIGNAL(triggered()), this , SLOT( slotPasteViewAndWindow( ) ) );
//====================================================================================================
QAction* snapshot_examiner = _menu->addAction(tr("Examiner Snapshot"));
snapshot_examiner->setToolTip(tr("Take a snapshot of the current examiner"));
snapshot_examiner->setIcon( QIcon(iconPath+"snapshot.png") );
......
......@@ -882,6 +882,9 @@ public:
/// Paste the view to the last active examiner
void slotPasteView( );
/// Paste the view, the window and toolbox size to the last active examiner
void slotPasteViewAndWindow( );
/// Copy view from the last active examiner
void slotCopyView( );
......
......@@ -832,6 +832,11 @@ void CoreWidget::delete_garbage() {
}
void CoreWidget::slotPasteView( ) {
examiner_widgets_[PluginFunctions::activeExaminer()]->actionPasteView();
}
void CoreWidget::slotPasteViewAndWindow()
{
QSize size;
int splitterWidth;
examiner_widgets_[PluginFunctions::activeExaminer()]->actionPasteView(&size,&splitterWidth);
......@@ -860,29 +865,16 @@ void CoreWidget::slotPasteView( ) {
//resize window
if (size.isValid())
{
//ask for restoring the window size
QMessageBox msgBox;
msgBox.setText(QString("Restore window size?"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Ok);
int ret = msgBox.exec();
if (ret == QMessageBox::Ok)
if (size == QSize(0,0))
{
if (size == QSize(0,0))
{
showMaximized();
}
else
{
showNormal();
resizeApplication(size.width(),size.height());
}
showMaximized();
}
else
{
showNormal();
resizeApplication(size.width(),size.height());
}
}
}
void CoreWidget::slotCopyView( ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment