"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/kdefrontend/MainWin.cpp" between
labplot-2.8.1.tar.gz and labplot-2.8.2.tar.gz

About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.

MainWin.cpp  (labplot-2.8.1):MainWin.cpp  (labplot-2.8.2)
skipping to change at line 1186 skipping to change at line 1186
connect(m_projectExplorer, &ProjectExplorer::currentAspectChanged , this, &MainWin::handleCurrentAspectChanged); connect(m_projectExplorer, &ProjectExplorer::currentAspectChanged , this, &MainWin::handleCurrentAspectChanged);
connect(m_projectExplorer, &ProjectExplorer::activateView, this, &MainWin::activateSubWindowForAspect); connect(m_projectExplorer, &ProjectExplorer::activateView, this, &MainWin::activateSubWindowForAspect);
connect(m_projectExplorerDock, &QDockWidget::visibilityChanged, t his, &MainWin::projectExplorerDockVisibilityChanged); connect(m_projectExplorerDock, &QDockWidget::visibilityChanged, t his, &MainWin::projectExplorerDockVisibilityChanged);
//Properties dock //Properties dock
m_propertiesDock = new QDockWidget(this); m_propertiesDock = new QDockWidget(this);
m_propertiesDock->setObjectName("aspect_properties_dock"); m_propertiesDock->setObjectName("aspect_properties_dock");
m_propertiesDock->setWindowTitle(i18nc("@title:window", "Properti es")); m_propertiesDock->setWindowTitle(i18nc("@title:window", "Properti es"));
//restore the position of the dock widgets //restore the position of the dock widgets:
//"WindowState" doesn't always contain the positions of the dock
widgets,
//user opened the application and closed it without creating a ne
w project
//and with this the dock widgets - this creates a "WindowState" s
ection in the settings without dock widgets positions.
//So, we set our default positions first and then read from the s
aved "WindowState" section
addDockWidget(Qt::LeftDockWidgetArea, m_projectExplorerDock);
addDockWidget(Qt::RightDockWidgetArea, m_propertiesDock);
if (group.keyList().indexOf("WindowState") != -1) if (group.keyList().indexOf("WindowState") != -1)
restoreState(group.readEntry("WindowState", QByteArray()) ); restoreState(group.readEntry("WindowState", QByteArray()) );
else {
addDockWidget(Qt::LeftDockWidgetArea, m_projectExplorerDo
ck);
addDockWidget(Qt::RightDockWidgetArea, m_propertiesDock);
}
auto* scrollArea = new QScrollArea(m_propertiesDock); auto* scrollArea = new QScrollArea(m_propertiesDock);
scrollArea->setWidgetResizable(true); scrollArea->setWidgetResizable(true);
stackedWidget = new QStackedWidget(scrollArea); stackedWidget = new QStackedWidget(scrollArea);
scrollArea->setWidget(stackedWidget); // stacked widget inside scroll area scrollArea->setWidget(stackedWidget); // stacked widget inside scroll area
m_propertiesDock->setWidget(scrollArea); // scroll area in side dock m_propertiesDock->setWidget(scrollArea); // scroll area in side dock
connect(m_propertiesDock, &QDockWidget::visibilityChanged, this, &MainWin::propertiesDockVisibilityChanged); connect(m_propertiesDock, &QDockWidget::visibilityChanged, this, &MainWin::propertiesDockVisibilityChanged);
skipping to change at line 2030 skipping to change at line 2032
void MainWin::createFolderContextMenu(const Folder* folder, QMenu* menu) const { void MainWin::createFolderContextMenu(const Folder* folder, QMenu* menu) const {
Q_UNUSED(folder); Q_UNUSED(folder);
//Folder provides it's own context menu. Add a separator before adding ad ditional actions. //Folder provides it's own context menu. Add a separator before adding ad ditional actions.
menu->addSeparator(); menu->addSeparator();
this->createContextMenu(menu); this->createContextMenu(menu);
} }
void MainWin::undo() { void MainWin::undo() {
WAIT_CURSOR; WAIT_CURSOR;
m_project->setSuppressAspectAddedSignal(true);//don't change the current aspect in the project explorer
m_project->undoStack()->undo(); m_project->undoStack()->undo();
m_project->setSuppressAspectAddedSignal(false);
if (m_project->undoStack()->index() == 0) { if (m_project->undoStack()->index() == 0) {
updateTitleBar(); updateTitleBar();
m_saveAction->setEnabled(false); m_saveAction->setEnabled(false);
m_undoAction->setEnabled(false); m_undoAction->setEnabled(false);
m_project->setChanged(false); m_project->setChanged(false);
} }
m_redoAction->setEnabled(true); m_redoAction->setEnabled(true);
RESET_CURSOR; RESET_CURSOR;
} }
void MainWin::redo() { void MainWin::redo() {
WAIT_CURSOR; WAIT_CURSOR;
m_project->setSuppressAspectAddedSignal(true);
m_project->undoStack()->redo(); m_project->undoStack()->redo();
m_project->setSuppressAspectAddedSignal(false);
projectChanged(); projectChanged();
if (m_project->undoStack()->index() == m_project->undoStack()->count()) if (m_project->undoStack()->index() == m_project->undoStack()->count())
m_redoAction->setEnabled(false); m_redoAction->setEnabled(false);
RESET_CURSOR; RESET_CURSOR;
} }
/*! /*!
Shows/hides mdi sub-windows depending on the current visibility policy. Shows/hides mdi sub-windows depending on the current visibility policy.
*/ */
void MainWin::updateMdiWindowVisibility() const { void MainWin::updateMdiWindowVisibility() const {
 End of changes. 6 change blocks. 
6 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)