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->toolBarStages->setIconSize(QSize(24, 24));
ui->toolBarTools->setIconSize(QSize(24, 24)); ui->toolBarTools->setIconSize(QSize(24, 24));
#endif #endif
connect(ui->listWidget, &QListWidget::currentRowChanged, this, &MainWindow::ShowPaper);
ui->dockWidgetLayoutPages->setVisible(false);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -2218,6 +2221,8 @@ void MainWindow::ReadSettings()
*/ */
void MainWindow::WriteSettings() void MainWindow::WriteSettings()
{ {
ActionDraw(true);
qApp->getSettings()->SetGeometry(saveGeometry()); qApp->getSettings()->SetGeometry(saveGeometry());
qApp->getSettings()->SetWindowState(saveState()); qApp->getSettings()->SetWindowState(saveState());
qApp->getSettings()->SetToolbarsState(saveState(APP_VERSION)); qApp->getSettings()->SetToolbarsState(saveState(APP_VERSION));
@ -2735,6 +2740,22 @@ void MainWindow::ToolBarStyles()
ToolBarStyle(ui->mainToolBar); 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) void MainWindow::ToolBarStyle(QToolBar *bar)
{ {

View File

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

View File

@ -1048,12 +1048,39 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </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"> <property name="iconSize">
<size> <size>
<width>150</width> <width>150</width>
<height>200</height> <height>200</height>
</size> </size>
</property> </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> </widget>
</item> </item>
</layout> </layout>