src/main.cpp

changeset 230
a1f3f7d9078b
parent 229
38d86002d548
child 231
a9bf6bab5ea2
equal deleted inserted replaced
229:38d86002d548 230:a1f3f7d9078b
77 { offsetof(Ui_MainWindow, actionRenderStylePickScene), gl::RenderStyle::PickScene }, 77 { offsetof(Ui_MainWindow, actionRenderStylePickScene), gl::RenderStyle::PickScene },
78 }; 78 };
79 79
80 static std::optional<ModelId> openModelFromPath( 80 static std::optional<ModelId> openModelFromPath(
81 const QString& path, 81 const QString& path,
82 const LibraryManager* libraries, 82 const LibrariesModel* libraries,
83 DocumentManager* documents, 83 DocumentManager* documents,
84 QWidget* parent) 84 QWidget* parent)
85 { 85 {
86 QString errorString; 86 QString errorString;
87 QTextStream errorStream{&errorString}; 87 QTextStream errorStream{&errorString};
197 title += " "; 197 title += " ";
198 title += fullVersionString(); 198 title += fullVersionString();
199 return title; 199 return title;
200 } 200 }
201 201
202 static ColorTable loadColors(const LibraryManager* libraries) 202 static ColorTable loadColors(const LibrariesModel* libraries)
203 { 203 {
204 QTextStream errors; 204 QTextStream errors;
205 return libraries->loadColorTable(errors); 205 return libraries->loadColorTable(errors);
206 } 206 }
207 207
328 QMainWindow mainWindow; 328 QMainWindow mainWindow;
329 Ui_MainWindow ui; 329 Ui_MainWindow ui;
330 DocumentManager documents; 330 DocumentManager documents;
331 QString currentLanguage = "en"; 331 QString currentLanguage = "en";
332 QTranslator translator{&mainWindow}; 332 QTranslator translator{&mainWindow};
333 LibraryManager libraries{&mainWindow}; 333 LibrariesModel libraries{&mainWindow};
334 QStringList recentlyOpenedFiles; 334 QStringList recentlyOpenedFiles;
335 ColorTable colorTable; 335 ColorTable colorTable;
336 gl::RenderPreferences renderPreferences; 336 gl::RenderPreferences renderPreferences;
337 ui.setupUi(&mainWindow); 337 ui.setupUi(&mainWindow);
338 const uiutilities::KeySequenceMap defaultKeyboardShortcuts = 338 const uiutilities::KeySequenceMap defaultKeyboardShortcuts =

mercurial