Added two docks.

--HG--
branch : develop
This commit is contained in:
dismine 2014-08-18 21:34:26 +03:00
parent bbf88fc585
commit 2bdc5f3771
2 changed files with 64 additions and 13 deletions

View File

@ -1938,18 +1938,27 @@ void MainWindow::CreateMenus()
QAction *undoAction = qApp->getUndoStack()->createUndoAction(this, tr("&Undo"));
undoAction->setShortcuts(QKeySequence::Undo);
undoAction->setIcon(QIcon::fromTheme("edit-undo"));
ui->menuDrawing->insertAction(ui->actionPattern_properties, undoAction);
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, undoAction);
ui->toolBarTools->addAction(undoAction);
QAction *redoAction = qApp->getUndoStack()->createRedoAction(this, tr("&Redo"));
redoAction->setShortcuts(QKeySequence::Redo);
redoAction->setIcon(QIcon::fromTheme("edit-redo"));
ui->menuDrawing->insertAction(ui->actionPattern_properties, redoAction);
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, redoAction);
ui->toolBarTools->addAction(redoAction);
separatorAct = new QAction(this);
separatorAct->setSeparator(true);
ui->menuDrawing->insertAction(ui->actionPattern_properties, separatorAct);
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, separatorAct);
//Add docks
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, ui->dockWidgetHistory->toggleViewAction());
ui->dockWidgetHistory->close();//Default don't show hostory
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, ui->dockWidgetToolOptions->toggleViewAction());
separatorAct = new QAction(this);
separatorAct->setSeparator(true);
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, separatorAct);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -26,13 +26,13 @@
<widget class="QToolBox" name="toolBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>1</horstretch>
<horstretch>2</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>85</width>
<width>105</width>
<height>0</height>
</size>
</property>
@ -40,14 +40,14 @@
<string/>
</property>
<property name="currentIndex">
<number>4</number>
<number>0</number>
</property>
<widget class="QWidget" name="page">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>820</width>
<width>144</width>
<height>272</height>
</rect>
</property>
@ -308,7 +308,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>820</width>
<width>105</width>
<height>70</height>
</rect>
</property>
@ -384,7 +384,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>820</width>
<width>105</width>
<height>116</height>
</rect>
</property>
@ -512,7 +512,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>820</width>
<width>105</width>
<height>70</height>
</rect>
</property>
@ -588,7 +588,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<width>105</width>
<height>64</height>
</rect>
</property>
@ -663,6 +663,12 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
@ -704,7 +710,7 @@
<addaction name="actionAbout_Qt"/>
<addaction name="actionAbout_Valentina"/>
</widget>
<widget class="QMenu" name="menuDrawing">
<widget class="QMenu" name="menuPatternPiece">
<property name="title">
<string>&amp;Pattern piece</string>
</property>
@ -724,7 +730,7 @@
<addaction name="actionTable"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuDrawing"/>
<addaction name="menuPatternPiece"/>
<addaction name="menuMeasurements"/>
<addaction name="menuHelp"/>
</widget>
@ -798,6 +804,42 @@
<addaction name="actionZoomOriginal"/>
<addaction name="actionZoomFitBest"/>
</widget>
<widget class="QDockWidget" name="dockWidgetHistory">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>41</height>
</size>
</property>
<property name="allowedAreas">
<set>Qt::BottomDockWidgetArea|Qt::LeftDockWidgetArea|Qt::TopDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>History</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_8"/>
</widget>
<widget class="QDockWidget" name="dockWidgetToolOptions">
<property name="minimumSize">
<size>
<width>125</width>
<height>41</height>
</size>
</property>
<property name="windowTitle">
<string>Tool options</string>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockWidgetContents_10"/>
</widget>
<action name="actionNew">
<property name="icon">
<iconset theme="document-new">