Merge remote-tracking branch 'graffy76/recordStatusDelegate'

actorid
Marc Zinnschlag 12 years ago
commit 12cfe1fdfe

@ -305,9 +305,12 @@ configure_file(${OpenMW_SOURCE_DIR}/files/transparency-overrides.cfg
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
"${OpenMW_BINARY_DIR}/openmw.cfg")
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
"${OpenMW_BINARY_DIR}/openmw.cfg.install")
configure_file(${OpenMW_SOURCE_DIR}/files/opencs.cfg
"${OpenMW_BINARY_DIR}/opencs.cfg")
if (NOT WIN32 AND NOT APPLE)
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.desktop
@ -352,6 +355,7 @@ if(DPKG_PROGRAM)
INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "../etc/openmw/" RENAME "openmw.cfg" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
INSTALL(FILES "${OpenMW_BINARY_DIR}/opencs.cfg" DESTINATION "../etc/openmw/" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT "openmw")
#Install resources
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "share/games/openmw/" FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT "Resources")
@ -591,6 +595,7 @@ if (APPLE)
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
install(FILES "${OpenMW_BINARY_DIR}/opencs.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
@ -706,6 +711,7 @@ if (NOT WIN32 AND NOT DPKG_PROGRAM AND NOT APPLE)
#INSTALL(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "${SYSCONFDIR}" )
INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${SYSCONFDIR}" )
INSTALL(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${SYSCONFDIR}" )
INSTALL(FILES "${OpenMW_BINARY_DIR}/opencs.cfg" DESTINATION "${SYSCONFDIR}" )
# Install resources
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "${DATADIR}" )

@ -6,8 +6,6 @@
#include <QRegExp>
#include <QMap>
#include <QDebug>
#include <components/files/configurationmanager.hpp>
#include <boost/version.hpp>

@ -7,8 +7,6 @@
#include <QRegExp>
#include <QMap>
#include <QDebug>
template <class Map>
class SettingsBase
{

@ -57,11 +57,11 @@ opencs_hdrs_noqt (view/doc
opencs_units (view/world
table tablesubview scriptsubview
table tablesubview scriptsubview util
)
opencs_units_noqt (view/world
dialoguesubview util subviews enumdelegate vartypedelegate scripthighlighter
dialoguesubview subviews enumdelegate vartypedelegate scripthighlighter recordstatusdelegate
)

@ -62,15 +62,9 @@ void CS::Editor::setupDataFiles()
mFileDialog.addFiles(path);
}
//Settings setup
QStringList settingFiles;
QString userPath = QString::fromStdString(mCfgMgr.getUserPath().string());
settingFiles.append(QString("opencs.cfg"));
settingFiles.append(userPath + QString("opencs.cfg"));
mUserSettings.setSettingsFiles(settingFiles);
mUserSettings.readSettings();
//load the settings into the userSettings instance.
const QString settingFileName = "opencs.cfg";
CSMSettings::UserSettings::instance().loadSettings(settingFileName);
}

@ -1,6 +1,4 @@
#include "document.hpp"
#include <cassert>
void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_iterator& begin,

@ -15,21 +15,31 @@ namespace CSMSettings
QStringList *mValues;
public:
explicit SettingContainer (QObject *parent = 0);
explicit SettingContainer (const QString &value, QObject *parent = 0);
virtual QString getName() const {return "";}
/// add a value to the container
/// multiple values supported
void insert (const QString &value);
/// update an existing value
/// index specifies multiple values
void update (const QString &value, int index = 0);
/// return value at specified index
QString getValue (int index = -1) const;
/// retrieve list of all values
inline QStringList *getValues() const { return mValues; }
/// return size of list
int count() const;
//test for empty container
//useful for default-constructed containers returned by QMap when invalid key is passed
/// test for empty container
/// useful for default-constructed containers returned by QMap when invalid key is passed
inline bool isEmpty() const { return (!mValue && !mValues); }
inline bool isMultiValue() const { return (mValues); }
};
}

@ -1,5 +1,7 @@
#include "settingsitem.hpp"
#include <QStringList>
bool CSMSettings::SettingsItem::updateItem (const QStringList *values)
{
QStringList::ConstIterator it = values->begin();
@ -66,21 +68,21 @@ bool CSMSettings::SettingsItem::updateItem(int valueListIndex)
bool CSMSettings::SettingsItem::validate (const QString &value)
{
bool isValid = true;
//if there is no value list or value pair, there is no validation to do
bool isValid = !(!mValueList->isEmpty() || mValuePair);
//validation required only if a value list or min/max value pair has been provided
if (mValueList->size()>0)
if (!isValid && !mValueList->isEmpty())
{
for (QStringList::ConstIterator it = mValueList->begin(); it !=mValueList->end(); ++it)
for (QStringList::Iterator it = mValueList->begin(); it != mValueList->end(); ++it)
// foreach (QString listItem, *mValueList)
{
isValid = ( value == *it);
isValid = (value == *it);
if (isValid)
break;
}
}
else if (mValuePair)
else if (!isValid && mValuePair)
{
int numVal = value.toInt();

@ -7,12 +7,13 @@
namespace CSMSettings
{
/// Represents a setting including metadata
/// (valid values, ranges, defaults, and multivalue status
class SettingsItem : public SettingContainer
{
QStringPair *mValuePair;
QStringList *mValueList;
bool mIsMultiValue;
QString mName;
QString mDefaultValue;
public:
@ -20,26 +21,41 @@ namespace CSMSettings
const QString& defaultValue, QObject *parent = 0)
: SettingContainer(defaultValue, parent),
mIsMultiValue (isMultiValue), mValueList (0),
mName (name), mValuePair (0), mDefaultValue (defaultValue)
{}
mValuePair (0), mDefaultValue (defaultValue)
{
QObject::setObjectName(name);
}
/// updateItem overloads for updating setting value
/// provided a list of values (multi-valued),
/// a specific value
/// or an index value corresponding to the mValueList
bool updateItem (const QStringList *values);
bool updateItem (const QString &value);
bool updateItem (int valueListIndex);
/// retroeve list of valid values for setting
inline QStringList *getValueList() { return mValueList; }
/// write list of valid values for setting
inline void setValueList (QStringList *valueList) { mValueList = valueList; }
/// valuePair used for spin boxes (max / min)
inline QStringPair *getValuePair() { return mValuePair; }
/// set value range (spinbox / integer use)
inline void setValuePair (QStringPair valuePair) { mValuePair = new QStringPair(valuePair); }
inline QString getName () const { return mName; }
inline bool isMultivalue () { return mIsMultiValue; }
void setDefaultValue (const QString &value);
QString getDefaultValue () const;
private:
/// Verifies that the supplied value is one of the following:
/// 1. Within the limits of the value pair (min / max)
/// 2. One of the values indicated in the value list
bool validate (const QString &value);
};
}

@ -7,13 +7,14 @@
#include <QMap>
#include <QMessageBox>
#include <QTextCodec>
#include <QFile>
#include <QDebug>
#include <components/files/configurationmanager.hpp>
#include "settingcontainer.hpp"
#include <boost/version.hpp>
/**
* Workaround for problems with whitespaces in paths in older versions of Boost library
*/
@ -36,6 +37,12 @@ CSMSettings::UserSettings::UserSettings()
{
assert(!mUserSettingsInstance);
mUserSettingsInstance = this;
mReadWriteMessage = QObject::tr("<br><b>Could not open or create file for writing</b><br><br> \
Please make sure you have the right permissions and try again.<br>");
mReadOnlyMessage = QObject::tr("<br><b>Could not open file for reading</b><br><br> \
Please make sure you have the right permissions and try again.<br>");
}
CSMSettings::UserSettings::~UserSettings()
@ -43,159 +50,193 @@ CSMSettings::UserSettings::~UserSettings()
mUserSettingsInstance = 0;
}
CSMSettings::SectionMap CSMSettings::UserSettings::getSettingsMap() const
QTextStream *CSMSettings::UserSettings::openFileStream (const QString &filePath, bool isReadOnly) const
{
return mSectionMap;
}
QFile *file = new QFile(filePath);
QFile *CSMSettings::UserSettings::openFile (const QString &filename) const
{
QFile *file = new QFile(filename);
QIODevice::OpenMode openFlags;
if (isReadOnly)
openFlags = QIODevice::ReadOnly | QIODevice::Text;
else
openFlags = QIODevice::ReadWrite | QIODevice::Text | QIODevice::Truncate;
bool success = (file->open(QIODevice::ReadWrite | QIODevice::Text | QIODevice::Truncate)) ;
QTextStream *stream = 0;
if (!success)
if (file->open(openFlags))
{
stream = new QTextStream(file);
stream->setCodec(QTextCodec::codecForName("UTF-8"));
}
if (!stream)
{
// File cannot be opened or created
QMessageBox msgBox;
msgBox.setWindowTitle(QObject::tr("Error writing OpenMW configuration file"));
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(QObject::tr("<br><b>Could not open or create %0 for writing</b><br><br> \
Please make sure you have the right permissions \
and try again.<br>").arg(file->fileName()));
msgBox.exec();
delete file;
file = 0;
}
return file;
return stream;
}
bool CSMSettings::UserSettings::writeFile(QFile *file, QMap<QString, CSMSettings::SettingList *> &settings) const
bool CSMSettings::UserSettings::writeSettings(QMap<QString, CSMSettings::SettingList *> &settings)
{
if (!file)
return false;
QTextStream stream(file);
stream.setCodec(QTextCodec::codecForName("UTF-8"));
QTextStream *stream = openFileStream(mUserFilePath);
QList<QString> keyList = settings.keys();
if (!stream)
displayFileErrorMessage(mReadWriteMessage, false);
foreach (QString key, keyList)
if (stream)
{
SettingList *sectionSettings = settings[key];
QList<QString> keyList = settings.keys();
stream << "[" << key << "]" << '\n';
foreach (QString key, keyList)
{
SettingList *sectionSettings = settings[key];
foreach (SettingContainer *item, *sectionSettings)
stream << item->getName() << " = " << item->getValue() << '\n';
*stream << "[" << key << "]" << '\n';
foreach (SettingContainer *item, *sectionSettings)
*stream << item->objectName() << " = " << item->getValue() << '\n';
}
stream->device()->close();
}
file->close();
return (stream);
}
return true;
const CSMSettings::SectionMap &CSMSettings::UserSettings::getSettings() const
{
return mSectionSettings;
}
void CSMSettings::UserSettings::getSettings(QTextStream &stream, SectionMap &sections) const
bool CSMSettings::UserSettings::loadFromFile(const QString &filePath)
{
//looks for a square bracket, "'\\["
//that has one or more "not nothing" in it, "([^]]+)"
//and is closed with a square bracket, "\\]"
if (filePath.isEmpty())
return false;
QRegExp sectionRe("^\\[([^]]+)\\]");
mSectionSettings.clear();
//Find any character(s) that is/are not equal sign(s), "[^=]+"
//followed by an optional whitespace, an equal sign, and another optional whirespace, "\\s*=\\s*"
//and one or more periods, "(.+)"
QTextStream *stream = openFileStream (filePath, true);
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
if (stream)
{
//looks for a square bracket, "'\\["
//that has one or more "not nothing" in it, "([^]]+)"
//and is closed with a square bracket, "\\]"
CSMSettings::SettingMap *settings = 0;
QString section = "none";
QRegExp sectionRe("^\\[([^]]+)\\]");
while (!stream.atEnd())
{
QString line = stream.readLine().simplified();
//Find any character(s) that is/are not equal sign(s), "[^=]+"
//followed by an optional whitespace, an equal sign, and another optional whitespace, "\\s*=\\s*"
//and one or more periods, "(.+)"
if (line.isEmpty() || line.startsWith("#"))
continue;
QRegExp keyRe("^([^=]+)\\s*=\\s*(.+)$");
//if a section is found, push it onto a new QStringList
//and push the QStringList onto
if (sectionRe.exactMatch(line))
{
//add the previous section's settings to the member map
if (settings)
sections.insert(section, settings);
//save new section and create a new list
section = sectionRe.cap(1);
settings = new SettingMap;
continue;
}
CSMSettings::SettingMap *settings = 0;
QString section = "none";
if (keyRe.indexIn(line) != -1)
while (!stream->atEnd())
{
SettingContainer *sc = new SettingContainer (keyRe.cap(2).simplified());
(*settings)[keyRe.cap(1).simplified()] = sc;
QString line = stream->readLine().simplified();
if (line.isEmpty() || line.startsWith("#"))
continue;
//if a section is found, push it onto a new QStringList
//and push the QStringList onto
if (sectionRe.exactMatch(line))
{
//add the previous section's settings to the member map
if (settings)
mSectionSettings.insert(section, settings);
//save new section and create a new list
section = sectionRe.cap(1);
settings = new SettingMap;
continue;
}
if (keyRe.indexIn(line) != -1)
{
SettingContainer *sc = new SettingContainer (keyRe.cap(2).simplified());
sc->setObjectName(keyRe.cap(1).simplified());
(*settings)[keyRe.cap(1).simplified()] = sc;
}
}
mSectionSettings.insert(section, settings);
stream->device()->close();
}
sections.insert(section, settings);
return (stream);
}
void CSMSettings::UserSettings::readSettings()
void CSMSettings::UserSettings::loadSettings (const QString &fileName)
{
CSMSettings::SectionMap sectionMap;
bool globalOk;
bool localOk;
foreach (const QString &path, mSettingsFiles)
{
qDebug() << "Loading config file:" << qPrintable(path);
QFile file(path);
//global
QString globalFilePath = QString::fromStdString(mCfgMgr.getGlobalPath().string()) + fileName;
globalOk = loadFromFile(globalFilePath);
if (file.exists())
{
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
QMessageBox msgBox;
msgBox.setWindowTitle(tr("Error opening OpenCS configuration file"));
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setText(QObject::tr("<br><b>Could not open %0 for reading</b><br><br> \
Please make sure you have the right permissions \
and try again.<br>").arg(file.fileName()));
msgBox.exec();
return;
}
QTextStream stream(&file);
stream.setCodec(QTextCodec::codecForName("UTF-8"));
//local
QString localFilePath = QString::fromStdString(mCfgMgr.getLocalPath().string()) + fileName;
localOk = loadFromFile(localFilePath);
getSettings(stream, mSectionMap);
}
//user
mUserFilePath = QString::fromStdString(mCfgMgr.getUserPath().string()) + fileName;
loadFromFile(mUserFilePath);
if (!(localOk || globalOk))
{
QString message = QObject::tr("<br><b>Could not open user settings files for reading</b><br><br> \
Global and local settings files could not be read.\
You may have incorrect file permissions or the OpenCS installation may be corrupted.<br>");
message += QObject::tr("<br>Global filepath: ") + globalFilePath;
message += QObject::tr("<br>Local filepath: ") + localFilePath;
file.close();
displayFileErrorMessage ( message, true);
}
}
void CSMSettings::UserSettings::setSettingsFiles(QStringList files)
void CSMSettings::UserSettings::updateSettings (const QString &sectionName, const QString &settingName)
{
mSettingsFiles = files;
}
SettingMap *settings = mSectionSettings[sectionName];
QStringList CSMSettings::UserSettings::getSettingsFiles () const
{
return mSettingsFiles;
if (!settings)
return;
SettingContainer *setting = 0;
if (settingName.isEmpty())
{
foreach (setting, *settings)
emit signalUpdateEditorSetting (setting->objectName(), setting->getValue());
}
else
{
if (settings->find(settingName)!=settings->end())
{
setting = settings->value(settingName);
emit signalUpdateEditorSetting (setting->objectName(), setting->getValue());
}
}
}
QString CSMSettings::UserSettings::getSettingValue(QString section, QString setting) const
QString CSMSettings::UserSettings::getSetting (const QString &section, const QString &setting) const
{
if(mSectionMap.find(section) == mSectionMap.end())
if(mSectionSettings.find(section) == mSectionSettings.end())
return QString();
CSMSettings::SettingMap *settings = mSectionMap.value(section);
CSMSettings::SettingMap *settings = mSectionSettings.value(section);
if(settings->find(setting) == settings->end())
return QString();
@ -205,9 +246,24 @@ QString CSMSettings::UserSettings::getSettingValue(QString section, QString sett
return settingContainer->getValue();
}
const CSMSettings::UserSettings& CSMSettings::UserSettings::instance()
CSMSettings::UserSettings& CSMSettings::UserSettings::instance()
{
assert(mUserSettingsInstance);
return *mUserSettingsInstance;
}
void CSMSettings::UserSettings::displayFileErrorMessage(const QString &message, bool isReadOnly)
{
// File cannot be opened or created
QMessageBox msgBox;
msgBox.setWindowTitle(QObject::tr("OpenCS configuration file I/O error"));
msgBox.setIcon(QMessageBox::Critical);
msgBox.setStandardButtons(QMessageBox::Ok);
if (!isReadOnly)
msgBox.setText (mReadWriteMessage + message);
else
msgBox.setText (message);
msgBox.exec();
}

@ -10,6 +10,10 @@
#include "support.hpp"
#ifndef Q_MOC_RUN
#include <components/files/configurationmanager.hpp>
#endif
namespace Files { typedef std::vector<boost::filesystem::path> PathContainer;
struct ConfigurationManager;}
@ -22,34 +26,56 @@ namespace CSMSettings {
Q_OBJECT
SectionMap mSectionSettings;
static UserSettings *mUserSettingsInstance;
QString mUserFilePath;
Files::ConfigurationManager mCfgMgr;
QString mReadOnlyMessage;
QString mReadWriteMessage;
public:
/// Singleton implementation
static UserSettings& instance();
UserSettings();
~UserSettings();
static const UserSettings& instance();
UserSettings (UserSettings const &); //not implemented
void operator= (UserSettings const &); //not implemented
/// Writes settings to the last loaded settings file
bool writeSettings(QMap<QString, SettingList *> &sections);
/// Called from editor to trigger signal to update the specified setting.
/// If no setting name is specified, all settings found in the specified section are updated.
void updateSettings (const QString &sectionName, const QString &settingName = "");
void readSettings();
void setSettingsFiles(QStringList files);
/// Retrieves the settings file at all three levels (global, local and user).
QFile *openFile (const QString &) const;
bool writeFile(QFile *file, QMap<QString, SettingList *> &sections) const;
void getSettings (QTextStream &stream, SectionMap &settings) const;
QStringList getSettingsFiles () const;
CSMSettings::SectionMap getSettingsMap() const;
QString getSettingValue(QString section, QString setting) const;
/// \todo Multi-valued settings are not fully implemented. Setting values
/// \todo loaded in later files will always overwrite previously loaded values.
void loadSettings (const QString &fileName);
/// Returns the entire map of settings across all sections
const SectionMap &getSettings () const;
/// Retrieves the value as a QString of the specified setting in the specified section
QString getSetting(const QString &section, const QString &setting) const;
private:
static UserSettings *mUserSettingsInstance;
CSMSettings::SectionMap mSectionMap;
QStringList mSettingsFiles;
/// Opens a QTextStream from the provided path as read-only or read-write.
QTextStream *openFileStream (const QString &filePath, bool isReadOnly = false) const;
UserSettings (UserSettings const &); //not implemented
void operator= (UserSettings const &); //not implemented
/// Parses a setting file specified in filePath from the provided text stream.
bool loadFromFile (const QString &filePath = "");
void displayFileErrorMessage(const QString &message, bool isReadOnly);
signals:
void signalUpdateEditorSetting (const QString &settingName, const QString &settingValue);
};

@ -41,7 +41,8 @@ namespace CSMWorld
Display_ArmorType,
Display_ClothingType,
Display_CreatureType,
Display_WeaponType
Display_WeaponType,
Display_RecordState
};
std::string mTitle;

@ -53,7 +53,7 @@ namespace CSMWorld
template<typename ESXRecordT>
struct RecordStateColumn : public Column<ESXRecordT>
{
RecordStateColumn() : Column<ESXRecordT> ("*", ColumnBase::Display_Integer) {}
RecordStateColumn() : Column<ESXRecordT> ("*", ColumnBase::Display_RecordState) {}
virtual QVariant get (const Record<ESXRecordT>& record) const
{
@ -775,4 +775,4 @@ namespace CSMWorld
};
}
#endif
#endif

@ -39,7 +39,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
mColumns.push_back (RefIdColumn ("ID", ColumnBase::Display_String,
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, false, false));
baseColumns.mId = &mColumns.back();
mColumns.push_back (RefIdColumn ("*", ColumnBase::Display_Integer,
mColumns.push_back (RefIdColumn ("*", ColumnBase::Display_RecordState,
ColumnBase::Flag_Table | ColumnBase::Flag_Dialogue, false, false));
baseColumns.mModified = &mColumns.back();
mColumns.push_back (RefIdColumn ("Type", ColumnBase::Display_Integer,
@ -537,4 +537,4 @@ void CSMWorld::RefIdCollection::load (ESM::ESMReader& reader, bool base, Univers
int CSMWorld::RefIdCollection::getAppendIndex (UniversalId::Type type) const
{
return mData.getAppendIndex (type);
}
}

@ -1,5 +1,6 @@
#include "subview.hpp"
CSVDoc::SubView::SubView (const CSMWorld::UniversalId& id) : mUniversalId (id)
{
/// \todo add a button to the title bar that clones this sub view
@ -15,3 +16,7 @@ CSMWorld::UniversalId CSVDoc::SubView::getUniversalId() const
{
return mUniversalId;
}
void CSVDoc::SubView::updateEditorSetting (const QString &settingName, const QString &settingValue)
{
}

@ -35,6 +35,7 @@ namespace CSVDoc
CSMWorld::UniversalId getUniversalId() const;
virtual void setEditLock (bool locked) = 0;
virtual void updateEditorSetting (const QString &, const QString &);
signals:
@ -42,4 +43,4 @@ namespace CSVDoc
};
}
#endif
#endif

@ -8,7 +8,6 @@
#include <QMdiArea>
#include <QDockWidget>
#include <QtGui/QApplication>
#include <QDebug>
#include "../../model/doc/document.hpp"
#include "../world/subviews.hpp"
@ -180,8 +179,9 @@ CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int to
: mViewManager (viewManager), mDocument (document), mViewIndex (totalViews-1),
mViewTotal (totalViews)
{
QString width = CSMSettings::UserSettings::instance().getSettingValue(QString("Window Size"), QString("Width"));
QString height = CSMSettings::UserSettings::instance().getSettingValue(QString("Window Size"), QString("Height"));
QString width = CSMSettings::UserSettings::instance().getSetting(QString("Window Size"), QString("Width"));
QString height = CSMSettings::UserSettings::instance().getSetting(QString("Window Size"), QString("Height"));
if(width==QString() || height==QString())
resize(800, 600);
else
@ -264,11 +264,14 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id)
/// \todo add an user setting to reuse sub views (on a per document basis or on a per top level view basis)
SubView *view = mSubViewFactory.makeSubView (id, *mDocument);
view->setObjectName ("subview");
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&)), this,
SLOT (addSubView (const CSMWorld::UniversalId&)));
CSMSettings::UserSettings::instance().updateSettings("Editor", "Record Status Display");
view->show();
}
@ -372,20 +375,34 @@ void CSVDoc::View::showUserSettings()
{
CSVSettings::UserSettingsDialog *settingsDialog = new CSVSettings::UserSettingsDialog(this);
connect (&(CSMSettings::UserSettings::instance()), SIGNAL (signalUpdateEditorSetting (const QString &, const QString &)),
this, SLOT (slotUpdateEditorSetting (const QString &, const QString &)) );
settingsDialog->show();
}
void CSVDoc::View::slotUpdateEditorSetting(const QString &settingName, const QString &settingValue)
void CSVDoc::View::resizeViewWidth (int width)
{
static QString lastValue = "";
if (width >= 0)
resize (width, geometry().height());
}
if (lastValue != settingValue)
{
//evaluate settingName against tokens to determine which function to call to update Editor application.
void CSVDoc::View::resizeViewHeight (int height)
{
if (height >= 0)
resize (geometry().width(), height);
}
lastValue = settingValue;
void CSVDoc::View::updateEditorSetting (const QString &settingName, const QString &settingValue)
{
if (settingName == "Record Status Display")
{
foreach (QObject *view, mSubViewWindow.children())
{
if (view->objectName() == "subview")
dynamic_cast<CSVDoc::SubView *>(view)->updateEditorSetting (settingName, settingValue);
}
}
else if (settingName == "Width")
resizeViewWidth (settingValue.toInt());
else if (settingName == "Height")
resizeViewHeight (settingValue.toInt());
}

@ -68,6 +68,14 @@ namespace CSVDoc
void exitApplication();
void loadUserSettings();
/// User preference function
void resizeViewWidth (int width);
/// User preference function
void resizeViewHeight (int height);
public:
View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews);
@ -88,6 +96,9 @@ namespace CSVDoc
Operations *getOperations() const;
/// Function called by view manager when user preferences are updated
void updateEditorSetting (const QString &, const QString &);
signals:
void newDocumentRequest();
@ -102,8 +113,6 @@ namespace CSVDoc
void abortOperation (int type);
void slotUpdateEditorSetting (const QString &settingName, const QString &settingValue);
private slots:
void newView();

@ -12,13 +12,14 @@
#include "../world/util.hpp"
#include "../world/enumdelegate.hpp"
#include "../world/vartypedelegate.hpp"
#include "../world/recordstatusdelegate.hpp"
#include "../settings/usersettingsdialog.hpp"
#include "view.hpp"
#include <QMessageBox>
#include <QPushButton>
#include <QtGui/QApplication>
#include <QDebug>
void CSVDoc::ViewManager::updateIndices()
{
@ -117,6 +118,12 @@ CSVDoc::ViewManager::ViewManager (CSMDoc::DocumentManager& documentManager)
mDelegateFactories->add (CSMWorld::ColumnBase::Display_WeaponType,
new CSVWorld::EnumDelegateFactory (sWeaponTypes));
mDelegateFactories->add (CSMWorld::ColumnBase::Display_RecordState,
new CSVWorld::RecordStatusDelegateFactory() );
connect (&CSMSettings::UserSettings::instance(), SIGNAL (signalUpdateEditorSetting (const QString &, const QString &)),
this, SLOT (slotUpdateEditorSetting (const QString &, const QString &)));
}
CSVDoc::ViewManager::~ViewManager()
@ -343,3 +350,13 @@ void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view)
if (notifySaveOnClose (view))
QApplication::instance()->exit();
}
void CSVDoc::ViewManager::slotUpdateEditorSetting (const QString &settingName, const QString &settingValue)
{
if (settingName == "Record Status Display" ||
settingName == "Width" || settingName == "Height")
{
foreach (CSVDoc::View *view, mViews)
view->updateEditorSetting (settingName, settingValue);
}
}

@ -72,6 +72,9 @@ namespace CSVDoc
void progress (int current, int max, int type, int threads, CSMDoc::Document *document);
void onExitWarningHandler(int state, CSMDoc::Document* document);
/// connected to update signal in UserSettings
void slotUpdateEditorSetting (const QString &, const QString &);
};
}

@ -38,27 +38,27 @@ CSVSettings::AbstractWidget *CSVSettings::AbstractBlock::buildWidget (const QStr
{
case Widget_RadioButton:
widg = createSettingWidget<QRadioButton> (def, layout);
widg = new SettingWidget<QRadioButton> (def, layout, mBox);
break;
case Widget_SpinBox:
widg = createSettingWidget<QSpinBox> (def, layout);
widg = new SettingWidget<QSpinBox> (def, layout, mBox);
break;
case Widget_CheckBox:
widg = createSettingWidget<QCheckBox> (def, layout);
widg = new SettingWidget<QCheckBox> (def, layout, mBox);
break;
case Widget_LineEdit:
widg = createSettingWidget<QLineEdit> (def, layout);
widg = new SettingWidget<QLineEdit> (def, layout, mBox);
break;
case Widget_ListBox:
widg = createSettingWidget<QListWidget> (def, layout);
widg = new SettingWidget<QListWidget> (def, layout, mBox);
break;
case Widget_ComboBox:
widg = createSettingWidget<QComboBox> (def, layout);
widg = new SettingWidget<QComboBox> (def, layout, mBox);
break;
default:

@ -11,6 +11,7 @@
namespace CSVSettings
{
/// Abstract base class for all blocks
class AbstractBlock : public QObject
{
Q_OBJECT
@ -31,40 +32,50 @@ namespace CSVSettings
bool isVisible() const;
virtual CSMSettings::SettingList *getSettings() = 0;
/// update settings found in the passed map and are encapsulated by the block
virtual bool updateSettings (const CSMSettings::SettingMap &settings) = 0;
/// update callback function called from update slot
/// used for updating application-level settings in the editor
virtual bool updateBySignal (const QString &name, const QString &value, bool &doEmit)
{ return false; }
protected:
/// Creates the layout which for the blocks QGroupBox
QLayout *createLayout (Orientation direction, bool isZeroMargin, QWidget* parent = 0);
/// Creates widgets that exist as direct children of the block
AbstractWidget *buildWidget (const QString &widgetName, WidgetDef &wDef,
QLayout *layout = 0, bool isConnected = true) const;
template <typename T>
AbstractWidget *createSettingWidget (WidgetDef &wDef, QLayout *layout) const
{
return new SettingWidget<T> (wDef, layout, mBox);
}
QWidget *getParent() const;
public slots:
/// enables / disables block-level widgets based on signals from other widgets
/// used in ToggleBlock
void slotSetEnabled (bool value);
/// receives updates to applicaion-level settings in the Editor
void slotUpdateSetting (const QString &settingName, const QString &settingValue);
private slots:
/// receives updates to a setting in the block pushed from the application level
void slotUpdate (const QString &value);
signals:
//signal to functions outside the settings tab widget
/// signal to UserSettings instance
void signalUpdateSetting (const QString &propertyName, const QString &propertyValue);
/// signal to widget for updating widget value
void signalUpdateWidget (const QString & value);
//propertyName and propertyValue are for properties for which the updated setting acts as a proxy
/// ProxyBlock use only.
/// Name and value correspond to settings for which the block is a proxy.
void signalUpdateProxySetting (const QString &propertyName, const QString &propertyValue);
};
}

@ -13,12 +13,17 @@
CSVSettings::AbstractPage::AbstractPage(QWidget *parent):
QWidget(parent)
{
QGridLayout *pageLayout = new QGridLayout(this);
setLayout (pageLayout);
}
CSVSettings::AbstractPage::AbstractPage(const QString &pageName, QWidget *parent):
QWidget(parent)
{
QWidget::setObjectName (pageName);
QGridLayout *pageLayout = new QGridLayout(this);
setLayout (pageLayout);
}
CSVSettings::AbstractPage::~AbstractPage()

@ -14,6 +14,11 @@ namespace CSVSettings {
typedef QList<AbstractBlock *> AbstractBlockList;
/// Abstract base class for all setting pages in the dialog
/// \todo Scripted implementation of settings should eliminate the need
/// \todo derive page classes.
/// \todo AbstractPage should be replaced with a general page construction class.
class AbstractPage: public QWidget
{
@ -28,18 +33,24 @@ namespace CSVSettings {
~AbstractPage();
virtual void setupUi()=0;
virtual void setupUi() = 0;
/// triggers widgiet initialization at the page level. All widgets updated to
/// current setting values
virtual void initializeWidgets (const CSMSettings::SettingMap &settings) = 0;
/// retrieve the list of settings local to the page.
CSMSettings::SettingList *getSettings();
void setObjectName();
protected:
/// Create a block for the page.
/// Block is constructed using passed definition struct
/// Page level-layout is created and assigned
template <typename S, typename T>
AbstractBlock *buildBlock (T &def)
AbstractBlock *buildBlock (T *def)
{
S *block = new S (this);
int ret = block->build (def);
@ -47,12 +58,12 @@ namespace CSVSettings {
if (ret < 0)
return 0;
QWidget::layout()->addWidget (block->getGroupBox());
QGroupBox *box = block->getGroupBox();
QWidget::layout()->addWidget (box);
return block;
}
};
}

@ -8,6 +8,7 @@ class QLayout;
namespace CSVSettings
{
/// Abstract base class for widgets which are used in user preferences dialog
class AbstractWidget : public QObject
{
Q_OBJECT
@ -16,45 +17,49 @@ namespace CSVSettings
public:
/// Passed layout is assigned the constructed widget.
/// if no layout is passed, one is created.
explicit AbstractWidget (QLayout *layout = 0, QWidget* parent = 0)
: QObject (parent), mLayout (layout)
{}
//retrieve layout for insertion into itemblock
/// retrieve layout for insertion into itemblock
QLayout *getLayout();
//create the derived widget instance
/// create the derived widget instance
void build (QWidget* widget, WidgetDef &def, bool noLabel = false);
//reference to the derived widget instance
/// reference to the derived widget instance
virtual QWidget *widget() = 0;
protected:
//called by inbound signal for type-specific widget udpates
/// Callback called by receiving slot for widget udpates
virtual void updateWidget (const QString &value) = 0;
//converts user-defined enum to Qt equivalents
/// Converts user-defined enum to Qt equivalents
QFlags<Qt::AlignmentFlag> getAlignment (Alignment flag);
private:
//widget initialization utilities
/// Creates layout and assigns label and widget as appropriate
void createLayout (Orientation direction, bool isZeroMargin);
/// Creates label and widget according to passed definition
void buildLabelAndWidget (QWidget *widget, WidgetDef &def, bool noLabel);
signals:
//outbound update
/// outbound update signal
void signalUpdateItem (const QString &value);
public slots:
//inbound updates
/// receives inbound updates
void slotUpdateWidget (const QString &value);
//Outbound updates from derived widget signal
/// Overloads for outbound updates from derived widget signal
void slotUpdateItem (const QString &value);
void slotUpdateItem (bool value);
void slotUpdateItem (int value);

@ -20,16 +20,11 @@
CSVSettings::BlankPage::BlankPage(QWidget *parent):
AbstractPage("Blank", parent)
{
initPage();
}
CSVSettings::BlankPage::BlankPage(const QString &title, QWidget *parent):
AbstractPage(title, parent)
{
initPage();
}
void CSVSettings::BlankPage::initPage()
{
// Hacks to get the stylesheet look properly
#ifdef Q_OS_MAC
@ -43,10 +38,7 @@ void CSVSettings::BlankPage::initPage()
void CSVSettings::BlankPage::setupUi()
{
QGroupBox *pageBox = new QGroupBox(this);
QLayout* pageLayout = new QVBoxLayout();
setLayout(pageLayout);
pageLayout->addWidget(pageBox);
layout()->addWidget(pageBox);
}
void CSVSettings::BlankPage::initializeWidgets (const CSMSettings::SettingMap &settings)

@ -10,6 +10,8 @@ namespace CSVSettings {
class UserSettings;
class AbstractBlock;
/// Derived page with no widgets
/// Reference use only.
class BlankPage : public AbstractPage
{
@ -20,9 +22,6 @@ namespace CSVSettings {
void setupUi();
void initializeWidgets (const CSMSettings::SettingMap &settings);
private:
void initPage();
};
}

@ -23,7 +23,7 @@ int CSVSettings::CustomBlock::build(GroupBlockDefList &defList, GroupBlockDefLis
for (; listIt != defList.end(); ++listIt)
{
if (!(*listIt)->isProxy)
retVal = buildGroupBlock (*(*listIt));
retVal = buildGroupBlock (*listIt);
else
{
mGroupList << proxyBlock;
@ -32,7 +32,7 @@ int CSVSettings::CustomBlock::build(GroupBlockDefList &defList, GroupBlockDefLis
}
if (proxyIt != defaultIt)
retVal = buildProxyBlock (*(*proxyIt), proxyBlock);
retVal = buildProxyBlock (*proxyIt, proxyBlock);
return retVal;
}
@ -45,7 +45,7 @@ CSVSettings::GroupBox *CSVSettings::CustomBlock::buildGroupBox (Orientation orie
return box;
}
int CSVSettings::CustomBlock::buildGroupBlock(GroupBlockDef &def)
int CSVSettings::CustomBlock::buildGroupBlock(GroupBlockDef *def)
{
GroupBlock *block = new GroupBlock (getParent());
@ -57,9 +57,9 @@ int CSVSettings::CustomBlock::buildGroupBlock(GroupBlockDef &def)
return block->build(def);
}
int CSVSettings::CustomBlock::buildProxyBlock(GroupBlockDef& def, ProxyBlock *block)
int CSVSettings::CustomBlock::buildProxyBlock(GroupBlockDef *def, ProxyBlock *block)
{
if (def.properties.size() != 1)
if (def->settingItems.size() != 1)
return -1;
int retVal = block->build(def);
@ -67,7 +67,8 @@ int CSVSettings::CustomBlock::buildProxyBlock(GroupBlockDef& def, ProxyBlock *bl
if (retVal != 0)
return retVal;
foreach (QStringList *list, *(def.properties.at(0)->proxyList))
// The first settingItem is the proxy setting, containing the list of settings bound to it.
foreach (QStringList *list, *(def->settingItems.at(0)->proxyList))
{
QString proxiedBlockName = list->at(0);

@ -8,6 +8,8 @@ namespace CSVSettings
class ProxyBlock;
/// Base class for customized user preference setting blocks
/// Special block classes should be derived from CustomBlock
class CustomBlock : public AbstractBlock
{
@ -19,18 +21,27 @@ namespace CSVSettings
explicit CustomBlock (QWidget *parent = 0);
/// Update settings local to the block
bool updateSettings (const CSMSettings::SettingMap &settings);
/// Retrieve settings local to the block
CSMSettings::SettingList *getSettings();
/// construct the block using the passed definition
int build (GroupBlockDefList &defList, GroupBlockDefList::Iterator *it = 0);
protected:
/// construct the block groupbox
GroupBox *buildGroupBox (Orientation orientation);
private:
int buildGroupBlock(GroupBlockDef &def);
int buildProxyBlock(GroupBlockDef &def, ProxyBlock *block);
/// Construction function for creating a standard GroupBlock child
int buildGroupBlock(GroupBlockDef *def);
/// Construction function for creating a standard ProxyBlock child
int buildProxyBlock(GroupBlockDef *def, ProxyBlock *block);
};
}
#endif // CUSTOMBLOCK_HPP

@ -1,156 +1,46 @@
#include "editorpage.hpp"
#include <QList>
#include <QListView>
#include <QGroupBox>
#include <QRadioButton>
#include <QDockWidget>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QStyle>
#ifdef Q_OS_MAC
#include <QPlastiqueStyle>
#endif
#include "../../model/settings/usersettings.hpp"
#include "groupblock.hpp"
#include "toggleblock.hpp"
#include "../../model/settings/usersettings.hpp"
CSVSettings::EditorPage::EditorPage(QWidget *parent):
CSVSettings::EditorPage::EditorPage(QWidget* parent) :
AbstractPage("Editor", parent)
{
// Hacks to get the stylesheet look properly
#ifdef Q_OS_MAC
QPlastiqueStyle *style = new QPlastiqueStyle;
//profilesComboBox->setStyle(style);
#endif
setupUi();
}
void CSVSettings::EditorPage::setupUi()
CSVSettings::GroupBlockDef *CSVSettings::EditorPage::setupRecordStatusDisplay()
{
GroupBlockDef undoStack (QString("Undo Stack Size"));
GroupBlockDef topLevelWindowCount (QString("Maximum Top-Level Window Count"));
GroupBlockDef reuseSubwindow (QString("Reuse Subwindows"));
GroupBlockDef customWindowSize (QString ("Custom Window Size"));
GroupBlockDef definedWindowSize (QString ("Pre-Defined Window Size"));
GroupBlockDef windowSizeToggle (QString ("Window Size"));
CustomBlockDef windowSize (QString ("Window Size"));
////////////////////////////
//undo stack size property
///////////////////////////
SettingsItemDef *undoStackItem = new SettingsItemDef (undoStack.title, "32");
undoStack.properties << undoStackItem;
undoStackItem->minMax.left = "0";
undoStackItem->minMax.right = "64";
WidgetDef stackWidget (Widget_SpinBox);
stackWidget.minMax = &(undoStackItem->minMax);
stackWidget.widgetWidth = 50;
undoStackItem->widget = stackWidget;
//////////////////////////////////////
//number of top level windows property
/////////////////////////////////////
SettingsItemDef *topLevelItem = new SettingsItemDef (topLevelWindowCount.title, "100");
topLevelWindowCount.properties << topLevelItem;
topLevelItem->minMax.left = "1";
topLevelItem->minMax.right = "256";
WidgetDef topLvlWinWidget (Widget_SpinBox);
topLvlWinWidget.minMax = &(topLevelItem->minMax);
topLvlWinWidget.widgetWidth = 50;
topLevelItem->widget = topLvlWinWidget;
///////////////////////////
//reuse subwindows property
////////////////////////////
SettingsItemDef *reuseSubItem = new SettingsItemDef (reuseSubwindow.title, "Reuse Subwindows");
*(reuseSubItem->valueList) << "None" << "Top-Level" << "Document-Level";
WidgetDef reuseSubWidget (Widget_RadioButton);
reuseSubWidget.valueList = (reuseSubItem->valueList);
reuseSubWidget.widgetAlignment = Align_Left;
GroupBlockDef *statusBlock = new GroupBlockDef(QString("Record Status Display"));
reuseSubwindow.properties << reuseSubItem;
reuseSubItem->widget = reuseSubWidget;
SettingsItemDef *statusItem = new SettingsItemDef (statusBlock->title, "Icon and Text");
*(statusItem->valueList) << QString("Icon and Text") << QString("Icon Only") << QString("Text Only");
///////////////////////////////
//custom window size properties
///////////////////////////////
WidgetDef statusWidget (Widget_RadioButton);
statusWidget.valueList = statusItem->valueList;
//custom width
SettingsItemDef *widthItem = new SettingsItemDef ("Window Width", "640");
widthItem->widget = WidgetDef (Widget_LineEdit);
widthItem->widget.widgetWidth = 45;
statusItem->widget = statusWidget;
//custom height
SettingsItemDef *heightItem = new SettingsItemDef ("Window Height", "480");
heightItem->widget = WidgetDef (Widget_LineEdit);
heightItem->widget.widgetWidth = 45;
heightItem->widget.caption = "x";
statusBlock->settingItems << statusItem;
customWindowSize.properties << widthItem << heightItem;
customWindowSize.widgetOrientation = Orient_Horizontal;
customWindowSize.isVisible = false;
//pre-defined
SettingsItemDef *widthByHeightItem = new SettingsItemDef ("Window Size", "640x480");
WidgetDef widthByHeightWidget = WidgetDef (Widget_ComboBox);
widthByHeightWidget.widgetWidth = 90;
*(widthByHeightItem->valueList) << "640x480" << "800x600" << "1024x768";
QStringList *widthProxy = new QStringList;
QStringList *heightProxy = new QStringList;
(*widthProxy) << "Window Width" << "640" << "800" << "1024";
(*heightProxy) << "Window Height" << "480" << "600" << "768";
*(widthByHeightItem->proxyList) << widthProxy << heightProxy;
widthByHeightItem->widget = widthByHeightWidget;
definedWindowSize.properties << widthByHeightItem;
definedWindowSize.isProxy = true;
definedWindowSize.isVisible = false;
// window size toggle
windowSizeToggle.captions << "Pre-Defined" << "Custom";
windowSizeToggle.widgetOrientation = Orient_Vertical;
windowSizeToggle.isVisible = false;
//define a widget for each group in the toggle
for (int i = 0; i < 2; i++)
windowSizeToggle.widgets << new WidgetDef (Widget_RadioButton);
windowSizeToggle.widgets.at(0)->isDefault = false;
windowSize.blockDefList << &windowSizeToggle << &definedWindowSize << &customWindowSize;
windowSize.defaultValue = "Custom";
QGridLayout *pageLayout = new QGridLayout(this);
return statusBlock;
}
setLayout (pageLayout);
void CSVSettings::EditorPage::setupUi()
{
mAbstractBlocks << buildBlock<GroupBlock> (topLevelWindowCount)
<< buildBlock<GroupBlock> (reuseSubwindow)
<< buildBlock<ToggleBlock> (windowSize)
<< buildBlock<GroupBlock> (undoStack);
mAbstractBlocks << buildBlock<GroupBlock>(setupRecordStatusDisplay());
foreach (AbstractBlock *block, mAbstractBlocks)
{
connect (block, SIGNAL (signalUpdateSetting (const QString &, const QString &)),
this, SIGNAL (signalUpdateEditorSetting (const QString &, const QString &)) );
}
connect ( this,
SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)),
&(CSMSettings::UserSettings::instance()),
SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)));
}
void CSVSettings::EditorPage::initializeWidgets (const CSMSettings::SettingMap &settings)

@ -1,28 +1,33 @@
#ifndef EDITORPAGE_H
#define EDITORPAGE_H
#ifndef EDITORPAGE_HPP
#define EDITORPAGE_HPP
#include "support.hpp"
#include "abstractpage.hpp"
class QGroupBox;
namespace CSVSettings {
class UserSettings;
class AbstractBlock;
namespace CSVSettings
{
class EditorPage : public AbstractPage
{
Q_OBJECT
public:
explicit EditorPage(QWidget *parent = 0);
EditorPage(QWidget *parent = 0);
void setupUi();
void initializeWidgets (const CSMSettings::SettingMap &settings);
void setupUi();
private:
/// User preference view of the record status delegate's icon / text setting
GroupBlockDef *setupRecordStatusDisplay();
signals:
/// Signals up for changes to editor application-level settings
void signalUpdateEditorSetting (const QString &settingName, const QString &settingValue);
public slots:
};
}
#endif //EDITORPAGE_H
#endif // EDITORPAGE_HPP

@ -9,22 +9,22 @@ CSVSettings::GroupBlock::GroupBlock (bool isVisible, QWidget *parent)
: AbstractBlock (isVisible, parent)
{}
int CSVSettings::GroupBlock::build (GroupBlockDef &def)
int CSVSettings::GroupBlock::build (GroupBlockDef *def)
{
if (def.properties.size() == 0)
if (def->settingItems.size() == 0)
return -1;
int retVal = 0;
setVisible (def.isVisible);
setVisible (def->isVisible);
mBox->setLayout(createLayout (def.widgetOrientation, true));
mBox->setLayout(createLayout (def->widgetOrientation, true));
setObjectName (def.title);
mBox->setTitle (def.title);
setObjectName (def->title);
mBox->setTitle (def->title);
foreach (SettingsItemDef *itemDef, def.properties)
foreach (SettingsItemDef *itemDef, def->settingItems)
{
ItemBlock *block = new ItemBlock (mBox);

@ -8,6 +8,8 @@ namespace CSVSettings
{
class ItemBlock;
/// Base class for group blocks.
/// Derived block classes should use CustomBlock
class GroupBlock : public AbstractBlock
{
ItemBlockList mItemBlockList;
@ -16,15 +18,24 @@ namespace CSVSettings
GroupBlock (QWidget* parent = 0);
GroupBlock (bool isVisible, QWidget *parent = 0);
int build (GroupBlockDef &def);
/// build the gorup block based on passed definition
int build (GroupBlockDef *def);
/// update settings local to the group block
bool updateSettings (const CSMSettings::SettingMap &settings);
/// retrieve setting list local to the group block
CSMSettings::SettingList *getSettings();
/// retrieve item block by name from the passed list or local list
ItemBlock *getItemBlock (const QString &name, ItemBlockList *blockList = 0);
/// retrieve the item block by index from the local list
ItemBlock *getItemBlock (int index);
protected:
/// create block layout based on passed definition
int buildLayout (GroupBlockDef &def);
};

@ -5,6 +5,7 @@
namespace CSVSettings
{
/// Custom implementation of QGroupBox to be used with block classes
class GroupBox : public QGroupBox
{
static const QString INVISIBLE_BOX_STYLE;

@ -15,22 +15,32 @@ namespace CSVSettings
ItemBlock (QWidget* parent = 0);
/// pure virtual function not implemneted
bool updateSettings (const CSMSettings::SettingMap &settings) { return false; }
CSMSettings::SettingList *getSettings ();
QString getValue () const;
/// item blocks encapsulate only one setting
int getSettingCount();
/// update setting value and corresponding widget
bool update (const QString &value);
/// virtual construction function
int build(SettingsItemDef &iDef);
private:
/// custom construction function
void buildItemBlock (SettingsItemDef& iDef);
void buildItemBlockWidgets (SettingsItemDef& iDef);
/// update the setting value
bool updateItem (const QString &);
/// callback function triggered when update to application level is signalled
bool updateBySignal (const QString &name, const QString &value, bool &doEmit);
};
}

@ -5,10 +5,10 @@ CSVSettings::ProxyBlock::ProxyBlock (QWidget *parent)
: GroupBlock (parent)
{
}
int CSVSettings::ProxyBlock::build (GroupBlockDef &proxyDef)
int CSVSettings::ProxyBlock::build (GroupBlockDef *proxyDef)
{
//get the list of pre-defined values for the proxy
mValueList = proxyDef.properties.at(0)->valueList;
mValueList = proxyDef->settingItems.at(0)->valueList;
bool success = GroupBlock::build(proxyDef);
@ -53,6 +53,8 @@ bool CSVSettings::ProxyBlock::updateProxiedSettings()
bool success = false;
int i = 0;
//find the value index of the selected value in the proxy setting
for (; i < mValueList->size(); ++i)
{
success = (value == mValueList->at(i));
@ -64,6 +66,7 @@ bool CSVSettings::ProxyBlock::updateProxiedSettings()
if (!success)
return false;
// update the containing the proxied item's name
foreach (QStringList *list, mProxyList)
{
if ( list->at(0) == block->objectName())

@ -9,8 +9,7 @@ namespace CSVSettings
{
Q_OBJECT
//NOTE: mProxyItemBlockList and mProxyList
//should be combined into a value pair and stored in one list.
/// TODO: Combine mProxyItemBlockList and mProxyList.
ItemBlockList mProxiedItemBlockList;
ProxyList mProxyList;
QStringList *mValueList;
@ -20,17 +19,28 @@ namespace CSVSettings
explicit ProxyBlock (QWidget *parent = 0);
explicit ProxyBlock (ItemBlock *proxyItemBlock, QWidget *parent = 0);
/// Add a block that contains a proxied setting to the proxy block.
void addSetting (ItemBlock* settingBlock, QStringList *proxyList);
int build (GroupBlockDef &def);
int build (GroupBlockDef *def);
CSMSettings::SettingList *getSettings() { return 0; }
/// Update settings local to the proxy block pushed from application level
bool updateSettings (const CSMSettings::SettingMap &settings);
/// callback function triggered when update to the application level is signaled.
bool updateBySignal (const QString &name, const QString &value, bool &doEmit);
private:
/// return the item block of a proxied setting
ItemBlock *getProxiedItemBlock (const QString &name);
/// update the proxy setting with data from the proxied settings
bool updateByProxiedSettings(const CSMSettings::SettingMap *settings = 0);
/// update proxied settings with data from the proxy setting
bool updateProxiedSettings();
private slots:

@ -16,7 +16,8 @@
namespace CSVSettings
{
//VALID FOR RADIOBUTTON / CHECKBOX (or other toggle widget with it's own label)
/// Generic template for radiobuttons / checkboxes
template <typename T1>
class SettingWidget : public AbstractWidget
{
@ -47,6 +48,7 @@ namespace CSVSettings
}
};
/// spin box template
template <>
class SettingWidget <QSpinBox>: public AbstractWidget
{
@ -90,6 +92,7 @@ namespace CSVSettings
};
/// combo box template
template <>
class SettingWidget <QComboBox>: public CSVSettings::AbstractWidget
{
@ -142,6 +145,7 @@ namespace CSVSettings
};
/// line edit template
template <>
class SettingWidget <QLineEdit>: public CSVSettings::AbstractWidget
{
@ -175,6 +179,8 @@ namespace CSVSettings
}
};
/// list widget template
/// \todo Not fully implemented. Only widget supporting multi-valued settings
template <>
class SettingWidget <QListWidget>: public CSVSettings::AbstractWidget
{

@ -44,21 +44,44 @@ namespace CSVSettings
Align_Right = Qt::AlignRight
};
//template for defining the widget of a property.
/// definition struct for widgets
struct WidgetDef
{
WidgetType type; //type of widget providing input
int labelWidth; //width of caption label
int widgetWidth; //width of input widget
Orientation orientation; //label / widget orientation (horizontal / vertical)
QString inputMask; //input mask (line edit)
QString caption; //label caption. Leave empty for multiple items. See BlockDef::captionList
QString value; //widget value. Leave empty for multiple items. See BlockDef::valueList
CSMSettings::QStringPair *minMax; //Min/Max QString value pair. If empty, assigned to property item value pair.
QStringList *valueList; //value list for list widgets. If left empty, is assigned to property item value list during block build().
bool isDefault; //isDefault - determined at runtime.
Alignment valueAlignment; //left / center / right-justify text in widget
Alignment widgetAlignment; //left / center / right-justify widget in group box
/// type of widget providing input
WidgetType type;
/// width of caption label
int labelWidth;
/// width of input widget
int widgetWidth;
/// label / widget orientation (horizontal / vertical)
Orientation orientation;
/// input mask (line edit only)
QString inputMask;
/// label caption. Leave empty for multiple items. See BlockDef::captionList
QString caption;
/// widget value. Leave empty for multiple items. See BlockDef::valueList
QString value;
/// Min/Max QString value pair. If empty, assigned to property item value pair.
CSMSettings::QStringPair *minMax;
/// value list for list widgets. If left empty, is assigned to property item value list during block build().
QStringList *valueList;
/// determined at runtime
bool isDefault;
/// left / center / right-justify text in widget
Alignment valueAlignment;
/// left / center / right-justify widget in group box
Alignment widgetAlignment;
WidgetDef() : labelWidth (-1), widgetWidth (-1),
@ -79,20 +102,34 @@ namespace CSVSettings
};
//Defines the attributes of the property as it is represented in the config file
//as well as the UI elements (group box and widget) that serve it.
//Only one widget may serve as the input widget for the property.
/// Defines the attributes of the setting as it is represented in the config file
/// as well as the UI elements (group box and widget) that serve it.
/// Only one widget may serve as the input widget for the setting.
struct SettingsItemDef
{
QString name; //property name
QStringList *valueList; //list of valid values for the property.
//Used to populate option widget captions or list widget item lists (see WidgetDef::caption / value)
/// setting name
QString name;
/// list of valid values for the setting
QStringList *valueList;
/// Used to populate option widget captions or list widget item lists (see WidgetDef::caption / value)
QString defaultValue;
/// flag indicating multi-valued setting
bool hasMultipleValues;
CSMSettings::QStringPair minMax; //minimum / maximum value pair
WidgetDef widget; //definition of the input widget for this setting
Orientation orientation; //general orientation of the widget / label for this property
ProxyList *proxyList; //list of property and corresponding default values for proxy widget
/// minimum / maximum value pair
CSMSettings::QStringPair minMax;
/// definition of the input widget for this setting
WidgetDef widget;
/// general orientation of the widget / label for this setting
Orientation orientation;
/// list of settings and corresponding default values for proxy widget
ProxyList *proxyList;
SettingsItemDef() : name (""), defaultValue (""), orientation (Orient_Vertical), hasMultipleValues (false)
{}
@ -104,18 +141,32 @@ namespace CSVSettings
};
//Hierarchically, this is a "sub-section" of properties within a section, solely for UI organization.
//Does not correlate to config file structure.
/// Generic container block
struct GroupBlockDef
{
QString title; //title of the block containing the property or properties of this sub-section
QStringList captions; //list of captions for widgets at the block level (not associated with any particular property)
WidgetList widgets; //list of widgets at the block level (not associated with any particular property)
QList<SettingsItemDef *> properties; //list of the property(ies) which are subordinate to the property block.
Orientation widgetOrientation; //general orientation of widgets in group block
bool isVisible; //determines whether or not box border/title are visible
bool isProxy; //indicates whether or not this block defines a proxy block
QString defaultValue; //generic default value attribute
/// block title
QString title;
/// list of captions for widgets at the block level (not associated with any particular setting)
QStringList captions;
/// list of widgets at the block level (not associated with any particular setting)
WidgetList widgets;
/// list of the settings which are subordinate to the setting block.
QList<SettingsItemDef *> settingItems;
/// general orientation of widgets in group block
Orientation widgetOrientation;
/// determines whether or not box border/title are visible
bool isVisible;
/// indicates whether or not this block defines a proxy block
bool isProxy;
/// generic default value attribute
QString defaultValue;
GroupBlockDef (): title(""), widgetOrientation (Orient_Vertical), isVisible (true), isProxy (false), defaultValue ("")
{}
@ -125,11 +176,19 @@ namespace CSVSettings
{}
};
/// used to create unique, complex blocks
struct CustomBlockDef
{
/// block title
QString title;
QString defaultValue; //default value for widgets unique to the custom block
GroupBlockDefList blockDefList; //list of settings groups that comprise the settings within the custom block
/// default value for widgets unique to the custom block
QString defaultValue;
/// list of settings groups that comprise the settings within the custom block
GroupBlockDefList blockDefList;
/// orientation of the widgets within the block
Orientation blockOrientation;
CustomBlockDef (): title (""), defaultValue (""), blockOrientation (Orient_Horizontal)

@ -7,24 +7,24 @@ CSVSettings::ToggleBlock::ToggleBlock(QWidget *parent) :
CustomBlock(parent)
{}
int CSVSettings::ToggleBlock::build(CustomBlockDef &def)
int CSVSettings::ToggleBlock::build(CustomBlockDef *def)
{
if (def.blockDefList.size()==0)
if (def->blockDefList.size()==0)
return -1;
QList<GroupBlockDef *>::Iterator it = def.blockDefList.begin();
QList<GroupBlockDef *>::Iterator it = def->blockDefList.begin();
//first def in the list is the def for the toggle block
GroupBlockDef *toggleDef = *it++;
if (toggleDef->captions.size() != def.blockDefList.size()-1 )
if (toggleDef->captions.size() != def->blockDefList.size()-1 )
return -2;
if (toggleDef->widgets.size() == 0)
return -3;
//create the toogle block UI structure
QLayout *blockLayout = createLayout (def.blockOrientation, true);
QLayout *blockLayout = createLayout (def->blockOrientation, true);
GroupBox *propertyBox = buildGroupBox (toggleDef->widgetOrientation);
mBox->setLayout(blockLayout);
@ -34,13 +34,13 @@ int CSVSettings::ToggleBlock::build(CustomBlockDef &def)
//this manages proxy block construction.
//Any settings managed by the proxy setting
//must be included in the blocks defined in the list.
CustomBlock::build (def.blockDefList, &it);
CustomBlock::build (def->blockDefList, &it);
for (GroupBlockList::iterator it = mGroupList.begin(); it != mGroupList.end(); ++it)
propertyBox->layout()->addWidget ((*it)->getGroupBox());
//build togle widgets, linking them to the settings
GroupBox *toggleBox = buildToggleWidgets (*toggleDef, def.defaultValue);
GroupBox *toggleBox = buildToggleWidgets (toggleDef, def->defaultValue);
blockLayout->addWidget(toggleBox);
blockLayout->addWidget(propertyBox);
@ -49,16 +49,16 @@ int CSVSettings::ToggleBlock::build(CustomBlockDef &def)
return 0;
}
CSVSettings::GroupBox *CSVSettings::ToggleBlock::buildToggleWidgets (GroupBlockDef &def, QString &defaultToggle)
CSVSettings::GroupBox *CSVSettings::ToggleBlock::buildToggleWidgets (GroupBlockDef *def, QString &defaultToggle)
{
GroupBox *box = new GroupBox (false, getParent());
QLayout *layout = createLayout (def.widgetOrientation, true, static_cast<QWidget *>(box));
QLayout *layout = createLayout (def->widgetOrientation, true, static_cast<QWidget *>(box));
for (int i = 0; i < def.widgets.size(); ++i)
for (int i = 0; i < def->widgets.size(); ++i)
{
QString caption = def.captions.at(i);
WidgetDef *wDef = def.widgets.at(i);
QString caption = def->captions.at(i);
WidgetDef *wDef = def->widgets.at(i);
wDef->caption = caption;
wDef->widgetAlignment = Align_Left;

@ -18,10 +18,12 @@ namespace CSVSettings
public:
explicit ToggleBlock(QWidget *parent = 0);
int build (CustomBlockDef &def);
int build (CustomBlockDef *def);
private:
GroupBox *buildToggleWidgets (GroupBlockDef &def, QString &defaultToggle);
/// Constructor for toggle widgets that are specific to toggle block
/// Widgets are not a part of the user preference settings
GroupBox *buildToggleWidgets (GroupBlockDef *def, QString &defaultToggle);
};
}
#endif // TOGGLEBLOCK_HPP

@ -9,13 +9,14 @@
#include <QFile>
#include <QPushButton>
#include <QDockWidget>
#include <QDebug>
#include "blankpage.hpp"
#include <QGridLayout>
#include "editorpage.hpp"
#include "windowpage.hpp"
#include "../../model/settings/support.hpp"
#include "../../model/settings/support.hpp"
#include <boost/filesystem/path.hpp>
#include "settingwidget.hpp"
CSVSettings::UserSettingsDialog::UserSettingsDialog(QMainWindow *parent) :
@ -23,13 +24,12 @@ CSVSettings::UserSettingsDialog::UserSettingsDialog(QMainWindow *parent) :
{
setWindowTitle(QString::fromUtf8 ("User Settings"));
buildPages();
setWidgetStates (CSMSettings::UserSettings::instance().getSettingsMap());
positionWindow ();
setWidgetStates ();
connect (mListWidget,
SIGNAL (currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this,
SLOT (slotChangePage (QListWidgetItem*, QListWidgetItem*)));
SLOT (slotChangePage (QListWidgetItem*, QListWidgetItem*)));
}
CSVSettings::UserSettingsDialog::~UserSettingsDialog()
@ -41,17 +41,21 @@ void CSVSettings::UserSettingsDialog::closeEvent (QCloseEvent *event)
writeSettings();
}
void CSVSettings::UserSettingsDialog::setWidgetStates (CSMSettings::SectionMap settingsMap)
void CSVSettings::UserSettingsDialog::setWidgetStates ()
{
CSMSettings::UserSettings::instance().loadSettings("opencs.cfg");
const CSMSettings::SectionMap &sectionSettings = CSMSettings::UserSettings::instance().getSettings();
//iterate the tabWidget's pages (sections)
for (int i = 0; i < mStackedWidget->count(); i++)
{
//get the settings defined for the entire section
CSMSettings::SettingMap *settings = settingsMap [mStackedWidget->widget(i)->objectName()];
//and update widget
QString pageName = mStackedWidget->widget(i)->objectName();
//if found, initialize the page's widgets
if (settings)
if (sectionSettings.find(pageName) != sectionSettings.end())
{
CSMSettings::SettingMap *settings = sectionSettings.value(pageName);
AbstractPage *page = getAbstractPage (i);
page->initializeWidgets(*settings);
}
@ -66,60 +70,26 @@ void CSVSettings::UserSettingsDialog::buildPages()
mListWidget = new QListWidget (centralWidget);
mStackedWidget = new QStackedWidget (centralWidget);
QLayout* dialogLayout = new QHBoxLayout();
QGridLayout* dialogLayout = new QGridLayout();
dialogLayout->addWidget (mListWidget);
dialogLayout->addWidget (mStackedWidget);
mListWidget->setMinimumWidth(0);
mListWidget->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Expanding);
mStackedWidget->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
dialogLayout->addWidget (mListWidget,0,0);
dialogLayout->addWidget (mStackedWidget,0,1, Qt::AlignTop);
centralWidget->setLayout (dialogLayout);
setCentralWidget (centralWidget);
setDockOptions (QMainWindow::AllowNestedDocks);
//uncomment to test with sample editor page.
//createSamplePage();
/*createPage<BlankPage>("Page1");
createPage<BlankPage>("Page2");
createPage<BlankPage>("Page3");*/
createWindowPage();
}
void CSVSettings::UserSettingsDialog::createSamplePage()
{
//add pages to stackedwidget and items to listwidget
CSVSettings::AbstractPage *page
= new CSVSettings::EditorPage(this);
mStackedWidget->addWidget (page);
new QListWidgetItem (page->objectName(), mListWidget);
createPage<WindowPage>();
createPage<EditorPage>();
connect ( page, SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)),
&(CSMSettings::UserSettings::instance()), SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)));
}
void CSVSettings::UserSettingsDialog::createWindowPage()
{
//add pages to stackedwidget and items to listwidget
CSVSettings::AbstractPage *page
= new CSVSettings::WindowPage(this);
mStackedWidget->addWidget (page);
new QListWidgetItem (page->objectName(), mListWidget);
connect ( page, SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)),
&(CSMSettings::UserSettings::instance()), SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)));
}
void CSVSettings::UserSettingsDialog::positionWindow ()
{
QRect scr = QApplication::desktop()->screenGeometry();
move(scr.center().x() - (width() / 2), scr.center().y() - (height() / 2));
}
void CSVSettings::UserSettingsDialog::writeSettings()
{
QMap<QString, CSMSettings::SettingList *> settings;
@ -129,11 +99,7 @@ void CSVSettings::UserSettingsDialog::writeSettings()
AbstractPage *page = getAbstractPage (i);
settings [page->objectName()] = page->getSettings();
}
QStringList paths = CSMSettings::UserSettings::instance().getSettingsFiles();
CSMSettings::UserSettings::instance().writeFile(CSMSettings::UserSettings::instance().openFile(paths.back()), settings);
CSMSettings::UserSettings::instance().writeSettings(settings);
}
CSVSettings::AbstractPage *CSVSettings::UserSettingsDialog::getAbstractPage (int index)

@ -4,14 +4,13 @@
#include <QMainWindow>
#include <QStackedWidget>
#include <QListWidgetItem>
#ifndef Q_MOC_RUN
#include <components/files/configurationmanager.hpp>
#endif
#include <QApplication>
#include "../../model/settings/usersettings.hpp"
#include "../../model/settings/support.hpp"
#include "editorpage.hpp"
class QHBoxLayout;
class AbstractWidget;
class QStackedWidget;
@ -27,7 +26,6 @@ namespace CSVSettings {
QListWidget *mListWidget;
QStackedWidget *mStackedWidget;
Files::ConfigurationManager mCfgMgr;
public:
UserSettingsDialog(QMainWindow *parent = 0);
@ -35,37 +33,39 @@ namespace CSVSettings {
private:
/// Settings are written on close
void closeEvent (QCloseEvent *event);
/// return the setting page by name
/// performs dynamic cast to AbstractPage *
AbstractPage *getAbstractPage (int index);
void setWidgetStates (CSMSettings::SectionMap settingsMap);
void setWidgetStates ();
void buildPages();
void positionWindow ();
void writeSettings();
void createSamplePage();
//Pages
void createWindowPage();
/// Templated function to create a custom user preference page
template <typename T>
void createPage (const QString &title)
void createPage ()
{
T *page = new T(title, this);
T *page = new T(mStackedWidget);
mStackedWidget->addWidget (dynamic_cast<QWidget *>(page));
new QListWidgetItem (page->objectName(), mListWidget);
//finishing touches
if (mStackedWidget->sizeHint().width() < 640)
mStackedWidget->sizeHint().setWidth(640);
QFontMetrics fm (QApplication::font());
int textWidth = fm.width(page->objectName());
if (mStackedWidget->sizeHint().height() < 480)
mStackedWidget->sizeHint().setHeight(480);
if ((textWidth + 50) > mListWidget->minimumWidth())
mListWidget->setMinimumWidth(textWidth + 50);
resize (mStackedWidget->sizeHint());
}
public slots:
/// Called when a different page is selected in the left-hand list widget
void slotChangePage (QListWidgetItem*, QListWidgetItem*);
};

@ -16,6 +16,7 @@
#include "../../model/settings/usersettings.hpp"
#include "groupblock.hpp"
#include "toggleblock.hpp"
#include "../../view/settings/abstractblock.hpp"
CSVSettings::WindowPage::WindowPage(QWidget *parent):
AbstractPage("Window Size", parent)
@ -29,35 +30,10 @@ CSVSettings::WindowPage::WindowPage(QWidget *parent):
setupUi();
}
void CSVSettings::WindowPage::setupUi()
CSVSettings::GroupBlockDef * CSVSettings::WindowPage::buildDefinedWindowSize()
{
GroupBlockDef customWindowSize (QString ("Custom Window Size"));
GroupBlockDef definedWindowSize (QString ("Pre-Defined Window Size"));
GroupBlockDef windowSizeToggle (QString ("Window Size"));
CustomBlockDef windowSize (QString ("Window Size"));
///////////////////////////////
//custom window size properties
///////////////////////////////
//custom width
SettingsItemDef *widthItem = new SettingsItemDef ("Width", "640");
widthItem->widget = WidgetDef (Widget_LineEdit);
widthItem->widget.widgetWidth = 45;
//custom height
SettingsItemDef *heightItem = new SettingsItemDef ("Height", "480");
heightItem->widget = WidgetDef (Widget_LineEdit);
heightItem->widget.widgetWidth = 45;
heightItem->widget.caption = "x";
customWindowSize.properties << widthItem << heightItem;
customWindowSize.widgetOrientation = Orient_Horizontal;
customWindowSize.isVisible = false;
GroupBlockDef *block = new GroupBlockDef ( "Defined Size");
//pre-defined
SettingsItemDef *widthByHeightItem = new SettingsItemDef ("Window Size", "640x480");
WidgetDef widthByHeightWidget = WidgetDef (Widget_ComboBox);
widthByHeightWidget.widgetWidth = 90;
@ -73,27 +49,74 @@ void CSVSettings::WindowPage::setupUi()
widthByHeightItem->widget = widthByHeightWidget;
definedWindowSize.properties << widthByHeightItem;
definedWindowSize.isProxy = true;
definedWindowSize.isVisible = false;
block->settingItems << widthByHeightItem;
block->isProxy = true;
block->isVisible = false;
return block;
}
CSVSettings::GroupBlockDef *CSVSettings::WindowPage::buildCustomWindowSize()
{
GroupBlockDef *block = new GroupBlockDef ("Custom Size");
//custom width
SettingsItemDef *widthItem = new SettingsItemDef ("Width", "640");
widthItem->widget = WidgetDef (Widget_LineEdit);
widthItem->widget.widgetWidth = 45;
widthItem->widget.inputMask = "9999";
//custom height
SettingsItemDef *heightItem = new SettingsItemDef ("Height", "480");
heightItem->widget = WidgetDef (Widget_LineEdit);
heightItem->widget.widgetWidth = 45;
heightItem->widget.caption = "x";
heightItem->widget.inputMask = "9999";
block->settingItems << widthItem << heightItem;
block->widgetOrientation = Orient_Horizontal;
block->isVisible = false;
return block;
}
CSVSettings::GroupBlockDef *CSVSettings::WindowPage::buildWindowSizeToggle()
{
GroupBlockDef *block = new GroupBlockDef ("Window Size");
// window size toggle
windowSizeToggle.captions << "Pre-Defined" << "Custom";
windowSizeToggle.widgetOrientation = Orient_Vertical;
windowSizeToggle.isVisible = false;
block->captions << "Pre-Defined" << "Custom";
block->widgetOrientation = Orient_Vertical;
block->isVisible = false;
//define a widget for each group in the toggle
for (int i = 0; i < 2; i++)
windowSizeToggle.widgets << new WidgetDef (Widget_RadioButton);
block->widgets << new WidgetDef (Widget_RadioButton);
windowSizeToggle.widgets.at(0)->isDefault = false;
block->widgets.at(0)->isDefault = false;
windowSize.blockDefList << &windowSizeToggle << &definedWindowSize << &customWindowSize;
windowSize.defaultValue = "Custom";
return block;
}
CSVSettings::CustomBlockDef *CSVSettings::WindowPage::buildWindowSize(GroupBlockDef *toggle_def,
GroupBlockDef *defined_def,
GroupBlockDef *custom_def)
{
CustomBlockDef *block = new CustomBlockDef(QString ("Window Size"));
QGridLayout *pageLayout = new QGridLayout(this);
block->blockDefList << toggle_def << defined_def << custom_def;
block->defaultValue = "Custom";
setLayout (pageLayout);
return block;
}
void CSVSettings::WindowPage::setupUi()
{
CustomBlockDef *windowSize = buildWindowSize(buildWindowSizeToggle(),
buildDefinedWindowSize(),
buildCustomWindowSize()
);
mAbstractBlocks << buildBlock<ToggleBlock> (windowSize);
@ -102,8 +125,15 @@ void CSVSettings::WindowPage::setupUi()
connect (block, SIGNAL (signalUpdateSetting (const QString &, const QString &)),
this, SIGNAL (signalUpdateEditorSetting (const QString &, const QString &)) );
}
connect ( this,
SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)),
&(CSMSettings::UserSettings::instance()),
SIGNAL ( signalUpdateEditorSetting (const QString &, const QString &)));
}
void CSVSettings::WindowPage::initializeWidgets (const CSMSettings::SettingMap &settings)
{
//iterate each item in each blocks in this section

@ -21,6 +21,12 @@ namespace CSVSettings {
void setupUi();
void initializeWidgets (const CSMSettings::SettingMap &settings);
///
GroupBlockDef *buildCustomWindowSize();
GroupBlockDef *buildDefinedWindowSize();
GroupBlockDef *buildWindowSizeToggle();
CustomBlockDef *buildWindowSize (GroupBlockDef *, GroupBlockDef *, GroupBlockDef *);
signals:
void signalUpdateEditorSetting (const QString &settingName, const QString &settingValue);
};

@ -0,0 +1,122 @@
#include "recordstatusdelegate.hpp"
#include <QPainter>
#include <QApplication>
#include <QUndoStack>
#include "../../model/settings/usersettings.hpp"
CSVWorld::RecordStatusDelegate::RecordStatusDelegate(QUndoStack &undoStack, QObject *parent)
: CommandDelegate (undoStack, parent)
{
mModifiedIcon = new QIcon (":./modified.png");
mAddedIcon = new QIcon (":./added.png");
mDeletedIcon = new QIcon (":./removed.png");
mBaseIcon = new QIcon (":./base.png");
mIconSize = 16;
//Offset values are most likely device-dependent.
//Need to replace with device-independent references.
mTextLeftOffset = 3;
mIconTopOffset = -3;
mStatusDisplay = 0; //icons and text by default. Remove when implemented as a user preference
mFont = QApplication::font();
mFont.setPointSize(10);
mFontMetrics = new QFontMetrics(mFont);
mTextAlignment.setAlignment (Qt::AlignLeft | Qt::AlignVCenter );
}
void CSVWorld::RecordStatusDelegate::paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
painter->save();
QString text = "";
QIcon *icon = 0;
switch (index.data().toInt())
{
case 0: // State_BaseOnly
text = "Base";
icon = mBaseIcon;
break;
case 1: // State_Modified
text = "Modified";
icon = mModifiedIcon;
break;
case 2: // State_Modified_Only
text = "Added";
icon = mAddedIcon;
break;
case 3: // State_Deleted
case 4: // State_Erased
text = "Deleted";
icon = mDeletedIcon;
break;
default:
break;
}
QRect textRect = option.rect;
QRect iconRect = option.rect;
//for icon-only (1), default option.rect centers icon left-to-right
//otherwise, size option.rect to fit the icon, forcing left-alignment with text
iconRect.setTop (iconRect.top() + mIconTopOffset);
iconRect.setBottom (iconRect.top() + mIconSize);
if (mStatusDisplay == 0 && (icon) )
{
iconRect.setRight (iconRect.left()+ mIconSize*2);
textRect.setLeft (iconRect.right() + mTextLeftOffset *1.25);
}
else
textRect.setLeft (textRect.left() + mTextLeftOffset );
if ( (mStatusDisplay == 0 || mStatusDisplay == 1) && (icon) )
painter->drawPixmap(iconRect.center().x()-10,iconRect.center().y()+2, icon->pixmap(mIconSize, mIconSize));
// icon + text or text only, or force text if no icon exists for status
if (mStatusDisplay == 0 || mStatusDisplay == 2 || !(icon) )
{
painter->setFont(mFont);
painter->drawText(textRect, text, mTextAlignment);
}
painter->restore();
}
QSize CSVWorld::RecordStatusDelegate::sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
{
return QSize();
}
CSVWorld::CommandDelegate *CSVWorld::RecordStatusDelegateFactory::makeDelegate (QUndoStack& undoStack,
QObject *parent) const
{
return new RecordStatusDelegate (undoStack, parent);
}
void CSVWorld::RecordStatusDelegate::updateEditorSetting (const QString &settingName, const QString &settingValue)
{
if (settingName == "Record Status Display")
{
if (settingValue == "Icon and Text")
mStatusDisplay = 0;
else if (settingValue == "Icon Only")
mStatusDisplay = 1;
else if (settingValue == "Text Only")
mStatusDisplay = 2;
else
mStatusDisplay = 0;
}
}

@ -0,0 +1,53 @@
#ifndef RECORDSTATUSDELEGATE_H
#define RECORDSTATUSDELEGATE_H
#include "util.hpp"
#include <QTextOption>
#include <QFont>
class QIcon;
class QFont;
class QFontMetrics;
namespace CSVWorld
{
class RecordStatusDelegate : public CommandDelegate
{
QFont mFont;
QFontMetrics *mFontMetrics;
QTextOption mTextAlignment;
QIcon *mModifiedIcon;
QIcon *mAddedIcon;
QIcon *mDeletedIcon;
QIcon *mBaseIcon;
int mStatusDisplay;
int mIconSize;
int mIconTopOffset;
int mTextLeftOffset;
public:
explicit RecordStatusDelegate(QUndoStack& undoStack, QObject *parent = 0);
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const;
void updateEditorSetting (const QString &settingName, const QString &settingValue);
};
class RecordStatusDelegateFactory : public CommandDelegateFactory
{
public:
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
///< The ownership of the returned CommandDelegate is transferred to the caller.
};
}
#endif // RECORDSTATUSDELEGATE_H

@ -12,6 +12,7 @@
#include "../../model/world/idtableproxymodel.hpp"
#include "../../model/world/idtable.hpp"
#include "../../model/world/record.hpp"
#include "recordstatusdelegate.hpp"
#include "util.hpp"
@ -80,7 +81,7 @@ std::vector<std::string> CSVWorld::Table::listDeletableSelectedIds() const
CSVWorld::Table::Table (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack,
bool createAndDelete)
: mUndoStack (undoStack), mCreateAction (0), mEditLock (false)
: mUndoStack (undoStack), mCreateAction (0), mEditLock (false), mRecordStatusDisplay (0)
{
mModel = &dynamic_cast<CSMWorld::IdTable&> (*data.getTableModel (id));
@ -161,6 +162,7 @@ void CSVWorld::Table::createRecord()
mUndoStack.push (new CSMWorld::CreateCommand (*mProxyModel, stream.str()));
}
}
void CSVWorld::Table::revertRecord()
@ -201,4 +203,13 @@ void CSVWorld::Table::deleteRecord()
mUndoStack.endMacro();
}
}
}
}
void CSVWorld::Table::updateEditorSetting (const QString &settingName, const QString &settingValue)
{
if (settingName == "Record Status Display")
{
dynamic_cast<CSVWorld::RecordStatusDelegate *>(this->itemDelegateForColumn(1))->updateEditorSetting (settingName, settingValue);
emit dataChanged(mModel->index(0,1), mModel->index(mModel->rowCount()-1, 1));
}
}

@ -34,6 +34,7 @@ namespace CSVWorld
CSMWorld::IdTableProxyModel *mProxyModel;
CSMWorld::IdTable *mModel;
bool mEditLock;
int mRecordStatusDisplay;
private:
@ -52,6 +53,8 @@ namespace CSVWorld
CSMWorld::UniversalId getUniversalId (int row) const;
void updateEditorSetting (const QString &settingName, const QString &settingValue);
private slots:
void createRecord();

@ -22,4 +22,11 @@ void CSVWorld::TableSubView::setEditLock (bool locked)
void CSVWorld::TableSubView::rowActivated (const QModelIndex& index)
{
focusId (mTable->getUniversalId (index.row()));
}
}
void CSVWorld::TableSubView::updateEditorSetting(const QString &settingName, const QString &settingValue)
{
if (settingName == "Record Status Display")
mTable->updateEditorSetting(settingName, settingValue);
}

@ -23,8 +23,8 @@ namespace CSVWorld
public:
TableSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document, bool createAndDelete);
virtual void setEditLock (bool locked);
void updateEditorSetting (const QString &, const QString &);
private slots:
@ -32,4 +32,4 @@ namespace CSVWorld
};
}
#endif
#endif

@ -82,6 +82,8 @@ namespace CSVWorld
///< \brief Use commands instead of manipulating the model directly
class CommandDelegate : public QStyledItemDelegate
{
Q_OBJECT
QUndoStack& mUndoStack;
bool mEditLock;
@ -105,6 +107,10 @@ namespace CSVWorld
void setEditLock (bool locked);
bool isEditLocked() const;
private slots:
virtual void slotUpdateEditorSetting (const QString &settingName, const QString &settingValue) {}
};
}

@ -2,7 +2,6 @@
#include <QTextCodec>
#include <QFileInfo>
#include <QDir>
#include <QDebug>
#include <stdexcept>
@ -12,6 +11,8 @@
#include "datafilesmodel.hpp"
#include <QDebug>
DataFilesModel::DataFilesModel(QObject *parent) :
QAbstractTableModel(parent)
{

@ -0,0 +1,5 @@
[Editor]
Record Status Display = Icon and Text
[Window Size]
Width = 640
Height = 480

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,5 +1,9 @@
<RCC>
<qresource prefix="/">
<file>opencs.png</file>
<file>added.png</file>
<file>modified.png</file>
<file>removed.png</file>
<file>base.png</file>
</qresource>
</RCC>

@ -0,0 +1,569 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 11 Build 196, SVG Export Plug-In -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1000"
height="1000"
viewBox="0 0 321 368"
xml:space="preserve"
id="svg1468"
sodipodi:version="0.32"
inkscape:version="0.48.4 r9939"
sodipodi:docname="Tango-Palette.svg"
inkscape:export-filename="/home/jimmac/gfx/ximian/tango-art-tools/palettes/Tango-Palette.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
version="1.0"><metadata
id="metadata1573">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Tango Palette</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Tuomas Kuosmanen</dc:title>
</cc:Agent>
</dc:creator>
<dc:contributor>
<cc:Agent>
<dc:title>Garrett Le Sage
Kenneth Wimer
Jakub Steiner</dc:title>
</cc:Agent>
</dc:contributor>
<dc:source>http://www.tango-project.org/files/Tango-Palette.svg</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>unify</rdf:li>
<rdf:li>global</rdf:li>
<rdf:li>theme</rdf:li>
<rdf:li>color</rdf:li>
<rdf:li>palette</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://web.resource.org/cc/PublicDomain" />
</cc:Work>
<cc:License
rdf:about="http://web.resource.org/cc/PublicDomain"><cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" /><cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" /><cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" /></cc:License></rdf:RDF>
</metadata>
<sodipodi:namedview
fill="#788600"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.15294118"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:window-width="910"
inkscape:window-height="972"
inkscape:cy="742.44911"
inkscape:cx="620.6461"
inkscape:zoom="0.35355339"
inkscape:window-x="366"
inkscape:window-y="30"
inkscape:current-layer="layer1"
inkscape:showpageshadow="false"
showgrid="false"
inkscape:window-maximized="0" />
<style
type="text/css"
id="style1470">
@font-face{font-family:'TrebuchetMS-Bold';src:url(&quot;data:;base64,\
T1RUTwADACAAAQAQQ0ZGINnFGF0AAADAAAAFYUdQT1OwB73vAAAGJAAAAGZjbWFwAtwCtwAAADwA\
AACEAAAAAQAAAAMAAAAMAAQAeAAAABoAEAADAAoAIABDAFAAVQBhAGYAaQBsAG8AcgB0AHn//wAA\
ACAAQwBQAFUAYQBlAGkAbABuAHIAdAB5////4f+//7P/r/+k/6H/n/+d/5z/mv+Z/5UAAQAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAEAgABAQERVHJlYnVjaGV0TVMtQm9sZAABAQE7+BsMAPgU\
BPgcDBX7Yvy8HAgUHAfYBR6gAEiCgSX/i4seoABIgoEl/4uLDAf3Pw/3XBD3XhGRHAVbEgACAQE/\
TENvcHlyaWdodCAoYykgMTk5NiBNaWNyb3NvZnQgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVz\
ZXJ2ZWQuL0ZTVHlwZSA4IGRlZgAAAAABACQAMQA2AEIARgBHAEoATQBPAFAAUwBVAFoAAAAPAgAB\
ABsAHgCXAPEBPgHaAlICmwLlAwgDTQO+A+8EN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quot;)}
</style>
<defs
id="defs1472">
</defs>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="hex triplets">
<rect
style="fill:#caf8f6;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1"
id="rect4206"
width="98.624001"
height="76.543999"
x="118.06892"
y="13.81922" /><rect
y="169.48727"
x="208.23248"
height="76.543999"
width="98.624001"
id="rect4716"
style="fill:#232323;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1" /><rect
y="240.53598"
x="149.55435"
height="76.543999"
width="98.624001"
id="rect4718"
style="fill:#5a0048;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1" /><rect
style="fill:#fa00c8;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1"
id="rect4720"
width="98.624001"
height="76.543999"
x="44.432781"
y="233.90982" /><rect
y="162.37894"
x="103.90397"
height="76.543999"
width="98.624001"
id="rect5770"
style="fill:#b3bbad;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1" /><rect
style="fill:#000e50;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1"
id="rect5772"
width="98.624001"
height="76.543999"
x="222.55765"
y="18.913427" /><rect
style="fill:#fcd63f;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1"
id="rect6787"
width="98.624001"
height="76.543999"
x="60.010452"
y="84.591927" /><rect
y="243.20786"
x="248.97467"
height="76.543999"
width="98.624001"
id="rect6789"
style="fill:#ffcb80;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1" /><rect
y="91.347267"
x="164.42346"
height="76.543999"
width="98.624001"
id="rect7822"
style="fill:#d07200;fill-opacity:1;stroke:#232323;stroke-width:0.368;stroke-opacity:1" /></g></svg>

After

Width:  |  Height:  |  Size: 12 KiB

@ -0,0 +1,5 @@
[Dolphin]
PreviewsShown=true
Timestamp=2013,3,21,10,19,49
Version=3
ViewMode=1

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 47 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 33 KiB

@ -0,0 +1,687 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="book.svg">
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="8.0000002"
inkscape:cx="52.294682"
inkscape:cy="4.9257181"
inkscape:document-units="px"
inkscape:current-layer="g3891"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1280"
inkscape:window-height="1001"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="1"
inkscape:snap-page="true"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-intersection-paths="false"
inkscape:object-nodes="true"
inkscape:snap-global="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-grids="false" />
<defs
id="defs4">
<linearGradient
id="linearGradient3902"
inkscape:collect="always">
<stop
id="stop3904"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop3906"
offset="1"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3886"
inkscape:collect="always">
<stop
id="stop3888"
offset="0"
style="stop-color:#fff226;stop-opacity:1;" />
<stop
id="stop3890"
offset="1"
style="stop-color:#fff226;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient9248">
<stop
id="stop9250"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop9252"
offset="1"
style="stop-color:#b4b4b4;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient8521">
<stop
id="stop8523"
offset="0"
style="stop-color:#00105d;stop-opacity:1;" />
<stop
id="stop8525"
offset="1"
style="stop-color:#00105d;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient7487">
<stop
style="stop-color:#000e50;stop-opacity:1;"
offset="0"
id="stop7489" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop7491" />
</linearGradient>
<linearGradient
id="linearGradient6034">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6036" />
<stop
style="stop-color:#b3bbad;stop-opacity:1;"
offset="1"
id="stop6038" />
</linearGradient>
<linearGradient
id="linearGradient6815">
<stop
id="stop6817"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
style="stop-color:#3c3c3c;stop-opacity:0.58823532;"
offset="0.40229002"
id="stop6825" />
<stop
id="stop6819"
offset="1"
style="stop-color:#3c3c3c;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient4022">
<stop
id="stop4024"
offset="0"
style="stop-color:#204a87;stop-opacity:1;" />
<stop
id="stop4026"
offset="1"
style="stop-color:#729fcf;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3723">
<stop
id="stop3725"
offset="0"
style="stop-color:#ffffff;stop-opacity:0.78431374;" />
<stop
id="stop3727"
offset="1"
style="stop-color:#ffffff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3715">
<stop
id="stop3717"
offset="0"
style="stop-color:#99bbd4;stop-opacity:1;" />
<stop
id="stop3719"
offset="1"
style="stop-color:#5d93ba;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient3707">
<stop
id="stop3709"
offset="0"
style="stop-color:#a6c4d9;stop-opacity:0.78431374;" />
<stop
id="stop3711"
offset="1"
style="stop-color:#75a3c3;stop-opacity:1;" />
</linearGradient>
<inkscape:perspective
id="perspective10"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 526.18109 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
id="perspective2920" />
<linearGradient
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
id="linearGradient3713"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
gradientTransform="translate(0.2341196,6.0908086)"
gradientUnits="userSpaceOnUse"
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
id="linearGradient3721"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
id="linearGradient3729"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
gradientTransform="translate(0.2341196,6.0908086)"
gradientUnits="userSpaceOnUse"
id="linearGradient3735"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
id="linearGradient3737"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
gradientTransform="translate(0.2341189,5.74082)"
gradientUnits="userSpaceOnUse"
id="linearGradient3739"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3742"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3744"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965567,-0.75665045)"
gradientUnits="userSpaceOnUse"
id="linearGradient3747"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
y2="983.41931"
x2="63.765881"
y1="936.95227"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965567,-0.75665045)"
gradientUnits="userSpaceOnUse"
id="linearGradient3753"
xlink:href="#linearGradient3715"
inkscape:collect="always" />
<linearGradient
y2="1029.8864"
x2="63.765881"
y1="949.3266"
x1="63.765881"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3755"
xlink:href="#linearGradient3707"
inkscape:collect="always" />
<linearGradient
y2="1030.7611"
x2="37.375645"
y1="948.8266"
x1="37.375645"
gradientTransform="matrix(1.0066488,0,0,1.0066488,0.21965498,-1.1089658)"
gradientUnits="userSpaceOnUse"
id="linearGradient3757"
xlink:href="#linearGradient3723"
inkscape:collect="always" />
<linearGradient
gradientTransform="matrix(0.91716429,0,0,0.91716429,2.2512556,85.18512)"
gradientUnits="userSpaceOnUse"
y2="1008.9376"
x2="47.902649"
y1="1048.3364"
x1="14.991861"
id="linearGradient4028"
xlink:href="#linearGradient4022"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3818"
id="linearGradient5433"
x1="-14.939182"
y1="166.73387"
x2="-15.495684"
y2="164.65698"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.71906912,0,0,0.71906912,35.096859,924.87424)" />
<linearGradient
id="linearGradient3818">
<stop
style="stop-color:#1e1e1e;stop-opacity:1;"
offset="0"
id="stop3820" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop3822" />
</linearGradient>
<linearGradient
id="linearGradient3715-2">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3717-4" />
<stop
style="stop-color:#b3bbad;stop-opacity:1;"
offset="1"
id="stop3719-9" />
</linearGradient>
<linearGradient
id="linearGradient5299">
<stop
style="stop-color:#000e50;stop-opacity:1;"
offset="0"
id="stop5301" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop5303" />
</linearGradient>
<radialGradient
r="29.000444"
fy="119.59179"
fx="-172.875"
cy="119.59179"
cx="-172.875"
gradientTransform="matrix(1.0541003,0.65674043,-0.42405323,0.68062603,240.54684,45.0811)"
gradientUnits="userSpaceOnUse"
id="radialGradient6812"
xlink:href="#linearGradient3715-2"
inkscape:collect="always" />
<linearGradient
y2="965.56183"
x2="63.765881"
y1="941.44623"
x1="63.765881"
gradientTransform="matrix(0.37749331,0,0,0.37749331,-0.0711918,657.55701)"
gradientUnits="userSpaceOnUse"
id="linearGradient2843"
xlink:href="#linearGradient3715-6"
inkscape:collect="always" />
<linearGradient
id="linearGradient3715-6">
<stop
id="stop3717-6"
offset="0"
style="stop-color:#99bbd4;stop-opacity:1;" />
<stop
id="stop3719-4"
offset="1"
style="stop-color:#5d93ba;stop-opacity:1;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3715-6"
id="linearGradient3184"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.37749331,0,0,0.37749331,4.1838142,536.26868)"
x1="63.765881"
y1="941.44623"
x2="63.765881"
y2="965.56183" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3715-6"
id="linearGradient3321"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.28231332,0,0,0.28231332,64.982195,664.15172)"
x1="63.765881"
y1="941.44623"
x2="63.765881"
y2="965.56183" />
<linearGradient
id="linearGradient6815-6">
<stop
id="stop6817-4"
offset="0"
style="stop-color:#000000;stop-opacity:1;" />
<stop
style="stop-color:#3c3c3c;stop-opacity:0.58823532;"
offset="0.40229002"
id="stop6825-9" />
<stop
id="stop6819-5"
offset="1"
style="stop-color:#3c3c3c;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3715-2-4">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3717-4-8" />
<stop
style="stop-color:#b3bbad;stop-opacity:1;"
offset="1"
id="stop3719-9-7" />
</linearGradient>
<radialGradient
r="28.421875"
fy="116.19179"
fx="-182.4375"
cy="116.19179"
cx="-182.4375"
gradientTransform="matrix(0.30667246,1.5835715,-1.396495,0.27044345,218.94267,1272.3725)"
gradientUnits="userSpaceOnUse"
id="radialGradient5641-1"
xlink:href="#linearGradient5299-7"
inkscape:collect="always" />
<linearGradient
id="linearGradient5299-7">
<stop
style="stop-color:#000e50;stop-opacity:1;"
offset="0"
id="stop5301-2" />
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="1"
id="stop5303-7" />
</linearGradient>
<linearGradient
y2="350.56357"
x2="518.24652"
y1="536.11566"
x1="553.62225"
gradientTransform="translate(-26.263966,56.568543)"
gradientUnits="userSpaceOnUse"
id="linearGradient4078-954"
xlink:href="#linearGradient3955-87-471"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
id="linearGradient3955-87-471">
<stop
style="stop-color:#436123;stop-opacity:1"
offset="0"
id="stop4122" />
<stop
id="stop4124"
offset="0.04243463"
style="stop-color:#74984d;stop-opacity:1;" />
<stop
style="stop-color:#74984d;stop-opacity:1"
offset="1"
id="stop4126" />
</linearGradient>
<pattern
patternUnits="userSpaceOnUse"
width="2"
height="1"
patternTransform="matrix(0,4.4721359,-4.4721359,0,-50.004131,-3.0322266e-6)"
id="Strips1_1"
inkscape:stockid="Stripes 1:1">
<rect
style="fill:black;stroke:none"
x="0"
y="-0.5"
width="1"
height="2"
id="rect3917" />
</pattern>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6034"
id="linearGradient6042"
gradientUnits="userSpaceOnUse"
x1="-2256.6802"
y1="1067.036"
x2="37.487514"
y2="2532.4438"
gradientTransform="translate(-1.6900304,-2.3597835)" />
<linearGradient
y2="2444.7776"
x2="-2151.6707"
y1="2903.8035"
x1="-2148.2864"
gradientUnits="userSpaceOnUse"
id="linearGradient8509"
xlink:href="#linearGradient7487"
inkscape:collect="always"
gradientTransform="translate(-1.6900304,-2.3597835)" />
<linearGradient
gradientUnits="userSpaceOnUse"
y2="3353.4497"
x2="-1962.6486"
y1="2540.8635"
x1="-1962.6486"
id="linearGradient8527"
xlink:href="#linearGradient7487"
inkscape:collect="always" />
<linearGradient
spreadMethod="reflect"
gradientUnits="userSpaceOnUse"
y2="2914.2673"
x2="-115.04873"
y1="2899.3862"
x1="-115.04873"
id="linearGradient9254"
xlink:href="#linearGradient9248"
inkscape:collect="always"
gradientTransform="translate(-1.6900304,-2.3597835)" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.60717495,0,6.6355278)"
r="3.1054714"
fy="16.891813"
fx="29.111721"
cy="16.891813"
cx="29.111721"
id="radialGradient3892"
xlink:href="#linearGradient3886"
inkscape:collect="always" />
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.1494315,0.36121083,-0.30519899,1.8161266,2.9871553,-34.404392)"
r="15.46875"
fy="32.971859"
fx="13.599908"
cy="32.971859"
cx="13.599908"
id="radialGradient3908"
xlink:href="#linearGradient3902"
inkscape:collect="always" />
<inkscape:path-effect
fuse_tolerance="0"
vertical_pattern="false"
prop_units="false"
tang_offset="0"
normal_offset="0"
spacing="0"
scale_y_rel="false"
prop_scale="1"
copytype="single_stretched"
pattern="m 1273.479,-26681.071 0,10 10,-5 z"
is_visible="true"
id="path-effect4754"
effect="skeletal" />
<inkscape:path-effect
effect="skeletal"
id="path-effect4760"
is_visible="true"
pattern="m 1315.479,-26621.071 0,10 10,-5 z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
<inkscape:path-effect
effect="skeletal"
id="path-effect2991"
is_visible="true"
pattern="m 595.66194,-26736.611 0,10 10,-5 z"
copytype="single_stretched"
prop_scale="1"
scale_y_rel="false"
spacing="0"
normal_offset="0"
tang_offset="0"
prop_units="false"
vertical_pattern="false"
fuse_tolerance="0" />
</defs>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-1004.3622)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Livello 1">
<g
id="g3891"
transform="matrix(0.02092262,0,0,0.02092262,47.215663,982.03701)">
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
d="m -2205.1104,2996.825 49.0856,-84.9175 c -95.8266,-280.635 -2.1625,-466.3113 -2.1625,-466.3113 l -46.9231,86.3481 c 0,0 -95.8266,184.2457 0,464.8807 z"
id="path3189"
style="fill:url(#linearGradient8509);fill-opacity:1;fill-rule:evenodd;stroke:#232323;stroke-width:9.55903244;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
style="fill:#000e50;fill-opacity:1;fill-rule:evenodd;stroke:#232323;stroke-width:14.33854866;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path8511"
d="m -2205.1104,2996.825 2231.227886,0 -638.116266,-1105.2497 -954.23512,0 -638.8765,1105.2497 z"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
d="m -2156.0248,2911.9075 c -95.8267,-280.6349 -2.1624,-462.8889 -2.1624,-462.8889 l 2041.44844,1.7112 0,460.31 z"
id="path4652"
style="fill:url(#linearGradient9254);fill-opacity:1;fill-rule:evenodd;stroke:#232323;stroke-width:14.33854866;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
d="m -2205.1104,2531.9443 2231.227846,0 -638.116256,-1105.2497 -954.23509,0 -638.8765,1105.2497 z"
id="path2415"
style="fill:url(#linearGradient6042);fill-opacity:1;fill-rule:evenodd;stroke:#232323;stroke-width:14.33854866;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<g
transform="matrix(22.19212,0,0,22.19212,-1374.3504,1553.9394)"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#5a0048;fill-opacity:1;stroke:#000000;stroke-width:0.64610988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Sans"
id="text7930">
<path
d="m -9.9483287,3.3515314 c 0.502131,-0.032483 1.2334738,-0.025076 1.7206493,-0.032648 1.1695202,0.011845 2.0464005,0.1084151 3.0507321,0.1185805 2.9493189,0.029852 5.57811129,-0.6462625 6.13605785,-2.3885307 0.42249075,-1.31928818 -0.89007164,-1.79067597 -3.09735305,-1.81374225 0,0 0.012685,-0.0299781 0.012685,-0.0299781 C -0.59087915,-1.126304 0.71093478,-1.5016854 0.97402754,-2.2519624 1.2137294,-2.9355342 0.5343313,-3.5167955 -1.6358041,-3.471392 c -1.1793884,0.030419 -1.7591718,0.075979 -2.9564485,0.063225 -0.329724,-0.00351 -1.1183709,-0.029182 -1.4479812,-0.032694 0,0 -0.032178,0.025566 -0.032178,0.025566 0.3319588,0.186026 0.2270562,0.4668657 0.072154,0.7429275 0,0 -2.77776,4.9504224 -2.77776,4.9504224 -0.2071667,0.3692049 -0.5012792,0.7446644 -1.1834494,1.0232682 0,0 0.013139,0.050208 0.013139,0.050208 m 6.1536048,-3.82970524 c 2.1257227,-0.008457 3.19056282,0.33193308 2.7268173,1.57271104 -0.4655547,1.2456182 -2.148481,1.9159431 -4.4275521,1.8560024 -0.5788187,-0.00588 -1.13344,-0.060472 -1.6474964,-0.1510845 0,0 1.6559969,-3.23385804 1.6559969,-3.23385804 0.5155975,-0.004876 1.1022734,-0.0397016 1.6922343,-0.0437709 M -4.1453579,-3.054302 c 0.4952078,-0.038774 1.1548089,-0.093216 1.7355118,-0.095801 1.3385837,-0.012015 1.94525982,0.2676829 1.6965154,0.8895237 -0.3027573,0.8953473 -1.8288112,1.30169076 -3.5997134,1.44292756 -0.4874014,0.0350725 -0.8134777,0.23386055 -1.1739141,0.3832489 0,0 1.3416003,-2.61989906 1.3416003,-2.61989906"
style="font-variant:normal;font-stretch:normal;fill:#5a0048;fill-opacity:1;stroke:#000000;stroke-width:0.64610988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Apolonia;-inkscape-font-specification:Apolonia"
id="path7935"
inkscape:connector-curvature="0" />
<path
d="M 8.3160092,-1.5844315 C 5.8331387,-1.5724091 3.9816949,-0.75098647 3.5687494,0.88874049 3.1130925,2.6980661 4.6796944,3.6504397 7.6152315,3.6549184 10.587566,3.6598124 12.401697,2.5654724 12.428244,0.79509868 12.452935,-0.85153854 10.865776,-1.6051517 8.3160092,-1.5844315 m -0.037187,0.2780244 C 9.8584867,-1.318823 10.756032,-0.41807786 10.680129,0.80956304 10.598162,2.1352847 9.4064313,3.2987265 7.5806321,3.2925725 5.8754735,3.3000367 5.0663857,2.1720625 5.3321619,0.87412899 5.5806824,-0.33953513 6.7328869,-1.2935821 8.2788227,-1.3064071"
style="font-variant:normal;font-stretch:normal;fill:#5a0048;fill-opacity:1;stroke:#000000;stroke-width:0.64610988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Apolonia;-inkscape-font-specification:Apolonia"
id="path7937"
inkscape:connector-curvature="0" />
<path
d="m 18.578388,-1.4764483 c -2.467731,0.012151 -4.069704,0.83551072 -4.000021,2.4788775 0.07688,1.8131989 1.915129,2.7674802 4.837896,2.7718529 2.959515,0.00479 4.444405,-1.0918926 3.95223,-2.86605365 C 22.910682,-0.74205982 21.110158,-1.49732 18.578388,-1.4764483 m 0.04447,0.2786599 c 1.568628,-0.012508 2.725891,0.8902308 3.010029,2.12058282 C 21.939705,2.2513665 21.094518,3.4172876 19.275657,3.4111928 17.580851,3.4187395 16.44505,2.2884416 16.329146,0.98771526 16.220761,-0.2286302 17.087919,-1.1848713 18.622854,-1.1977884"
style="font-variant:normal;font-stretch:normal;fill:#5a0048;fill-opacity:1;stroke:#000000;stroke-width:0.64610988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Apolonia;-inkscape-font-specification:Apolonia"
id="path7939"
inkscape:connector-curvature="0" />
<path
d="M 36.179516,3.7686534 C 35.424775,3.5626503 34.6437,2.8518432 34.030143,2.3518883 33.46376,1.887341 32.936046,1.4450023 32.207796,1.0863901 31.566579,0.76716017 30.69279,0.61965923 29.567457,0.57618475 c 0,0 -0.0095,-0.0212721 -0.0095,-0.0212721 0.876969,-0.35751599 1.49946,-0.65950878 1.991498,-0.93760042 0.505466,-0.30314386 0.858842,-0.56377695 1.130926,-0.85960563 0,0 -0.02679,-0.047984 -0.02679,-0.047984 -0.513151,0.051863 -1.235282,0.053832 -1.853595,0.047331 0.112408,0.2225716 0.0052,0.44565489 -0.214532,0.67043333 -0.555149,0.54920693 -1.896311,1.05503487 -2.610379,1.31316668 0,0 -1.639791,-4.07585061 -1.639791,-4.07585061 -0.706809,0.02643 -1.480805,0.06074 -2.213886,0.069979 0,0 0.0086,0.025714 0.0086,0.025714 0.546257,0.091514 0.868435,0.3198242 0.956585,0.5663651 0,0 1.930611,5.3996161 1.930611,5.3996161 0.146495,0.4097224 0.126645,0.6413886 -0.220162,0.947148 0,0 0.05882,0.050528 0.05882,0.050528 0.880484,-0.028544 1.919216,-0.018025 2.827986,0.028632 0,0 0.02074,-0.049711 0.02074,-0.049711 -0.561764,-0.3149136 -0.758443,-0.5487459 -0.923335,-0.9585994 0,0 -0.801851,-1.99307414 -0.801851,-1.99307414 0.972234,-0.0113261 2.278288,0.20643848 3.039091,0.67383964 0.580223,0.352485 1.003169,0.7327502 1.440406,1.132377 0.446295,0.4079049 0.966618,0.9108648 1.485371,1.2383027 0.609802,-0.018793 1.281024,-0.03693 2.201842,0.022292 0,0 0.03341,-0.049558 0.03341,-0.049558"
style="font-variant:normal;font-stretch:normal;fill:#5a0048;fill-opacity:1;stroke:#000000;stroke-width:0.64610988;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Apolonia;-inkscape-font-specification:Apolonia"
id="path7941"
inkscape:connector-curvature="0" />
</g>
<path
style="fill:none;stroke:#b3b3b3;stroke-width:0.15362099px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -1163.8471,2265.385 c -5.4387,6.3038 -5.8955,15.8907 2.894,19.4065 7.8828,3.1531 14.2275,-15.2718 2.5535,-21.1088 -1.5632,-0.7816 -1.5686,2.8209 -1.1916,3.5749 2.0776,4.1553 7.1286,1.66 9.533,6.4688 0.304,0.6079 2.7606,7.32 2.5535,7.32 -3.4046,0 4.1451,-11.3758 8.1711,-9.3628 5.2834,2.6416 2.5792,13.1022 11.7461,11.0651 5.973,-1.3273 5.575,-15.2996 0.5107,-12.7674 -5.298,2.6489 0.072,9.2918 3.5748,10.7246 2.9815,1.2197 7.345,1.0214 9.8736,1.0214"
id="path4797"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 44 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 46 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save