mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-06-30 21:36:33 -04:00
--User changes
Allow for detaching of top level tabs in the dock widget so workspaces can be customized. Save workspace between runs. Only correct variation names/params during parsing when the source of the Xml file is not from Ember/Fractorium.
This commit is contained in:
@ -118,7 +118,18 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
ui.FinalRenderDoSequenceCheckBox->setChecked( m_Settings->FinalDoSequence());
|
||||
ui.FinalRenderKeepAspectCheckBox->setChecked( m_Settings->FinalKeepAspect());
|
||||
ui.FinalRenderThreadCountSpin->setValue( m_Settings->FinalThreadCount());
|
||||
#ifdef _WIN32
|
||||
ui.FinalRenderThreadPriorityComboBox->setCurrentIndex(m_Settings->FinalThreadPriority() + 2);
|
||||
#else
|
||||
auto tpc = ui.FinalRenderThreadPriorityComboBox->count() - 1;
|
||||
|
||||
if (m_Settings->FinalThreadPriority() == THREAD_PRIORITY_LOWEST)
|
||||
ui.FinalRenderThreadPriorityComboBox->setCurrentIndex(0);
|
||||
else if (m_Settings->FinalThreadPriority() == THREAD_PRIORITY_HIGHEST)
|
||||
ui.FinalRenderThreadPriorityComboBox->setCurrentIndex(tpc);
|
||||
else
|
||||
ui.FinalRenderThreadPriorityComboBox->setCurrentIndex(Clamp<int>(0, tpc, m_Settings->FinalThreadPriority() / 25));
|
||||
#endif
|
||||
|
||||
m_QualitySpin->setValue(m_Settings->FinalQuality());
|
||||
m_TemporalSamplesSpin->setValue(m_Settings->FinalTemporalSamples());
|
||||
@ -206,7 +217,19 @@ uint FractoriumFinalRenderDialog::Current() { return ui.FinalRenderCurrentSpin->
|
||||
uint FractoriumFinalRenderDialog::PlatformIndex() { return ui.FinalRenderPlatformCombo->currentIndex(); }
|
||||
uint FractoriumFinalRenderDialog::DeviceIndex() { return ui.FinalRenderDeviceCombo->currentIndex(); }
|
||||
uint FractoriumFinalRenderDialog::ThreadCount() { return ui.FinalRenderThreadCountSpin->value(); }
|
||||
uint FractoriumFinalRenderDialog::ThreadPriority() { return ui.FinalRenderThreadPriorityComboBox->currentIndex() - 2; }
|
||||
#ifdef _WIN32
|
||||
int FractoriumFinalRenderDialog::ThreadPriority() { return ui.FinalRenderThreadPriorityComboBox->currentIndex() - 2; }
|
||||
#else
|
||||
int FractoriumFinalRenderDialog::ThreadPriority()
|
||||
{
|
||||
if (ui.FinalRenderThreadPriorityComboBox->currentIndex() == 0)
|
||||
return THREAD_PRIORITY_LOWEST;
|
||||
else if (ui.FinalRenderThreadPriorityComboBox->currentIndex() == (ui.FinalRenderThreadPriorityComboBox->count() - 1))
|
||||
return THREAD_PRIORITY_HIGHEST;
|
||||
else
|
||||
return ui.FinalRenderThreadPriorityComboBox->currentIndex() * 25;
|
||||
}
|
||||
#endif
|
||||
double FractoriumFinalRenderDialog::WidthScale() { return m_WidthScaleSpin->value(); }
|
||||
double FractoriumFinalRenderDialog::HeightScale() { return m_HeightScaleSpin->value(); }
|
||||
double FractoriumFinalRenderDialog::Quality() { return m_QualitySpin->value(); }
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
uint PlatformIndex();
|
||||
uint DeviceIndex();
|
||||
uint ThreadCount();
|
||||
uint ThreadPriority();
|
||||
int ThreadPriority();
|
||||
double WidthScale();
|
||||
double HeightScale();
|
||||
double Quality();
|
||||
|
@ -174,7 +174,7 @@ FinalRenderEmberController<T>::FinalRenderEmberController(FractoriumFinalRenderD
|
||||
m_Renderer->Transparency(m_GuiState.m_Transparency);
|
||||
m_Renderer->m_ProgressParameter = reinterpret_cast<void*>(¤tStripForProgress);
|
||||
|
||||
if (path.endsWith(".png", Qt::CaseInsensitive) || m_Renderer->RendererType() == OPENCL_RENDERER)//This is creating the wrong thing.//TODO
|
||||
if (path.endsWith(".png", Qt::CaseInsensitive) || m_Renderer->RendererType() == OPENCL_RENDERER)
|
||||
m_Renderer->NumChannels(4);
|
||||
else
|
||||
m_Renderer->NumChannels(3);
|
||||
|
@ -38,7 +38,7 @@ struct FinalRenderGuiState
|
||||
uint m_PlatformIndex;
|
||||
uint m_DeviceIndex;
|
||||
uint m_ThreadCount;
|
||||
uint m_ThreadPriority;
|
||||
int m_ThreadPriority;
|
||||
double m_WidthScale;
|
||||
double m_HeightScale;
|
||||
double m_Quality;
|
||||
|
@ -23,7 +23,16 @@ Fractorium::Fractorium(QWidget* p)
|
||||
qRegisterMetaType<QVector<int>>("QVector<int>");//For previews.
|
||||
qRegisterMetaType<vector<byte>>("vector<byte>");
|
||||
qRegisterMetaType<EmberTreeWidgetItemBase*>("EmberTreeWidgetItemBase*");
|
||||
|
||||
|
||||
setDockOptions(DockOption::AllowNestedDocks | DockOption::AllowTabbedDocks);
|
||||
setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::TabPosition::North);
|
||||
setTabShape(QTabWidget::TabShape::Triangular);
|
||||
tabifyDockWidget(ui.LibraryDockWidget, ui.FlameDockWidget);
|
||||
tabifyDockWidget(ui.FlameDockWidget, ui.XformsDockWidget);
|
||||
tabifyDockWidget(ui.XformsDockWidget, ui.XaosDockWidget);
|
||||
tabifyDockWidget(ui.XaosDockWidget, ui.PaletteDockWidget);
|
||||
tabifyDockWidget(ui.PaletteDockWidget, ui.InfoDockWidget);
|
||||
|
||||
m_FontSize = 9;
|
||||
m_VarSortMode = 1;//Sort by weight by default.
|
||||
m_PaletteSortMode = 0;//Sort by palette ascending by default.
|
||||
@ -128,14 +137,14 @@ Fractorium::Fractorium(QWidget* p)
|
||||
|
||||
//Setup pointer in the GL window to point back to here.
|
||||
ui.GLDisplay->SetMainWindow(this);
|
||||
|
||||
restoreState(m_Settings->value("windowState").toByteArray());
|
||||
showMaximized();//This won't fully set things up and show them until after this constructor exits.
|
||||
|
||||
connect(ui.DockWidget, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), this, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
|
||||
connect(ui.DockWidget, SIGNAL(topLevelChanged(bool)), this, SLOT(OnDockTopLevelChanged(bool)));
|
||||
connect(ui.LibraryDockWidget, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), this, SLOT(dockLocationChanged(Qt::DockWidgetArea)));
|
||||
connect(ui.LibraryDockWidget, SIGNAL(topLevelChanged(bool)), this, SLOT(OnDockTopLevelChanged(bool)));
|
||||
|
||||
//Always ensure the library tab is selected, which will show preview renders.
|
||||
ui.ParamsTabWidget->setCurrentIndex(0);
|
||||
//ui.ParamsTabWidget->setCurrentIndex(0);
|
||||
ui.XformsTabWidget->setCurrentIndex(2);//Make variations tab the currently selected one under the Xforms tab.
|
||||
|
||||
//Setting certain values will completely throw off the GUI, doing everything
|
||||
@ -159,6 +168,7 @@ Fractorium::Fractorium(QWidget* p)
|
||||
SetCoordinateStatus(0, 0, 0, 0);
|
||||
|
||||
SetTabOrders();
|
||||
|
||||
//At this point, everything has been setup except the renderer. Shortly after
|
||||
//this constructor exits, GLWidget::InitGL() will create the initial flock and start the rendering timer
|
||||
//which executes whenever the program is idle. Upon starting the timer, the renderer
|
||||
@ -172,6 +182,7 @@ Fractorium::Fractorium(QWidget* p)
|
||||
/// </summary>
|
||||
Fractorium::~Fractorium()
|
||||
{
|
||||
m_Settings->setValue("windowState", saveState());
|
||||
m_Settings->sync();
|
||||
}
|
||||
|
||||
@ -718,6 +729,8 @@ void Fractorium::SetTabOrders()
|
||||
w = SetTabOrder(this, w, m_PaletteBlurSpin);
|
||||
w = SetTabOrder(this, w, m_PaletteBrightnessSpin);
|
||||
w = SetTabOrder(this, w, m_PaletteFrequencySpin);
|
||||
w = SetTabOrder(this, w, ui.PaletteFilterLineEdit);
|
||||
w = SetTabOrder(this, w, ui.PaletteFilterClearButton);
|
||||
w = SetTabOrder(this, w, ui.PaletteListTable);
|
||||
|
||||
w = SetTabOrder(this, ui.InfoBoundsGroupBox, ui.InfoBoundsFrame);//Info.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -44,7 +44,7 @@ void FractoriumSettings::EnsureDefaults()
|
||||
if (FinalThreadCount() == 0 || FinalThreadCount() > Timing::ProcessorCount())
|
||||
FinalThreadCount(Timing::ProcessorCount());
|
||||
|
||||
FinalThreadPriority(Clamp<uint>((uint)eThreadPriority::LOWEST, (uint)eThreadPriority::HIGHEST, FinalThreadPriority()));
|
||||
FinalThreadPriority(Clamp<int>((int)eThreadPriority::LOWEST, (int)eThreadPriority::HIGHEST, FinalThreadPriority()));
|
||||
|
||||
if (CpuSubBatch() < 1)
|
||||
CpuSubBatch(1);
|
||||
@ -186,8 +186,8 @@ void FractoriumSettings::FinalDeviceIndex(uint i) { setValue(FINALDEVICEINDE
|
||||
uint FractoriumSettings::FinalThreadCount() { return value(FINALTHREADCOUNT).toUInt(); }
|
||||
void FractoriumSettings::FinalThreadCount(uint i) { setValue(FINALTHREADCOUNT, i); }
|
||||
|
||||
uint FractoriumSettings::FinalThreadPriority() { return value(FINALTHREADPRIORITY).toUInt(); }
|
||||
void FractoriumSettings::FinalThreadPriority(uint i) { setValue(FINALTHREADPRIORITY, i); }
|
||||
uint FractoriumSettings::FinalThreadPriority() { return value(FINALTHREADPRIORITY).toInt(); }
|
||||
void FractoriumSettings::FinalThreadPriority(int i) { setValue(FINALTHREADPRIORITY, i); }
|
||||
|
||||
uint FractoriumSettings::FinalQuality() { return value(FINALQUALITY).toUInt(); }
|
||||
void FractoriumSettings::FinalQuality(uint i) { setValue(FINALQUALITY, i); }
|
||||
|
@ -153,7 +153,7 @@ public:
|
||||
void FinalThreadCount(uint b);
|
||||
|
||||
uint FinalThreadPriority();
|
||||
void FinalThreadPriority(uint b);
|
||||
void FinalThreadPriority(int b);
|
||||
|
||||
uint FinalQuality();
|
||||
void FinalQuality(uint i);
|
||||
|
@ -150,8 +150,8 @@ void Fractorium::InitXformsAffineUI()
|
||||
|
||||
//Further, the size of the dock widget won't be properly adjusted until the xforms tab is shown.
|
||||
//So show it here and it will be switched back in Fractorium's constructor.
|
||||
ui.ParamsTabWidget->setCurrentIndex(2);
|
||||
ui.DockWidget->update();
|
||||
//ui.ParamsTabWidget->setCurrentIndex(2);
|
||||
//ui.DockWidget->update();
|
||||
#endif
|
||||
|
||||
//Placing pointers to the spin boxes in arrays makes them easier to access in various places.
|
||||
|
Reference in New Issue
Block a user