Added check for qkList in meshviewer.config
Added QString listOfDirs Added gettter method to get listOfDirs Edited MainWindow.ui to prepare for list of file plus dir drop down
This commit is contained in:
parent
7e87b14fe1
commit
b2efa83e17
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -68,42 +68,20 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="treeWidget">
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="dragEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="dragDropMode">
|
||||
<enum>QAbstractItemView::DragOnly</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectItems</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="headerHidden">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="expandsOnDoubleClick">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QComboBox" name="dirDropDownList"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTreeView" name="fileListView"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="../Resources/Resources.qrc"/>
|
||||
</resources>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -29,6 +29,7 @@ private:
|
||||
bool m_bfCulling = false;
|
||||
bool m_light = false;
|
||||
|
||||
QString listOfDirs;
|
||||
int m_lightType = 1; // 1 = direct, 2 = point
|
||||
QVector3D m_lightColor = { 255,255,255 };
|
||||
float m_attenuation = 0.0f;
|
||||
@ -47,6 +48,7 @@ public:
|
||||
bool isBfCulling() const;
|
||||
bool isLight() const;
|
||||
|
||||
QString getListOfDirs();
|
||||
int getLightType() const;
|
||||
QVector3D getLightColor() const;
|
||||
float getAttenuation() const;
|
||||
@ -69,4 +71,4 @@ public:
|
||||
void setHeadlight(bool value);
|
||||
void setAutoColor(int value);
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -35,8 +35,19 @@ void SettingsManager::readFromFile()
|
||||
QList<QByteArray> lines = stream.split('\n');
|
||||
|
||||
for (auto& it : lines)
|
||||
{
|
||||
if (it.startsWith("<bgOn>"))
|
||||
{
|
||||
if (it.startsWith("<qkList>"))
|
||||
{
|
||||
QList<QByteArray> values = it.right(it.size() - it.indexOf('>') - 1).split(';');
|
||||
for (int i = 0; i < values.size(); i++)
|
||||
{
|
||||
if (i == values.size() - 1)
|
||||
listOfDirs.append(values[i]);
|
||||
else
|
||||
listOfDirs.append(values[i] + ";");
|
||||
}
|
||||
}
|
||||
else if (it.startsWith("<bgOn>"))
|
||||
{
|
||||
QList<QByteArray> values = it.right(it.size() - it.indexOf('>') - 1).split(';');
|
||||
|
||||
@ -107,12 +118,18 @@ void SettingsManager::writeToFile()
|
||||
file.write(QString("<liTy>%1\n").arg(m_lightType).toUtf8());
|
||||
file.write(QString("<atFa>%1\n").arg(m_attenuation).toUtf8());
|
||||
file.write(QString("<amCo>%1\n").arg(m_ambient).toUtf8());
|
||||
file.write(QString("<qkList>%1\n").arg(listOfDirs).toUtf8());
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
// getter ///////////////////////////////////////////////////////////////
|
||||
|
||||
QString SettingsManager::getListOfDirs()
|
||||
{
|
||||
return listOfDirs;
|
||||
}
|
||||
|
||||
QVector3D SettingsManager::getBgColorOn() const
|
||||
{
|
||||
return m_bgColorOn;
|
||||
|
Loading…
Reference in New Issue
Block a user