Changeset View
Changeset View
Standalone View
Standalone View
src/mainwindow.cpp
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Line(s) | 144 | { | |||
---|---|---|---|---|---|
168 | action = KStandardAction::quit(this, SLOT(close()), actionCollection()); | 168 | action = KStandardAction::quit(this, SLOT(close()), actionCollection()); | ||
169 | 169 | | |||
170 | setupGUI(Default, ":/atelierui"); | 170 | setupGUI(Default, ":/atelierui"); | ||
171 | } | 171 | } | ||
172 | 172 | | |||
173 | void MainWindow::openFile() | 173 | void MainWindow::openFile() | ||
174 | { | 174 | { | ||
175 | QUrl fileName = QFileDialog::getOpenFileUrl(this, i18n("Open GCode"), | 175 | QUrl fileName = QFileDialog::getOpenFileUrl(this, i18n("Open GCode"), | ||
176 | QDir::homePath(), i18n("GCode (*.gco *.gcode)")); | 176 | QUrl::fromLocalFile(QDir::homePath()), i18n("GCode(*.gco *.gcode);;All Files(*.*)")); | ||
177 | 177 | | |||
178 | if (!fileName.isEmpty()) { | 178 | if (!fileName.isEmpty()) { | ||
179 | 179 | | |||
180 | m_lateral.get<GCodeEditorWidget>("gcode")->loadFile(fileName); | 180 | m_lateral.get<GCodeEditorWidget>("gcode")->loadFile(fileName); | ||
181 | m_lateral.get<Viewer3D>("3d")->drawModel(fileName.toString()); | 181 | m_lateral.get<Viewer3D>("3d")->drawModel(fileName.toString()); | ||
182 | 182 | | |||
183 | const int tabs = m_instances->count(); | 183 | const int tabs = m_instances->count(); | ||
184 | m_openFiles.append(fileName); | 184 | m_openFiles.append(fileName); | ||
Show All 12 Lines |