 |
Geometrize
1.0
An application for geometrizing images into geometric primitives
|
◆ bringLaunchWindowToFront()
void geometrize::common::ui::bringLaunchWindowToFront |
( |
| ) |
|
58 std::vector<dialog::LaunchWindow*> launchWindows{dialog::LaunchWindow::getTopLevelLaunchWindows()};
60 if(launchWindows.empty()) {
64 dialog::LaunchWindow* firstLauncher{launchWindows.front()};
65 firstLauncher->setWindowState(firstLauncher->windowState() & ~Qt::WindowMinimized);
66 firstLauncher->show();
67 firstLauncher->raise();
68 QApplication::setActiveWindow(firstLauncher);
◆ centerWidgetOnScreen()
void geometrize::common::ui::centerWidgetOnScreen |
( |
QWidget & |
widget, |
|
|
const QScreen & |
screen |
|
) |
| |
39 widget.setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, widget.size(), screen.availableGeometry()));
◆ getFirstScreenContainingCursor()
const QScreen * geometrize::common::ui::getFirstScreenContainingCursor |
( |
| ) |
|
32 const QPoint globalCursorPos = QCursor::pos();
33 const QScreen* mouseScreen = QGuiApplication::screenAt(globalCursorPos);
◆ isLaunchWindowOpen()
bool geometrize::common::ui::isLaunchWindowOpen |
( |
| ) |
|
53 return dialog::LaunchWindow::getTopLevelLaunchWindows().size() > 0;
◆ openAboutPage()
void geometrize::common::ui::openAboutPage |
( |
QWidget * |
parent | ) |
|
88 dialog::AboutDialog dialog(parent);
◆ openGenericFolderPickerDialog()
QString geometrize::common::ui::openGenericFolderPickerDialog |
( |
QWidget * |
parent | ) |
|
100 return QFileDialog::getExistingDirectory(parent, QWidget::tr(
"Select Folder",
"Title on a dialog that allows the user to select a folder"));
◆ openGetScriptDialog()
QString geometrize::common::ui::openGetScriptDialog |
( |
QWidget * |
parent | ) |
|
184 dialog::RunScriptDialog dialog(parent);
186 return dialog.getScriptFilepath();
◆ openGetUrlDialog()
QUrl geometrize::common::ui::openGetUrlDialog |
( |
QWidget * |
parent | ) |
|
175 dialog::OpenUrlDialog dialog(parent);
176 if(dialog.exec() == QDialog::Accepted) {
177 return dialog.getUrl();
◆ openGlobalPreferences()
void geometrize::common::ui::openGlobalPreferences |
( |
QWidget * |
parent | ) |
|
94 dialog::GlobalPreferencesDialog preferencesDialog(parent);
95 preferencesDialog.exec();
◆ openImagePathPickerDialog()
QString geometrize::common::ui::openImagePathPickerDialog |
( |
QWidget * |
parent | ) |
|
105 return QFileDialog::getOpenFileName(parent,
106 QWidget::tr(
"Open Image",
"Title on a dialog that allows the user to open an image file"),
108 QWidget::tr(
"Image Files (*.jpg *.jpeg *.png *.bmp)",
"List of supported image file formats. The text in the parentheses must not be changed"));
◆ openLaunchWindow()
void geometrize::common::ui::openLaunchWindow |
( |
| ) |
|
44 dialog::LaunchWindow* launcher{
new dialog::LaunchWindow()};
◆ openLoadGlobalSettingsDialog()
QString geometrize::common::ui::openLoadGlobalSettingsDialog |
( |
QWidget * |
parent | ) |
|
230 return QFileDialog::getOpenFileName(parent,
231 QWidget::tr(
"Load Settings",
"Title on a dialog that allows the user to select a settings file"),
233 QWidget::tr(
"JSON Settings File (*.json)",
"List of supported settings file formats. The text in the parentheses must not be changed"));
◆ openLoadImageTaskSettingsDialog()
QString geometrize::common::ui::openLoadImageTaskSettingsDialog |
( |
QWidget * |
parent | ) |
|
214 return QFileDialog::getOpenFileName(parent,
215 QWidget::tr(
"Load Settings",
"Title on a dialog that allows the user to select a settings file"),
217 QWidget::tr(
"JSON Settings File (*.json)",
"List of supported settings file formats. The text in the parentheses must not be changed"));
◆ openMoreResourcesPage()
void geometrize::common::ui::openMoreResourcesPage |
( |
| ) |
|
◆ openOnlineTutorials()
void geometrize::common::ui::openOnlineTutorials |
( |
| ) |
|
◆ openSaveCanvasPathPickerDialog()
QString geometrize::common::ui::openSaveCanvasPathPickerDialog |
( |
QWidget * |
parent | ) |
|
159 return QFileDialog::getSaveFileName(parent,
160 QWidget::tr(
"Save HTML5 Webpage",
"Title on a dialog that allows the user to save a HTML5-based webpage"),
162 QWidget::tr(
"HTML Webpage (*.html)",
"List of supported webpage formats. The text in the parentheses must not be changed"));
◆ openSaveGeometryDataPathPickerDialog()
QString geometrize::common::ui::openSaveGeometryDataPathPickerDialog |
( |
QWidget * |
parent | ) |
|
143 return QFileDialog::getSaveFileName(parent,
144 QWidget::tr(
"Save Geometry Data",
"Title on a dialog that allows the user to save geometric primitive data"),
146 QWidget::tr(
"JSON Data (*.json);;Text Array (*.txt)",
"List of supported data file formats. Semicolons and text in the parentheses must not be changed"));
◆ openSaveGIFPathPickerDialog()
QString geometrize::common::ui::openSaveGIFPathPickerDialog |
( |
QWidget * |
parent | ) |
|
151 return QFileDialog::getSaveFileName(parent,
152 QWidget::tr(
"Save Animated GIF",
"Title on a dialog that allows the user to save an animated GIF file"),
154 QWidget::tr(
"GIF Animation (*.gif)",
"List of supported GIF file formats. The text in the parentheses must not be changed"));
◆ openSaveGlobalSettingsDialog()
QString geometrize::common::ui::openSaveGlobalSettingsDialog |
( |
QWidget * |
parent | ) |
|
238 return QFileDialog::getSaveFileName(parent,
239 QWidget::tr(
"Save Settings",
"Title on a dialog that allows the user to save a settings file"),
241 QWidget::tr(
"JSON Settings File (*.json)",
"List of supported settings file formats. The text in the parentheses must not be changed"));
◆ openSaveImagePathPickerDialog()
QString geometrize::common::ui::openSaveImagePathPickerDialog |
( |
QWidget * |
parent | ) |
|
113 return QFileDialog::getSaveFileName(parent,
114 QWidget::tr(
"Save Image",
"Title on a dialog that allows the user to save an image file"),
116 QWidget::tr(
"JPEG Image (*.jpg *.jpeg);;PNG Image (*.png);;BMP Image (*.bmp);;PPM Image (*.ppm)",
"List of supported image file formats. Semicolons and text in the parentheses must not be changed"));
◆ openSaveImageTaskSettingsDialog()
QString geometrize::common::ui::openSaveImageTaskSettingsDialog |
( |
QWidget * |
parent | ) |
|
222 return QFileDialog::getSaveFileName(parent,
223 QWidget::tr(
"Save Settings",
"Title on a dialog that allows the user to save a settings file"),
225 QWidget::tr(
"JSON Settings File (*.json)",
"List of supported settings file formats. The text in the parentheses must not be changed"));
◆ openSaveRasterizedSVGPathPickerDialog()
QString geometrize::common::ui::openSaveRasterizedSVGPathPickerDialog |
( |
QWidget * |
parent | ) |
|
129 return QFileDialog::getSaveFileName(parent,
130 QWidget::tr(
"Save Image",
"Title on a dialog that allows the user to save an image file"),
132 QWidget::tr(
"Image Files (*.jpg *.jpeg *.png *.bmp)",
"List of supported image file formats. The text in the parentheses must not be changed"));
◆ openSaveRasterizedSVGsPathPickerDialog()
QString geometrize::common::ui::openSaveRasterizedSVGsPathPickerDialog |
( |
QWidget * |
parent | ) |
|
137 return QFileDialog::getExistingDirectory(parent,
138 QWidget::tr(
"Save Images",
"Title on a dialog that allows the user to save image files"));
◆ openSaveSVGPathPickerDialog()
QString geometrize::common::ui::openSaveSVGPathPickerDialog |
( |
QWidget * |
parent | ) |
|
121 return QFileDialog::getSaveFileName(parent,
122 QWidget::tr(
"Save SVG Image",
"Title on a dialog that allows the user to save an SVG (scalable vector graphics) image file"),
124 QWidget::tr(
"SVG Image (*.svg)",
"List of supported vector-based image formats. The text in the parentheses must not be changed"));
◆ openSaveWebGLPathPickerDialog()
QString geometrize::common::ui::openSaveWebGLPathPickerDialog |
( |
QWidget * |
parent | ) |
|
167 return QFileDialog::getSaveFileName(parent,
168 QWidget::tr(
"Save WebGL Webpage",
"Title on a dialog that allows the user to save a WebGL-based webpage"),
170 QWidget::tr(
"HTML Webpage (*.html)",
"List of supported webpage formats. The text in the parentheses must not be changed"));
◆ openSelectScriptDialog()
QString geometrize::common::ui::openSelectScriptDialog |
( |
QWidget * |
parent | ) |
|
191 return QFileDialog::getOpenFileName(parent,
192 QWidget::tr(
"Select Script",
"Title on a dialog that allows the user to select a script file"),
194 QWidget::tr(
"ChaiScript Files (*.chai)",
"List of supported script file formats. The text in the parentheses must not be changed"));
◆ openTargetImagePickerDialog()
QString geometrize::common::ui::openTargetImagePickerDialog |
( |
QWidget * |
parent | ) |
|
246 return QFileDialog::getOpenFileName(parent,
247 QWidget::tr(
"Select Image",
"Title on a dialog that allows the user to select an image file"),
249 QWidget::tr(
"Image Files (*.jpg *.jpeg *.png *.bmp)",
"List of supported image file formats. The text in the parentheses must not be changed"));
◆ openTaskQueueWindow()
void geometrize::common::ui::openTaskQueueWindow |
( |
| ) |
|
73 auto taskQueueWindow =
new dialog::TaskQueueWindow();
74 taskQueueWindow->show();
◆ openTechnicalSupport()
void geometrize::common::ui::openTechnicalSupport |
( |
| ) |
|
◆ openWelcomePage()
void geometrize::common::ui::openWelcomePage |
( |
| ) |
|
79 dialog::WelcomeWindow* window =
new dialog::WelcomeWindow();
const QScreen * getFirstScreenContainingCursor()
Definition: uiactions.cpp:30
const QString MORE_RESOURCES_URL
URL to a webpage providing additional templates, scripts and/or helpful links.
Definition: constants.h:14
const QString VIDEO_TUTORIAL_URL
The video tutorial webpage URL for the software.
Definition: constants.h:15
const QString TECHNICAL_SUPPORT_URL
The technical support webpage URL for the software.
Definition: constants.h:13
void centerWidgetOnScreen(QWidget &widget, const QScreen &screen)
Definition: uiactions.cpp:37