Return to initial concept.
This commit is contained in:
parent
dc50d24439
commit
5f607008ac
|
@ -61,8 +61,6 @@ VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
|
|||
ui(new Ui::VPMainWindow),
|
||||
m_cmd(cmd)
|
||||
{
|
||||
m_layout = new VPLayout();
|
||||
|
||||
// create a standard sheet
|
||||
auto *sheet = new VPSheet(m_layout);
|
||||
sheet->SetName(QObject::tr("Sheet 1"));
|
||||
|
@ -70,19 +68,19 @@ VPMainWindow::VPMainWindow(const VPCommandLinePtr &cmd, QWidget *parent) :
|
|||
m_layout->SetFocusedSheet();
|
||||
|
||||
// // ----- for test purposes, to be removed------------------
|
||||
// sheet->SetSheetMarginsConverted(1, 1, 1, 1);
|
||||
// sheet->SetSheetSizeConverted(84.1, 118.9);
|
||||
// sheet->SetPiecesGapConverted(1);
|
||||
sheet->SetSheetMarginsConverted(1, 1, 1, 1);
|
||||
sheet->SetSheetSizeConverted(84.1, 118.9);
|
||||
sheet->SetPiecesGapConverted(1);
|
||||
|
||||
// m_layout->SetUnit(Unit::Cm);
|
||||
// m_layout->SetWarningSuperpositionOfPieces(true);
|
||||
// m_layout->SetTitle(QString("My Test Layout"));
|
||||
// m_layout->SetDescription(QString("Description of my Layout"));
|
||||
m_layout->SetUnit(Unit::Cm);
|
||||
m_layout->SetWarningSuperpositionOfPieces(true);
|
||||
m_layout->SetTitle(QString("My Test Layout"));
|
||||
m_layout->SetDescription(QString("Description of my Layout"));
|
||||
|
||||
// m_layout->SetTilesSizeConverted(21,29.7);
|
||||
// m_layout->SetTilesOrientation(PageOrientation::Portrait);
|
||||
// m_layout->SetTilesMarginsConverted(1,1,1,1);
|
||||
// m_layout->SetShowTiles(true);
|
||||
m_layout->SetTilesSizeConverted(21,29.7);
|
||||
m_layout->SetTilesOrientation(PageOrientation::Portrait);
|
||||
m_layout->SetTilesMarginsConverted(1,1,1,1);
|
||||
m_layout->SetShowTiles(true);
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
||||
|
@ -211,9 +209,12 @@ void VPMainWindow::ImportRawLayouts(const QStringList &rawLayouts)
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPMainWindow::InitZoom()
|
||||
{
|
||||
if (m_graphicsView != nullptr)
|
||||
{
|
||||
m_graphicsView->ZoomFitBest();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPPiece* VPMainWindow::CreatePiece(const VLayoutPiece &rawPiece)
|
||||
|
@ -260,7 +261,6 @@ void VPMainWindow::SetupMenu()
|
|||
// Add dock properties action
|
||||
QAction* actionDockWidgetToolOptions = ui->dockWidgetProperties->toggleViewAction();
|
||||
ui->menuWindows->addAction(actionDockWidgetToolOptions);
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -421,7 +421,6 @@ void VPMainWindow::InitPropertyTabLayout()
|
|||
void VPMainWindow::InitCarrousel()
|
||||
{
|
||||
m_carrousel = new VPCarrousel(m_layout, ui->dockWidgetCarrousel);
|
||||
m_carrousel->setDisabled(true);
|
||||
ui->dockWidgetCarrousel->setWidget(m_carrousel);
|
||||
|
||||
connect(ui->dockWidgetCarrousel, QOverload<Qt::DockWidgetArea>::of(&QDockWidget::dockLocationChanged), this,
|
||||
|
@ -590,7 +589,6 @@ void VPMainWindow::SetPropertyTabLayoutData()
|
|||
void VPMainWindow::InitMainGraphics()
|
||||
{
|
||||
m_graphicsView = new VPMainGraphicsView(m_layout, m_tileFactory, this);
|
||||
m_graphicsView->setDisabled(true);
|
||||
ui->centralWidget->layout()->addWidget(m_graphicsView);
|
||||
|
||||
m_graphicsView->RefreshLayout();
|
||||
|
@ -641,7 +639,6 @@ void VPMainWindow::InitZoomToolBar()
|
|||
m_doubleSpinBoxScale = new QDoubleSpinBox(this);
|
||||
m_doubleSpinBoxScale->setDecimals(1);
|
||||
m_doubleSpinBoxScale->setSuffix("%");
|
||||
m_doubleSpinBoxScale->setDisabled(true);
|
||||
on_ScaleChanged(m_graphicsView->transform().m11());
|
||||
connect(m_doubleSpinBoxScale.data(), QOverload<double>::of(&QDoubleSpinBox::valueChanged),
|
||||
this, [this](double d){m_graphicsView->Zoom(d/100.0);});
|
||||
|
|
|
@ -407,7 +407,7 @@ private:
|
|||
|
||||
VPCommandLinePtr m_cmd;
|
||||
|
||||
VPLayout *m_layout{nullptr};
|
||||
VPLayout *m_layout{new VPLayout()};
|
||||
QList<VPPiece *>m_selectedPieces{QList<VPPiece *>()};
|
||||
|
||||
VPTileFactory *m_tileFactory{nullptr};
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidgetProperties">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
|
@ -231,6 +231,9 @@
|
|||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollAreaCurrentPiece">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
|
@ -1576,7 +1579,7 @@
|
|||
</action>
|
||||
<action name="actionSave">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-save">
|
||||
|
@ -1591,7 +1594,7 @@
|
|||
</action>
|
||||
<action name="actionSaveAs">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="document-save-as">
|
||||
|
@ -1606,7 +1609,7 @@
|
|||
</action>
|
||||
<action name="actionCloseLayout">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Close Layout</string>
|
||||
|
@ -1614,7 +1617,7 @@
|
|||
</action>
|
||||
<action name="actionImportRawLayout">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Import Raw Layout Data</string>
|
||||
|
@ -1678,7 +1681,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Properties</string>
|
||||
|
@ -1689,7 +1692,7 @@
|
|||
</action>
|
||||
<action name="actionZoomIn">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="zoom-in">
|
||||
|
@ -1701,7 +1704,7 @@
|
|||
</action>
|
||||
<action name="actionZoomOut">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="zoom-out">
|
||||
|
@ -1713,7 +1716,7 @@
|
|||
</action>
|
||||
<action name="actionZoomOriginal">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="zoom-original">
|
||||
|
@ -1725,7 +1728,7 @@
|
|||
</action>
|
||||
<action name="actionZoomFitBest">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="zoom-fit-best">
|
||||
|
|
Loading…
Reference in New Issue
Block a user