mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-01 05:46:06 -04:00
--User changes
-Allow dragging in folders which will be recursively traversed for flame files. -Allow for adjusting scale via keyboard with the < and > keys. -Show the count of opened flames on the header of the library tree. --Bug fixes -Attempt to preserve xaos when pasting xforms. --Code changes -Default flam3 compatibility mode to true.
This commit is contained in:
@ -110,7 +110,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Builders, Testers and Advisors:</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Linux deployment: </span><a href="https://launchpad.net/~fractorium"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Gambhiro Bhikkhu</span></a></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Testing and Feedback: </span><a href="http://snicker02.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Brad Stefanov</span></a><span style=" font-size:10pt;">, </span><a href="http://www.fxysw.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Fengda</span></a><span style=" font-size:10pt;">, </span><a href="http://b33rheart.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Gabor Timar</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/guephren"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Guephren</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/jeddaka"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Jeddaka,</span></a><span style=" font-size:10pt;"> </span><a href="http://boosthardware.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Patrick Shirkey</span></a><span style=" font-size:10pt;">, </span><a href="http://nightmaretf.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Richard Vollebregt</span></a><span style=" font-size:10pt;">, Simon Detheridge, Tai,</span><span style=" font-size:8pt;"> </span><a href="http://gameryamen.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Yamen</span></a></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Testing and Feedback: </span><a href="http://snicker02.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Brad Stefanov</span></a><span style=" font-size:10pt;">, </span><a href="http://www.fxysw.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Fengda</span></a><span style=" font-size:10pt;">, </span><a href="http://www.deviantart.com/b33rheart"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Gabor Timar</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/guephren"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Guephren</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/jeddaka"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Jeddaka,</span></a><span style=" font-size:10pt;"> </span><a href="http://boosthardware.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Patrick Shirkey</span></a><span style=" font-size:10pt;">, </span><a href="http://nightmaretf.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Richard Vollebregt</span></a><span style=" font-size:10pt;">, Simon Detheridge, Tai,</span><span style=" font-size:8pt;"> </span><a href="http://gameryamen.deviantart.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Yamen</span></a></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Code and theory questions: </span><a href="https://github.com/scottdraves/flam3"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Erik Reckase</span></a><span style=" font-size:10pt;">, </span><a href="http://fractron9000.sourceforge.net/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Mike Thiesen</span></a><span style=" font-size:10pt;">, </span><a href="https://github.com/scottdraves/flam3"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Scott Draves</span></a><span style=" font-size:10pt;">, </span><a href="https://github.com/stevenrobertson/cuburn"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Steve Robertson</span></a><span style=" font-size:10pt;">, </span><a href="http://www.chaoticafractals.com/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Thomas Ludwig</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Code Copied:</span></p>
|
||||
@ -120,7 +120,10 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.qt.io/developers/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Qt</span></a><span style=" font-size:10pt;">: Digia Plc (GPL v3, LGPL v2)<br /></span><a href="http://g-truc.net"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">glm</span></a><span style=" font-size:10pt;">: Christophe Riccio (MIT License)<br /></span><a href="http://threadingbuildingblocks.org"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Threading Building Blocks</span></a><span style=" font-size:10pt;">: Intel Corporation (GPLv2)<br /></span><a href="http://libjpeg.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">libjpeg</span></a><span style=" font-size:10pt;">: Independent JPEG Group (Free Software License)<br /></span><a href="http://libpng.org"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">libpng</span></a><span style=" font-size:10pt;">: Glenn Randers-Pehrson et al (Libpng License)<br /></span><a href="http://xmlsoft.org"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">libxml2</span></a><span style=" font-size:10pt;">: Daniel Veillard (MIT License)<br /></span><a href="http://zlib.net"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">zlib</span></a><span style=" font-size:10pt;">: Jean-loup Gailly, Mark Adler (Zlib License)<br /></span><a href="http://burtleburtle.net/bob/cplus/isaac.hpp"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">QTIsaac</span></a><span style=" font-size:10pt;">: Robert J. Jenkins, Quinn Tyler Jackson (Public Domain)<br /></span><a href="http://cas.ee.ic.ac.uk/people/dt10/research/rngs-gpu-mwc64x.html"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">MWC64X Random Number Generator</span></a><span style=" font-size:10pt;">: David Thomas (Public Domain)<br /></span><a href="https://github.com/brofield/simpleopt"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">SimpleOpt</span></a><span style=" font-size:10pt;">: Brodie Thiesfield (MIT License)</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Icons and Palettes Used:</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Palettes: </span><a href="https://www.deviantart.com/boxtail"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Boxtail</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/fardareismai"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">FarDareisMai</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/fractaldesire"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">FractalDesire</span></a><span style=" font-size:10pt;">, Rce, </span><a href="https://www.deviantart.com/rubydeva"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Rubydeva</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/tatasz"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Tatasz</span></a><span style=" font-size:10pt;"> (Public Domain)<br /></span><a href="http://famfamfam.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Silk</span></a><span style=" font-size:10pt;">: Mark James (Creative Commons Attribution 2.5 License)<br /></span><a href="http://momentumdesignlab.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Momentum</span></a><span style=" font-size:10pt;">: Momentum Design Lab (Creative Commons Attribution-ShareAlike 3.5 License)<br /></span><a href="http://everaldo.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Crystal Clear</span></a><span style=" font-size:10pt;">: Everaldo Coelho (LGPL)<br /></span><a href="http://openiconlibrary.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Open Icon Library</span></a><span style=" font-size:10pt;">: Jeff Israel (GPL, LGPL, Creative Commons, Public Domain)<br /></span><a href="http://icons.mysitemyway.com/category/3d-transparent-glass-icons/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">3D Transparent Glass</span></a><span style=" font-size:10pt;">: iconsETC (Public Domain)<br /></span><a href="http://p.yusukekamiyamane.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Fugue</span></a><span style=" font-size:10pt;">: Yusuke Kamiyamane (Creative Commons Attribution 3.0 License)</span></p></body></html></string>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Palettes: </span><a href="https://www.deviantart.com/boxtail"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Boxtail</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/fardareismai"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">FarDareisMai</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/fractaldesire"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">FractalDesire</span></a><span style=" font-size:10pt;">, Rce, </span><a href="https://www.deviantart.com/rubydeva"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Rubydeva</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/tatasz"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Tatasz</span></a><span style=" font-size:10pt;"> (Public Domain)<br /></span><a href="http://famfamfam.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Silk</span></a><span style=" font-size:10pt;">: Mark James (Creative Commons Attribution 2.5 License)<br /></span><a href="http://momentumdesignlab.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Momentum</span></a><span style=" font-size:10pt;">: Momentum Design Lab (Creative Commons Attribution-ShareAlike 3.5 License)<br /></span><a href="http://everaldo.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Crystal Clear</span></a><span style=" font-size:10pt;">: Everaldo Coelho (LGPL)<br /></span><a href="http://openiconlibrary.sourceforge.net"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Open Icon Library</span></a><span style=" font-size:10pt;">: Jeff Israel (GPL, LGPL, Creative Commons, Public Domain)<br /></span><a href="http://icons.mysitemyway.com/category/3d-transparent-glass-icons/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">3D Transparent Glass</span></a><span style=" font-size:10pt;">: iconsETC (Public Domain)<br /></span><a href="http://p.yusukekamiyamane.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Fugue</span></a><span style=" font-size:10pt;">: Yusuke Kamiyamane (Creative Commons Attribution 3.0 License)</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Benchmark and Example Flames:</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://www.deviantart.com/b33rheart"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Gabor Timar</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/golubaja"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Golubaja</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/pillemaster"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Pillemaster</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/plangkye"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Plangkye</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/tatasz"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Tatasz</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/tyrantwave"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">TyrantWave</span></a><span style=" font-size:10pt;">, </span><a href="https://www.deviantart.com/zy0rg"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Zy0rg</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
|
@ -369,6 +369,8 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
||||
static int gcount = 0;
|
||||
static int hcount = 0;
|
||||
static int pcount = 0;
|
||||
static int commacount = 0;
|
||||
static int periodcount = 0;
|
||||
static int lcount = 0;
|
||||
|
||||
if (o == ui.GLParentScrollArea && e->type() == QEvent::Resize)
|
||||
@ -429,6 +431,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
||||
unsigned int index = combo->currentIndex();
|
||||
double vdist = 0.01;
|
||||
double hdist = 0.01;
|
||||
double zoom = 1;
|
||||
double rot = 1;
|
||||
double grow = 0.01;
|
||||
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
|
||||
@ -446,6 +449,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
||||
vdist *= 0.1;
|
||||
rot *= 0.1;
|
||||
grow *= 0.1;
|
||||
zoom *= 0.1;
|
||||
}
|
||||
else if (ctrl)
|
||||
{
|
||||
@ -453,6 +457,7 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
||||
vdist *= 10;
|
||||
rot *= 10;
|
||||
grow *= 10;
|
||||
zoom *= 10;
|
||||
}
|
||||
}
|
||||
|
||||
@ -542,6 +547,30 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (ke->key() == Qt::Key_Comma || ke->key() == Qt::Key_Less)
|
||||
{
|
||||
commacount++;
|
||||
|
||||
if (commacount >= times)
|
||||
{
|
||||
commacount = 0;
|
||||
m_ScaleSpin->setValue(m_ScaleSpin->value() - zoom);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (ke->key() == Qt::Key_Period || ke->key() == Qt::Key_Greater)
|
||||
{
|
||||
periodcount++;
|
||||
|
||||
if (periodcount >= times)
|
||||
{
|
||||
periodcount = 0;
|
||||
m_ScaleSpin->setValue(m_ScaleSpin->value() + zoom);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if ((!DrawPreAffines() && pre) || (!DrawPostAffines() && !pre))//Everything below this must be for editing xforms via key press.
|
||||
{
|
||||
return true;
|
||||
@ -695,6 +724,7 @@ void Fractorium::closeEvent(QCloseEvent* e)
|
||||
/// <summary>
|
||||
/// Examine the files dragged when it first enters the window area.
|
||||
/// Ok if at least one file is .flam3, .flam3 or .xml, else not ok.
|
||||
/// Also traverse folders recursively if a folder is included in the list of dragged items.
|
||||
/// Called when the user first drags files in.
|
||||
/// </summary>
|
||||
/// <param name="e">The event</param>
|
||||
@ -706,14 +736,36 @@ void Fractorium::dragEnterEvent(QDragEnterEvent* e)
|
||||
|
||||
for (auto& url : urls)
|
||||
{
|
||||
QString localFile = url.toLocalFile();
|
||||
QFileInfo fileInfo(localFile);
|
||||
QString suf = fileInfo.suffix();
|
||||
auto localFile = url.toLocalFile();
|
||||
|
||||
if (suf == "flam3" || suf == "flame" || suf == "xml" || suf == "chaos")
|
||||
if (QDir(localFile).exists())
|
||||
{
|
||||
e->accept();
|
||||
break;
|
||||
QDirIterator it(localFile, QDirIterator::Subdirectories);
|
||||
|
||||
while (it.hasNext())
|
||||
{
|
||||
auto next = it.next();
|
||||
qDebug() << next;
|
||||
QFileInfo fileInfo(next);
|
||||
auto suf = fileInfo.suffix();
|
||||
|
||||
if (suf == "flam3" || suf == "flame" || suf == "xml" || suf == "chaos")
|
||||
{
|
||||
e->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QFileInfo fileInfo(localFile);
|
||||
auto suf = fileInfo.suffix();
|
||||
|
||||
if (suf == "flam3" || suf == "flame" || suf == "xml" || suf == "chaos")
|
||||
{
|
||||
e->accept();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -729,8 +781,8 @@ void Fractorium::dragMoveEvent(QDragMoveEvent* e)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Examine and open the dropped files.
|
||||
/// Called when the user drops a file in.
|
||||
/// Examine and open the dropped files and/or folders.
|
||||
/// Called when the user drops a file or folder in.
|
||||
/// </summary>
|
||||
/// <param name="e">The event</param>
|
||||
void Fractorium::dropEvent(QDropEvent* e)
|
||||
@ -745,12 +797,35 @@ void Fractorium::dropEvent(QDropEvent* e)
|
||||
|
||||
for (auto& url : urls)
|
||||
{
|
||||
QString localFile = url.toLocalFile();
|
||||
QFileInfo fileInfo(localFile);
|
||||
QString suf = fileInfo.suffix();
|
||||
auto localFile = url.toLocalFile();
|
||||
|
||||
if (suf == "flam3" || suf == "flame" || suf == "xml" || suf == "chaos")
|
||||
filenames << localFile;
|
||||
if (QDir(localFile).exists())
|
||||
{
|
||||
QDirIterator it(localFile, QDirIterator::Subdirectories);
|
||||
|
||||
while (it.hasNext())
|
||||
{
|
||||
auto next = it.next();
|
||||
qDebug() << next;
|
||||
QFileInfo fileInfo(next);
|
||||
|
||||
if (fileInfo.isFile() && fileInfo.exists())
|
||||
{
|
||||
auto suf = fileInfo.suffix();
|
||||
|
||||
if (suf == "flam3" || suf == "flame" || suf == "xml" || suf == "chaos")
|
||||
filenames << next;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QFileInfo fileInfo(localFile);
|
||||
auto suf = fileInfo.suffix();
|
||||
|
||||
if (suf == "flam3" || suf == "flame" || suf == "xml" || suf == "chaos")
|
||||
filenames << localFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -819,46 +894,46 @@ QStringList Fractorium::SetupOpenXmlDialog(bool openExamples)
|
||||
|
||||
QStringList filenames;
|
||||
|
||||
if(openExamples)
|
||||
{
|
||||
m_OpenFileDialog->selectFile("*");
|
||||
m_OpenFileDialog->setDirectory(QCoreApplication::applicationDirPath() + "/FlameExamples");
|
||||
m_OpenFileDialog->selectNameFilter("flame (*.flame)");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_OpenFileDialog->setDirectory(m_Settings->OpenFolder());
|
||||
m_OpenFileDialog->selectNameFilter(m_Settings->OpenXmlExt());
|
||||
}
|
||||
if (openExamples)
|
||||
{
|
||||
m_OpenFileDialog->selectFile("*");
|
||||
m_OpenFileDialog->setDirectory(QCoreApplication::applicationDirPath() + "/FlameExamples");
|
||||
m_OpenFileDialog->selectNameFilter("flame (*.flame)");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_OpenFileDialog->setDirectory(m_Settings->OpenFolder());
|
||||
m_OpenFileDialog->selectNameFilter(m_Settings->OpenXmlExt());
|
||||
}
|
||||
|
||||
if (m_OpenFileDialog->exec() == QDialog::Accepted)
|
||||
{
|
||||
filenames = m_OpenFileDialog->selectedFiles();
|
||||
|
||||
if (!openExamples && !filenames.empty())
|
||||
if (!openExamples && !filenames.empty())
|
||||
m_Settings->OpenFolder(QFileInfo(filenames[0]).canonicalPath());
|
||||
else
|
||||
m_OpenFileDialog->selectFile("*");
|
||||
}
|
||||
else
|
||||
m_OpenFileDialog->selectFile("*");
|
||||
}
|
||||
|
||||
#else
|
||||
QString defaultFilter;
|
||||
QStringList filenames;
|
||||
QString defaultFilter;
|
||||
QStringList filenames;
|
||||
|
||||
if(openExamples)
|
||||
{
|
||||
defaultFilter = "flame (*.flame)";
|
||||
filenames = QFileDialog::getOpenFileNames(this, tr("Open Flame"), QCoreApplication::applicationDirPath() + "/FlameExamples", tr("flame(*.flame)"), &defaultFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultFilter = m_Settings->OpenXmlExt();
|
||||
filenames = QFileDialog::getOpenFileNames(this, tr("Open Flame"), m_Settings->OpenFolder(), tr("flam3(*.flam3);; flame(*.flame);; xml(*.xml);; chaos (*.chaos)"), &defaultFilter);
|
||||
m_Settings->OpenXmlExt(defaultFilter);
|
||||
if (openExamples)
|
||||
{
|
||||
defaultFilter = "flame (*.flame)";
|
||||
filenames = QFileDialog::getOpenFileNames(this, tr("Open Flame"), QCoreApplication::applicationDirPath() + "/FlameExamples", tr("flame(*.flame)"), &defaultFilter);
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultFilter = m_Settings->OpenXmlExt();
|
||||
filenames = QFileDialog::getOpenFileNames(this, tr("Open Flame"), m_Settings->OpenFolder(), tr("flam3(*.flam3);; flame(*.flame);; xml(*.xml);; chaos (*.chaos)"), &defaultFilter);
|
||||
m_Settings->OpenXmlExt(defaultFilter);
|
||||
|
||||
if (!filenames.empty())
|
||||
m_Settings->OpenFolder(QFileInfo(filenames[0]).canonicalPath());
|
||||
}
|
||||
if (!filenames.empty())
|
||||
m_Settings->OpenFolder(QFileInfo(filenames[0]).canonicalPath());
|
||||
}
|
||||
|
||||
#endif
|
||||
return filenames;
|
||||
|
@ -552,6 +552,7 @@ void Fractorium::SyncFileCountToSequenceCount()
|
||||
if (auto top = ui.LibraryTree->topLevelItem(0))
|
||||
{
|
||||
int count = top->childCount() - 1;
|
||||
ui.LibraryTree->headerItem()->setText(0, "Current Flame File (" + QString::number(top->childCount()) + ")");
|
||||
ui.SequenceStartFlameSpinBox->setMinimum(0);
|
||||
ui.SequenceStartFlameSpinBox->setMaximum(count);
|
||||
ui.SequenceStartFlameSpinBox->setValue(0);
|
||||
|
@ -13,7 +13,7 @@ void Fractorium::InitMenusUI()
|
||||
connect(ui.ActionCopyFlameInCurrentFile, SIGNAL(triggered(bool)), this, SLOT(OnActionCopyFlameInCurrentFile(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionCreateReferenceFile, SIGNAL(triggered(bool)), this, SLOT(OnActionCreateReferenceFile(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionOpen, SIGNAL(triggered(bool)), this, SLOT(OnActionOpen(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionOpenExamples, SIGNAL(triggered(bool)), this, SLOT(OnActionOpenExamples(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionOpenExamples, SIGNAL(triggered(bool)), this, SLOT(OnActionOpenExamples(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionSaveCurrentAsXml, SIGNAL(triggered(bool)), this, SLOT(OnActionSaveCurrentAsXml(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionSaveEntireFileAsXml, SIGNAL(triggered(bool)), this, SLOT(OnActionSaveEntireFileAsXml(bool)), Qt::QueuedConnection);
|
||||
connect(ui.ActionSaveCurrentScreen, SIGNAL(triggered(bool)), this, SLOT(OnActionSaveCurrentScreen(bool)), Qt::QueuedConnection);
|
||||
|
@ -202,7 +202,7 @@ void FractoriumSettings::LoadLast(bool b) { setValue(LOAD
|
||||
bool FractoriumSettings::RotateAndScale() { return value(ROTSCALE).toBool(); }
|
||||
void FractoriumSettings::RotateAndScale(bool b) { setValue(ROTSCALE, b); }
|
||||
|
||||
bool FractoriumSettings::Flam3Compat() { return value(FLAM3COMPAT).toBool(); }
|
||||
bool FractoriumSettings::Flam3Compat() { return value(FLAM3COMPAT, true).toBool(); }
|
||||
void FractoriumSettings::Flam3Compat(bool b) { setValue(FLAM3COMPAT, b); }
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user