55 explicit MainWindow(QWidget *parent =
nullptr);
66 void browseModelFile();
71 void browseTextureFile();
76 void browseTextureDirectory();
81 void openModelViewer();
97 void openRecentModel(
int index);
102 void showAboutDialog();
107 void showSettingsDialog();
123 void updateRecentFiles(
const QString &modelPath);
128 void removeRecentFile();
149 void setupCentralWidget();
154 void setupStatusBar();
159 void createConnections();
165 void updateUIState(
bool processRunning);
170 void validatePaths();
175 void loadRecentFiles();
180 void populateResolutionCombo();
186 QString resolveExecutablePath()
const;
205 void dropEvent(QDropEvent *event)
override;
209 QLineEdit *modelLineEdit;
212 QLineEdit *textureLineEdit;
215 QLineEdit *textureDirLineEdit;
218 QPlainTextEdit *consoleOutput;
221 QProcess *activeProcess;
224 QPushButton *openButton;
227 QPushButton *stopButton;
230 QPushButton *clearButton;
233 QComboBox *resolutionCombo;
236 QComboBox *recentFilesCombo;
239 QAction *openModelAction;
242 QAction *openTextureAction;
245 QAction *openTextureDirAction;
248 QAction *clearConsoleAction;
254 QAction *aboutAction;
257 QAction *settingsAction;
266 QString executablePath;
269 QStringList recentModels;
272 static constexpr int MAX_RECENT_FILES = 10;
void closeEvent(QCloseEvent *event) override
Confirms shutdown when the viewer process is still running.
~MainWindow() override
Persists settings and stops any running renderer process.
void dragEnterEvent(QDragEnterEvent *event) override
Accepts drag events that contain file or directory URLs.
MainWindow(QWidget *parent=nullptr)
Constructs the launcher window and restores persisted settings.
void dropEvent(QDropEvent *event) override
Assigns dropped model, texture, or directory paths to the matching input.