Skip to content

Commit

Permalink
Some refactoring and a bug or 2
Browse files Browse the repository at this point in the history
* Split Help menu into Help and Options menus
* New Options menu, Windows, Clear Texture Cache, Clear Animation Actions, Test Versions, Loop Camera Path
* Removed Include folder from Examples menu
* Fixed #192 Rewind bug
* Changed Documentation link to "https://github.com/3Dickulus/FragM/wiki
* Removed Play Restart Mode from Preferences... Stop and Play just Stop and Play.
* Finally addressed the frame start/fin spinboxes in the Easingcurve dialog
* Added an indicator to show total frames of multiple loops instead of just a single loop duration
  • Loading branch information
3Dickulus committed Dec 24, 2022
1 parent 5a63b43 commit e7ce187
Show file tree
Hide file tree
Showing 11 changed files with 350 additions and 263 deletions.
4 changes: 2 additions & 2 deletions Fragmentarium-Source/Fragmentarium.desktop
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[Desktop Entry]
Type=Application
Name=Fragmentarium-2.5.7-221219
Name=Fragmentarium-2.5.7-221224
Comment=Experimental GLSL IDE An integrated environment for exploring GPU pixel graphics.
TryExec=Fragmentarium-2.5.7-221219
TryExec=Fragmentarium-2.5.7-221224
Exec=Fragmentarium-2.5.7
Icon=FragMicon
NoDisplay=false
Expand Down
1 change: 0 additions & 1 deletion Fragmentarium-Source/Fragmentarium/GUI/DisplayWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ class DisplayWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
return continuous;
}
void reset();
void setContextMenu ( QMenu *contextMenu )
{
this->contextMenu = contextMenu;
Expand Down
150 changes: 70 additions & 80 deletions Fragmentarium-Source/Fragmentarium/GUI/MainWindow.cpp

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions Fragmentarium-Source/Fragmentarium/GUI/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ public slots:
void documentWasModified();
void closeTab ( int index );
void rewind();
void play( bool restart = true );
void play();
void stop();
// for benchmark script
int getTileAVG()
Expand Down Expand Up @@ -621,9 +621,9 @@ public slots:
};

void setCameraPathLoop(bool l);
void initTools();

private slots:
void initTools();
void runEXRTool();
void runSupportProgram();

Expand Down Expand Up @@ -670,7 +670,6 @@ private slots:
void launchFAQ();
void launchIntro();
void launchReferenceHome();
void launchReferenceHome2();
void launchDocumentation();
void openFile();
void new2DFile();
Expand Down Expand Up @@ -758,21 +757,22 @@ private slots:
QAction *glslHomeAction;
QAction *introAction;
QAction *faqAction;
QAction *referenceAction;
QAction *referenceAction2;
QAction *referenceAction3;
QAction *ffReferenceAction;
QAction *fragmReferenceAction;
QAction *galleryAction;
QAction *scriptingGeneralAction;
QAction *scriptingParameterAction;
QAction *scriptingHiresAction;
QAction *scriptingControlAction;
QAction *clearAnimationObjectsAction;
QAction *loopCameraPathAction;
QMenu *fileMenu;
QMenu *editMenu;
QMenu *renderMenu;
QMenu *parametersMenu;
QMenu *examplesMenu;
QMenu *helpMenu;
QMenu *optionsMenu;
QToolBar *fileToolBar;
QToolBar *renderToolBar;
QToolBar *renderModeToolBar;
Expand Down Expand Up @@ -850,7 +850,6 @@ private slots:
bool verbose;
bool fullPathInRecentFilesList;
bool includeWithAutoSave;
bool playRestartMode;
bool useMimetypes;
bool loopCameraPath;

Expand Down
2 changes: 0 additions & 2 deletions Fragmentarium-Source/Fragmentarium/GUI/PreferencesDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ private slots:
m_ui.includeWithAutoSaveCheckBox->setChecked (settings.value ( "includeWithAutoSave", true ).toBool() );
m_ui.jtloeCheckBox->setChecked (settings.value ( "jumpToLineOnError", true ).toBool() );
m_ui.ddCameraModeCheckBox->setChecked (settings.value ( "ddCameraMode", false ).toBool() );
m_ui.playRestartModeCheckBox->setChecked (settings.value ( "playRestartMode", false ).toBool() );
m_ui.enableGLDebugCheckBox->setChecked (settings.value ( "enableGLDebug", false ).toBool() );
m_ui.compatPatchCheckBox->setChecked (settings.value ( "compatPatch", true ).toBool() );
m_ui.exrBinPathsLineEdit->setText (settings.value ( "exrBinPaths", "./bin;/usr/bin;" ).toString() );
Expand Down Expand Up @@ -186,7 +185,6 @@ private slots:
settings.setValue("includeWithAutoSave", m_ui.includeWithAutoSaveCheckBox->isChecked() );
settings.setValue("jumpToLineOnError", m_ui.jtloeCheckBox->isChecked() );
settings.setValue("ddCameraMode", m_ui.ddCameraModeCheckBox->isChecked() );
settings.setValue("playRestartMode", m_ui.playRestartModeCheckBox->isChecked() );
settings.setValue("enableGLDebug", m_ui.enableGLDebugCheckBox->isChecked() );
settings.setValue("compatPatch", m_ui.compatPatchCheckBox->isChecked() );
settings.setValue("exrBinPaths", m_ui.exrBinPathsLineEdit->text());
Expand Down
90 changes: 40 additions & 50 deletions Fragmentarium-Source/Fragmentarium/GUI/PreferencesDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>815</width>
<width>817</width>
<height>689</height>
</rect>
</property>
Expand All @@ -21,16 +21,6 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="6" column="0" colspan="2">
<widget class="QCheckBox" name="playRestartModeCheckBox">
<property name="text">
<string>Animation update on=continuous off=last set</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="guiStylesheetLabel">
Expand All @@ -55,30 +45,14 @@
</item>
</layout>
</item>
<item row="10" column="0" colspan="2">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>320</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="drawGLPathsCheckBox">
<property name="toolTip">
<string>Some engines use non GL matrices.</string>
</property>
<item row="2" column="0">
<widget class="QCheckBox" name="splineOccCheckBox">
<property name="text">
<string>Draw spline paths for camera and target</string>
<string>Spline Occlusion</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="maxRecentFilesLabel">
Expand All @@ -99,31 +73,27 @@
</item>
</layout>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="ddCameraModeCheckBox">
<property name="text">
<string>2D Camera Mode on=traveling off=fixed</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="loopPlayCheckBox">
<property name="text">
<string>Loop animation</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="fullPathInRecentFilesListCheckBox">
<property name="text">
<string>Full path in recent files menu.</string>
<item row="9" column="0" colspan="2">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
<property name="sizeHint" stdset="0">
<size>
<width>320</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="0" colspan="2">
<item row="8" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="logLinesLabel">
Expand All @@ -144,10 +114,30 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="splineOccCheckBox">
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="fullPathInRecentFilesListCheckBox">
<property name="text">
<string>Spline Occlusion</string>
<string>Full path in recent files menu.</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="drawGLPathsCheckBox">
<property name="toolTip">
<string>Some engines use non GL matrices.</string>
</property>
<property name="text">
<string>Draw spline paths for camera and target</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="ddCameraModeCheckBox">
<property name="text">
<string>2D Camera Mode on=traveling off=fixed</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
Expand Down
22 changes: 11 additions & 11 deletions Fragmentarium-Source/Fragmentarium/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
printf( "%s\n", qPrintable(qApp->translate("main", "enabled.")) );
}
}

if( parser.isSet(QString("compatpatch")) ) {
printf( "%s", qPrintable(qApp->translate("main", "Compatibility patch ")) );
if(parser.value(QString("compatpatch")) == "false") {
Expand Down Expand Up @@ -200,7 +200,7 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err

printf("%s\n", qPrintable(qApp->translate("main", "Frag editor theme set to ") + themeName));
}

const QStringList positionalArguments = parser.positionalArguments();
if (positionalArguments.isEmpty()) {
*errorMessage = qApp->translate("main", "Argument 'filename' missing.");
Expand All @@ -217,6 +217,7 @@ CommandLineParseResult parseCommandLine(QCommandLineParser &parser, QString *err
int main(int argc, char *argv[])
{


#ifdef Q_OS_WIN
qApp->addLibraryPath("./");
qApp->addLibraryPath("./plugins");
Expand All @@ -242,13 +243,13 @@ int main(int argc, char *argv[])

Q_INIT_RESOURCE(Fragmentarium);

qApp->setOrganizationName(QString("Syntopia_Software"));
qApp->setApplicationName(QString("Fragmentarium"));
qApp->setOrganizationDomain(QString("fractalforums.org"));

QScopedPointer<QApplication> app(new QApplication(argc, argv));
QApplication *app(new QApplication(argc, argv));
app->setObjectName("Application");

app->setOrganizationName(QString("Syntopia_Software"));
app->setApplicationName(QString("Fragmentarium"));
app->setOrganizationDomain(QString("fractalforums.org"));

// before creating main window record the last run state
last_run_state = QSettings().value("isStarting").toBool();

Expand All @@ -258,8 +259,7 @@ int main(int argc, char *argv[])
splash.setMask(pixmap.mask());
splash.show();

Fragmentarium::GUI::MainWindow *mainWin;
mainWin = new Fragmentarium::GUI::MainWindow();
Fragmentarium::GUI::MainWindow *mainWin = new Fragmentarium::GUI::MainWindow();

// Makes the splash screen wait until the widget mainWin is displayed before calling close() on itself.
splash.finish(mainWin);
Expand Down Expand Up @@ -293,7 +293,7 @@ int main(int argc, char *argv[])
// exits in showHelp function and never returns here
Q_UNREACHABLE();
}

QString langArg = QString("en"); // default english
QTranslator myappTranslator;
if(parser.isSet(QString("language"))) {
Expand All @@ -314,7 +314,7 @@ int main(int argc, char *argv[])

mainWin->setVerbose(parser.isSet("verbose"));

mainWin->setWindowTitle(QString("%1 %2").arg(qApp->applicationName()).arg(qApp->applicationVersion()));
mainWin->setWindowTitle(QString("%1 %2").arg(app->applicationName()).arg(app->applicationVersion()));

mainWin->readSettings();

Expand Down
Loading

0 comments on commit e7ce187

Please sign in to comment.