git-svn-id: svn://db.shs.com.ru/libs@629 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -284,3 +284,39 @@ void QGLViewWindow::on_actionAdd_sphere_triggered() {
|
||||
view->addObject(o->clone());
|
||||
delete o;
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::on_actionArrow_triggered(bool on) {
|
||||
actionArrow ->setChecked(true);
|
||||
actionMove ->setChecked(false);
|
||||
actionRotate->setChecked(false);
|
||||
actionScale ->setChecked(false);
|
||||
view->view()->setCurrentHadle(RendererService::htNoHandle);
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::on_actionMove_triggered(bool on) {
|
||||
actionArrow ->setChecked(false);
|
||||
actionMove ->setChecked(true);
|
||||
actionRotate->setChecked(false);
|
||||
actionScale ->setChecked(false);
|
||||
view->view()->setCurrentHadle(RendererService::htMoveX);
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::on_actionRotate_triggered(bool on) {
|
||||
actionArrow ->setChecked(false);
|
||||
actionMove ->setChecked(false);
|
||||
actionRotate->setChecked(true);
|
||||
actionScale ->setChecked(false);
|
||||
view->view()->setCurrentHadle(RendererService::htRotateX);
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::on_actionScale_triggered(bool on) {
|
||||
actionArrow ->setChecked(false);
|
||||
actionMove ->setChecked(false);
|
||||
actionRotate->setChecked(false);
|
||||
actionScale ->setChecked(true);
|
||||
view->view()->setCurrentHadle(RendererService::htScaleX);
|
||||
}
|
||||
|
||||
@@ -119,6 +119,11 @@ private slots:
|
||||
void on_actionAdd_cube_triggered();
|
||||
void on_actionAdd_sphere_triggered();
|
||||
|
||||
void on_actionArrow_triggered(bool on);
|
||||
void on_actionMove_triggered(bool on);
|
||||
void on_actionRotate_triggered(bool on);
|
||||
void on_actionScale_triggered(bool on);
|
||||
|
||||
public slots:
|
||||
|
||||
signals:
|
||||
|
||||
@@ -1193,8 +1193,18 @@
|
||||
<addaction name="actionAdd_cube"/>
|
||||
<addaction name="actionAdd_sphere"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuMode">
|
||||
<property name="title">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<addaction name="actionArrow"/>
|
||||
<addaction name="actionMove"/>
|
||||
<addaction name="actionRotate"/>
|
||||
<addaction name="actionScale"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuAdd"/>
|
||||
<addaction name="menuMode"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar_"/>
|
||||
<widget class="QToolBar" name="toolBar_2">
|
||||
@@ -1298,6 +1308,65 @@
|
||||
<string>Add plane</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionArrow">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Arrow</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+1</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMove">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/transform-move.png</normaloff>:/icons/transform-move.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Move</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+2</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRotate">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/transform-rotate.png</normaloff>:/icons/transform-rotate.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rotate</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+3</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionScale">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qglview.qrc">
|
||||
<normaloff>:/icons/transform-scale.png</normaloff>:/icons/transform-scale.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+4</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
Reference in New Issue
Block a user