Show the result generation a layout.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-05-12 19:52:07 +03:00
parent c76718e9d0
commit e0b78f0f27
3 changed files with 50 additions and 0 deletions

View File

@ -131,6 +131,9 @@ MainWindow::MainWindow(QWidget *parent)
ui->toolBarStages->setIconSize(QSize(24, 24));
ui->toolBarTools->setIconSize(QSize(24, 24));
#endif
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &MainWindow::ShowPaper);
ui->dockWidgetLayoutPages->setVisible(false);
}
//---------------------------------------------------------------------------------------------------------------------
@ -2218,6 +2221,8 @@ void MainWindow::ReadSettings()
*/
void MainWindow::WriteSettings()
{
ActionDraw(true);
qApp->getSettings()->SetGeometry(saveGeometry());
qApp->getSettings()->SetWindowState(saveState());
qApp->getSettings()->SetToolbarsState(saveState(APP_VERSION));
@ -2735,6 +2740,22 @@ void MainWindow::ToolBarStyles()
ToolBarStyle(ui->mainToolBar);
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::ShowPaper(int index)
{
if (index < 0 || index > scenes.size())
{
ui->view->setScene(tempSceneLayout);
//EnableActions(false);
}
else
{
ui->view->setScene(scenes.at(index));
}
ui->view->fitInView(ui->view->scene()->sceneRect(), Qt::KeepAspectRatio);
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::ToolBarStyle(QToolBar *bar)
{

View File

@ -138,6 +138,8 @@ public slots:
void GlobalChangePP(const QString &patternPiece);
void WindowsLocale();
void ToolBarStyles();
void ShowPaper(int index);
signals:
void RefreshHistory();
void EnableItemMove(bool move);

View File

@ -1048,12 +1048,39 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="tabKeyNavigation">
<bool>true</bool>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="iconSize">
<size>
<width>150</width>
<height>200</height>
</size>
</property>
<property name="movement">
<enum>QListView::Static</enum>
</property>
<property name="flow">
<enum>QListView::TopToBottom</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>10</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
</widget>
</item>
</layout>