src/toolsets/movetoolset.cpp

changeset 1323
05b3e173c900
parent 1319
39d7a9642eea
child 1326
69a90bd2dba2
equal deleted inserted replaced
1322:d8935cdb24c0 1323:05b3e173c900
51 moveSelection (false); 51 moveSelection (false);
52 } 52 }
53 53
54 void MoveToolset::gridCoarse() 54 void MoveToolset::gridCoarse()
55 { 55 {
56 m_config->setGrid (Grid::Coarse); 56 config::setGrid (Grid::Coarse);
57 m_window->updateGridToolBar(); 57 m_window->updateGridToolBar();
58 } 58 }
59 59
60 void MoveToolset::gridMedium() 60 void MoveToolset::gridMedium()
61 { 61 {
62 m_config->setGrid (Grid::Medium); 62 config::setGrid (Grid::Medium);
63 m_window->updateGridToolBar(); 63 m_window->updateGridToolBar();
64 } 64 }
65 65
66 void MoveToolset::gridFine() 66 void MoveToolset::gridFine()
67 { 67 {
68 m_config->setGrid (Grid::Fine); 68 config::setGrid (Grid::Fine);
69 m_window->updateGridToolBar(); 69 m_window->updateGridToolBar();
70 } 70 }
71 71
72 void MoveToolset::polarGrid() 72 void MoveToolset::polarGrid()
73 { 73 {
74 m_config->togglePolarGrid(); 74 config::togglePolarGrid();
75 m_window->updateGridToolBar(); 75 m_window->updateGridToolBar();
76 } 76 }
77 77
78 void MoveToolset::moveObjects(QVector3D vector) 78 void MoveToolset::moveObjects(QVector3D vector)
79 { 79 {
153 { 153 {
154 QDialog* dialog = new QDialog; 154 QDialog* dialog = new QDialog;
155 Ui_RotPointUI ui; 155 Ui_RotPointUI ui;
156 ui.setupUi(dialog); 156 ui.setupUi(dialog);
157 157
158 switch (RotationPoint(m_config->rotationPointType())) 158 switch (RotationPoint(config::rotationPointType()))
159 { 159 {
160 case ObjectOrigin: 160 case ObjectOrigin:
161 ui.objectPoint->setChecked (true); 161 ui.objectPoint->setChecked (true);
162 break; 162 break;
163 163
168 case CustomPoint: 168 case CustomPoint:
169 ui.customPoint->setChecked (true); 169 ui.customPoint->setChecked (true);
170 break; 170 break;
171 } 171 }
172 172
173 Vertex custompoint = m_config->customRotationPoint(); 173 Vertex custompoint = config::customRotationPoint();
174 ui.customX->setValue(custompoint.x); 174 ui.customX->setValue(custompoint.x);
175 ui.customY->setValue(custompoint.y); 175 ui.customY->setValue(custompoint.y);
176 ui.customZ->setValue(custompoint.z); 176 ui.customZ->setValue(custompoint.z);
177 177
178 if (dialog->exec() == QDialog::Accepted) 178 if (dialog->exec() == QDialog::Accepted)
187 pointType = CustomPoint; 187 pointType = CustomPoint;
188 188
189 custompoint.x = ui.customX->value(); 189 custompoint.x = ui.customX->value();
190 custompoint.y = ui.customY->value(); 190 custompoint.y = ui.customY->value();
191 custompoint.z = ui.customZ->value(); 191 custompoint.z = ui.customZ->value();
192 m_config->setRotationPointType(pointType); 192 config::setRotationPointType(pointType);
193 m_config->setCustomRotationPoint(custompoint); 193 config::setCustomRotationPoint(custompoint);
194 } 194 }
195 } 195 }

mercurial