tree changes

This commit is contained in:
2020-08-19 00:47:44 +03:00
parent 4b7c513f7f
commit 3e1768b418
355 changed files with 4116 additions and 4316 deletions

View File

@@ -1 +0,0 @@
qad_project(utils "Gui;Widgets" "")

View File

@@ -0,0 +1,42 @@
project(blockeditor)
import_version(${PROJECT_NAME} QAD)
find_qt(${QtVersions} Core Gui Widgets)
if (Qt5_FOUND)
import_version(${PROJECT_NAME}5 ${PROJECT_NAME})
import_deploy_properties(${PROJECT_NAME}5 ${PROJECT_NAME})
endif()
set_deploy_property(${PROJECT_NAME}
LABEL ${PROJECT_NAME}
FULLNAME "${_QAD_DOMAIN}.${PROJECT_NAME}"
COMPANY ${_QAD_COMPANY}
INFO "Editor for BlockView Blocks")
if(APPLE)
#set_deploy_property(${PROJECT_NAME} ICON "icons/blockview.icns")
elseif(WIN32)
set_deploy_property(${PROJECT_NAME} ICON "icons/blockview.ico")
else()
set_deploy_property(${PROJECT_NAME} ICON "icons/blockview.png")
endif()
make_rc(${PROJECT_NAME} out_RC)
qt_sources(SRC)
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP ${out_RC})
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qad_blockview)
message(STATUS "Building ${PROJECT_NAME}")
if(LIB)
if(WIN32)
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
else()
if (DEFINED ANDROID_PLATFORM)
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/bin)
else()
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
endif()
endif()
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
endif()
if (Qt5_FOUND)
deploy_target(${PROJECT_NAME}5 VERBOSE DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/../release)
endif()

View File

@@ -0,0 +1,16 @@
#include <QApplication>
#include "blockeditor.h"
int main(int argc, char * argv[]) {
QApplication a(argc, argv);
#if QT_VERSION >= 0x050000
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#endif
a.setWindowIcon(QIcon(":/icons/blockview.png"));
BlockEditor w;
if (a.arguments().size() > 1)
w.loadFile(a.arguments().back());
w.show();
return a.exec();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -1,113 +0,0 @@
#include "chunkstream.h"
void ChunkStream::setSource(const QByteArray & data) {
stream_.setVersion(QDataStream::Qt_4_8);
data_ = const_cast<QByteArray*>(&data);
_init();
}
void ChunkStream::setSource(QByteArray * data) {
stream_.setVersion(QDataStream::Qt_4_8);
data_ = (data ? data : &tmp_data);
_init();
}
void ChunkStream::setSource(QDataStream & str) {
stream_.setVersion(QDataStream::Qt_4_8);
str >> tmp_data;
data_ = &tmp_data;
_init();
}
int ChunkStream::read() {
switch (version_) {
case Version_1:
stream_ >> last_id >> last_data;
break;
case Version_2:
last_id = readVInt(stream_);
last_data.resize(readVInt(stream_));
//piCout << last_id << last_data.size();
stream_.readRawData(last_data.data(), last_data.size());
break;
default: break;
}
return last_id;
}
void ChunkStream::readAll() {
data_map.clear();
while (!atEnd()) {
read();
data_map[last_id] = last_data;
}
}
ChunkStream::~ChunkStream() {
}
void ChunkStream::_init() {
last_id = -1;
last_data.clear();
buffer.close();
buffer.setBuffer(data_);
buffer.open(QIODevice::ReadWrite);
stream_.setDevice(&buffer);
if (!data_->isEmpty()) {
uchar v = data_->at(0);
if ((v & 0x80) == 0x80) {
v &= 0x7f;
switch (v) {
case 2: version_ = (uchar)Version_2; stream_.skipRawData(1); break;
default: version_ = Version_1; break;
}
} else
version_ = Version_1;
}
}
uint ChunkStream::readVInt(QDataStream & s) {
if (s.atEnd()) return 0;
uchar bytes[4]; s >> bytes[0];
uchar abc = 0;
for (abc = 0; abc < 3; ++abc) {
uchar mask = (0x80 >> abc);
if ((bytes[0] & mask) == mask) {
//if (s.isEmpty()) return 0;
bytes[0] &= (mask - 1);
s >> bytes[abc + 1];
} else break;
}
uint ret = 0;
for (int i = 0; i <= abc; ++i) {
ret += (bytes[i] << (8 * ((int)abc - i)));
}
return ret;
}
void ChunkStream::writeVInt(QDataStream & s, uint val) {
if (val > 0xfffffff) return;
if (val <= 0x7f) {
s << uchar(val);
return;
}
if (val <= 0x3fff) {
s << uchar((val >> 8) | 0x80) << uchar(val & 0xff);
return;
}
if (val <= 0x1fffff) {
s << uchar((val >> 16) | 0xc0) << uchar((val >> 8) & 0xff) << uchar(val & 0xff);
return;
}
s << uchar((val >> 24) | 0xe0) << uchar((val >> 16) & 0xff) << uchar((val >> 8) & 0xff) << uchar(val & 0xff);
}

View File

@@ -1,143 +0,0 @@
/*
QAD - Qt ADvanced
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHUNKSTREAM_H
#define CHUNKSTREAM_H
#include <QDataStream>
#include <QBuffer>
#include <QByteArray>
#include <QMap>
#include "qad_export.h"
class QAD_EXPORT ChunkStream
{
public:
enum Version {
Version_1 /*! First, old version */,
Version_2 /*! Second, more optimized version */ = 2,
};
ChunkStream(const QByteArray & data): version_(Version_2) {setSource(data);}
ChunkStream(QDataStream & str): version_(Version_2) {setSource(str);}
ChunkStream(QByteArray * data = 0, Version v = Version_2): version_(v) {setSource(data);}
ChunkStream(Version v): version_(v) {setSource(0);}
~ChunkStream();
template <typename T>
struct Chunk {
Chunk(int i, const T & d): id(i), data(d) {}
int id;
T data;
};
template <typename T>
struct ChunkConst {
ChunkConst(int i, const T & d): id(i), data(d) {}
int id;
const T & data;
};
template <typename T> static ChunkConst<T> chunk(int id, const T & data) {return ChunkConst<T>(id, data);}
template <typename T> ChunkStream & add(int id, const T & data) {*this << ChunkConst<T>(id, data); return *this;}
void setSource(const QByteArray & data);
void setSource(QDataStream & str);
void setSource(QByteArray * data);
QDataStream & dataStream() {return stream_;}
QByteArray data() const {return tmp_data;}
bool atEnd() const {return stream_.atEnd();}
Version version() const {return (Version)version_;}
int read();
void readAll();
int getID() {return last_id;}
template <typename T>
T getData() const {T ret; QDataStream s(last_data); s.setVersion(QDataStream::Qt_4_8); s >> ret; return ret;}
template <typename T>
void get(T & v) const {v = getData<T>();}
template <typename T>
const ChunkStream & get(int id, T & v) const {
QByteArray ba = data_map.value(id);
if (!ba.isEmpty()) {
QDataStream s(ba); s.setVersion(QDataStream::Qt_4_8);
s >> v;
}
return *this;
}
private:
void _init();
static uint readVInt(QDataStream & s);
static void writeVInt(QDataStream & s, uint val);
int last_id;
uchar version_;
QByteArray * data_, last_data, tmp_data;
QBuffer buffer;
QDataStream stream_;
QMap<int, QByteArray> data_map;
template <typename T> friend ChunkStream & operator <<(ChunkStream & s, const ChunkStream::Chunk<T> & c);
template <typename T> friend ChunkStream & operator <<(ChunkStream & s, const ChunkStream::ChunkConst<T> & c);
};
template <typename T>
ChunkStream & operator <<(ChunkStream & s, const ChunkStream::Chunk<T> & c) {
QByteArray ba;
QDataStream bas(&ba, QIODevice::WriteOnly);
bas.setVersion(QDataStream::Qt_4_8);
bas << c.data;
switch (s.version_) {
case ChunkStream::Version_1:
s.stream_ << c.id << ba;
break;
case ChunkStream::Version_2:
if (s.data_->isEmpty())
s.stream_ << uchar(uchar(s.version_) | 0x80);
ChunkStream::writeVInt(s.stream_, c.id);
ChunkStream::writeVInt(s.stream_, ba.size());
s.stream_.writeRawData(ba.data(), ba.size());
break;
default: break;
}
return s;
}
template <typename T>
ChunkStream & operator <<(ChunkStream & s, const ChunkStream::ChunkConst<T> & c) {
QByteArray ba;
QDataStream bas(&ba, QIODevice::WriteOnly);
bas.setVersion(QDataStream::Qt_4_8);
bas << c.data;
switch (s.version_) {
case ChunkStream::Version_1:
s.stream_ << c.id << ba;
break;
case ChunkStream::Version_2:
if (s.data_->isEmpty())
s.stream_ << uchar(uchar(s.version_) | 0x80);
ChunkStream::writeVInt(s.stream_, c.id);
ChunkStream::writeVInt(s.stream_, ba.size());
s.stream_.writeRawData(ba.data(), ba.size());
break;
default: break;
}
return s;
}
#endif // CHUNKSTREAM_H

View File

@@ -1 +0,0 @@
qad_plugin(utils "Gui" "")

View File

@@ -1,16 +0,0 @@
//#include "qpiconfigplugin.h"
#include "qad_utils.h"
QADUtils::QADUtils(QObject * parent): QObject(parent) {
//m_widgets.append(new QPIConfigPlugin(this));
}
QList<QDesignerCustomWidgetInterface * > QADUtils::customWidgets() const {
return m_widgets;
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(qad_utils_plugin, QADUtils)
#endif

View File

@@ -1,24 +0,0 @@
#ifndef QAD_UTILS_H
#define QAD_UTILS_H
#include <QtDesigner/QtDesigner>
#include <QtCore/qplugin.h>
class QADUtils: public QObject, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
//Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "qad.utils")
#endif
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
public:
explicit QADUtils(QObject * parent = 0);
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
private:
QList<QDesignerCustomWidgetInterface * > m_widgets;
};
#endif // QAD_UTILS_H

View File

@@ -1,165 +0,0 @@
#include <QColor>
#include "qad_types.h"
bool PropertyStorage::isPropertyExists(const QString & _name) const {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == _name)
return true;
return false;
}
void PropertyStorage::addProperty(const PropertyStorage::Property & p) {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == p.name) {
props[i] = p;
return;
}
props << p;
}
void PropertyStorage::removeProperty(const QString & _name) {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == _name) {
props.removeAt(i);
return;
}
}
void PropertyStorage::removePropertiesByFlag(int flag) {
for (int i = 0; i < props.size(); ++i)
if ((props[i].flags & flag) == flag) {
props.removeAt(i);
--i;
}
}
void PropertyStorage::updateProperties(const QList<PropertyStorage::Property> & properties_, int flag_ignore) {
QVariantMap values;
foreach (const PropertyStorage::Property & p, props)
if (((p.flags & flag_ignore) != flag_ignore) || (flag_ignore == 0))
values[p.name] = p.value;
props = properties_;
for (int i = 0; i < props.size(); ++i) {
PropertyStorage::Property & p(props[i]);
if (values.contains(p.name)) {
QVariant pv = values[p.name];
if (pv.userType() == p.value.userType())
p.value = pv;
}
}
}
PropertyStorage::Property PropertyStorage::propertyByName(const QString & name) const {
foreach (const Property & p, props)
if (p.name == name)
return p;
return Property();
}
QVariant PropertyStorage::propertyValueByName(const QString & name) const {
foreach (const Property & p, props)
if (p.name == name)
return p.value;
return QVariant();
}
void PropertyStorage::setPropertyValue(const QString & name, const QVariant & value) {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == name) {
props[i].value = value;
return;
}
}
void PropertyStorage::setPropertyComment(const QString & name, const QString & comment) {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == name) {
props[i].comment = comment;
return;
}
}
void PropertyStorage::setPropertyFlags(const QString & name, int flags) {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == name) {
props[i].flags = flags;
return;
}
}
PropertyStorage::Property PropertyStorage::parsePropertyLine(QString l) {
PropertyStorage::Property ret;
QString pn, pc, pt("s"), pv;
if (l.contains('#')) {
int i = l.indexOf('#');
pn = l.left(i).trimmed();
pc = l.right(l.length() - i - 1).trimmed();
} else {
if (l.contains('(')) {
int bs = l.indexOf('('), be = l.indexOf(')');
if (be > 0) {
pc = l.mid(bs + 1, be - bs - 1).trimmed();
l.remove(bs, be - bs + 1);
} else {
pc = l.right(l.length() - bs - 1).trimmed();
l = l.left(bs);
}
}
pn = l.trimmed();
}
if (!pc.isEmpty()) {
pt = pc.left(1);
pc = pc.remove(0, 1).trimmed();
}
if (pn.contains('=')) {
int i = pn.indexOf('=');
pv = pn.right(pn.length() - i - 1).trimmed();
pn.truncate(i);
pn = pn.trimmed();
}
ret.name = pn;
ret.comment = pc;
ret.value = QVariant(typeFromLetter(pt));
if (!pv.isEmpty()) {
//qDebug() << "set value !" << pv;
switch (ret.value.type()) {
case QVariant::Bool: pv = pv.toLower(); ret.value = (pv == "on" || pv == "true" || pv == "enable" || pv == "enabled" || pv.toInt() > 0 ? true : false); break;
case QVariant::Int: ret.value = pv.toInt(); break;
case QVariant::UInt: ret.value = pv.toUInt(); break;
case QVariant::LongLong: ret.value = pv.toLongLong(); break;
case QVariant::ULongLong: ret.value = pv.toULongLong(); break;
case QVariant::Double: ret.value = pv.toDouble(); break;
case QVariant::Color: ret.value = QColor(pv); break;
default: ret.value = pv; break;
};
}
return ret;
}
PropertyStorage::Property & PropertyStorage::operator[](const QString & name) {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == name)
return props[i];
addProperty(name, "");
return props.back();
}
const PropertyStorage::Property PropertyStorage::operator[](const QString & name) const {
for (int i = 0; i < props.size(); ++i)
if (props[i].name == name)
return props[i];
return Property();
}

View File

@@ -1,139 +0,0 @@
/*
QAD - Qt ADvanced
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PROPERTYSTORAGE_H
#define PROPERTYSTORAGE_H
#include <QPointF>
#include <QRectF>
#include <QLineF>
#include <QVariant>
#include <QStringList>
#include <QDebug>
#include "chunkstream.h"
class QAD_EXPORT PropertyStorage {
public:
PropertyStorage() {}
struct Property {
Property(const QString & n = QString(), const QString & c = QString(), const QVariant & v = QVariant(), int f = 0):
name(n), comment(c), value(v), flags(f) {}
bool toBool() const {return value.toBool();}
int toInt() const {return value.toInt();}
float toFloat() const {return value.toFloat();}
double toDouble() const {return value.toDouble();}
QString toString() const {return value.toString();}
QString name;
QString comment;
QVariant value;
int flags;
};
PropertyStorage(const QList<Property> & pl) {props = pl;}
typedef QList<Property>::const_iterator const_iterator;
typedef QList<Property>::iterator iterator;
iterator begin() {return props.begin();}
const_iterator begin() const {return props.begin();}
const_iterator constBegin() const {return props.constBegin();}
iterator end() {return props.end();}
const_iterator end() const {return props.end();}
const_iterator constEnd() const {return props.constEnd();}
int count() const {return props.count();}
int length() const {return props.length();}
int size() const {return props.size();}
bool isEmpty() const {return props.isEmpty();}
Property & first() {return props.first();}
const Property & first() const {return props.first();}
Property & front() {return props.front();}
const Property & front() const {return props.front();}
Property & last() {return props.last();}
const Property & last() const {return props.last();}
Property & back() {return props.back();}
const Property & back() const {return props.back();}
void removeFirst() {props.removeFirst();}
void removeLast() {props.removeLast();}
void removeAt(int i) {props.removeAt(i);}
Property value(int i) const {return props.value(i);}
Property value(int i, const Property & defaultValue) const {return props.value(i, defaultValue);}
void clear() {props.clear();}
PropertyStorage copy() const {return PropertyStorage(*this);}
int propertiesCount() const {return props.size();}
QList<Property> & properties() {return props;}
const QList<Property> & properties() const {return props;}
const PropertyStorage & propertyStorage() const {return *this;}
bool isPropertyExists(const QString & _name) const;
void clearProperties() {props.clear();}
void addProperty(const Property & p);
void addProperty(const QString & _name, const QVariant & _def_value, const QString & _comment = QString(), int _flags = 0) {addProperty(Property(_name, _comment, _def_value, _flags));}
void removeProperty(const QString & _name);
void removePropertiesByFlag(int flag);
void updateProperties(const QList<Property> & properties_, int flag_ignore = 0);
Property propertyByName(const QString & name) const;
QVariant propertyValueByName(const QString & name) const;
void setPropertyValue(const QString & name, const QVariant & value);
void setPropertyComment(const QString & name, const QString & comment);
void setPropertyFlags(const QString & name, int flags);
PropertyStorage & operator <<(const PropertyStorage::Property & p) {props << p; return *this;}
PropertyStorage & operator <<(const QList<Property> & p) {props << p; return *this;}
PropertyStorage & operator <<(const PropertyStorage & p) {props << p.props; return *this;}
Property & operator[](int i) {return props[i];}
const Property & operator[](int i) const {return props[i];}
Property & operator[](const QString & name);
const Property operator[](const QString & name) const;
static Property parsePropertyLine(QString l);
protected:
QList<Property> props;
};
inline QDebug operator <<(QDebug s, const PropertyStorage::Property & p) {s.nospace() << p.name << " (0x" << QString::number(p.flags, 16) << ") = " << p.value; return s.space();}
inline QDataStream & operator <<(QDataStream & s, const PropertyStorage & p) {s << p.properties(); return s;}
inline QDataStream & operator >>(QDataStream & s, PropertyStorage & p) {s >> p.properties(); return s;}
inline QDataStream & operator <<(QDataStream & s, const PropertyStorage::Property & p) {
ChunkStream cs;
cs << cs.chunk(1, p.name) << cs.chunk(2, p.comment) << cs.chunk(3, p.value) << cs.chunk(4, p.flags);
s << cs.data();
return s;
}
inline QDataStream & operator >>(QDataStream & s, PropertyStorage::Property & p) {
ChunkStream cs(s);
while (!cs.atEnd()) {
switch (cs.read()) {
case 1: cs.get(p.name); break;
case 2: cs.get(p.comment); break;
case 3: cs.get(p.value); break;
case 4: cs.get(p.flags); break;
}
}
return s;
}
#endif // PROPERTYSTORAGE_H

View File

@@ -1,132 +0,0 @@
#include "qad_locations.h"
#include <QDir>
#include <QDirIterator>
#include <QTranslator>
#include <QApplication>
#include <QDebug>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
# include <QStandardPaths>
#else
# include <QDesktopServices>
#endif
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
# define MOBILE_VIEW
#endif
class __QADTranslators__ {
public:
static QList<QTranslator * > translators;
private:
};
QList<QTranslator * > __QADTranslators__::translators = QList<QTranslator * >();
QString QAD::userPath(QAD::LocationType loc, QString name) {
QString dir, ext;
switch (loc) {
case ltConfig: ext = ".conf"; break;
case ltCache : ext = ".cache"; break;
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
QStandardPaths::StandardLocation l = QStandardPaths::AppConfigLocation;
switch (loc) {
case ltConfig: l = QStandardPaths::AppConfigLocation; break;
case ltCache : l = QStandardPaths::CacheLocation; break;
}
dir = QStandardPaths::writableLocation(l);
#else
QDesktopServices::StandardLocation l = QDesktopServices::DataLocation;
switch (loc) {
case ltConfig: l = QDesktopServices::DataLocation; break;
case ltCache : l = QDesktopServices::CacheLocation; break;
}
dir = QDesktopServices::storageLocation(l);
#endif
if (!QDir(dir).exists())
QDir().mkpath(dir);
return dir + "/" + name + ext;
}
QStringList QAD::resourcePaths(QString type) {
QStringList ret;
ret << (QApplication::applicationDirPath() + "/" + type);
#ifdef MOBILE_VIEW
ret << (":/" + type);
#elif defined(Q_OS_MACOS)
ret << (QApplication::applicationDirPath() + "/../Resources/" + type);
#elif defined(Q_OS_WINDOWS)
#else
ret << QString("/usr/share/%1/%2/%3").arg(QApplication::organizationName(), QApplication::applicationName(), type);
ret << QString("/usr/share/%1/%2").arg(QApplication::organizationName(), type);
#endif
return ret;
}
void QAD::loadTranslations(QString lang) {
foreach (QTranslator * t, __QADTranslators__::translators) {
qApp->removeTranslator(t);
delete t;
}
__QADTranslators__::translators.clear();
if (lang.isEmpty())
lang = QLocale().bcp47Name();
QString short_lang = lang.left(2);
QStringList dirs = resourcePaths("lang");
foreach (const QString & d, dirs) {
QDirIterator dit(d);
while (dit.hasNext()) {
dit.next();
if (!dit.filePath().endsWith(".qm")) continue;
if (!dit.fileInfo().baseName().endsWith(lang) &&
!dit.fileInfo().baseName().endsWith(short_lang)) continue;
QTranslator * tr = new QTranslator();
if (tr->load(dit.filePath())) {
qApp->installTranslator(tr);
__QADTranslators__::translators << tr;
qDebug() << "Add tr" << dit.fileName();
} else {
qDebug() << "Can`t load translation" << dit.fileName();
delete tr;
}
}
}
}
QStringList QAD::availableTranslations() {
QSet<QString> ret;
QStringList dirs = resourcePaths("lang");
foreach (const QString & d, dirs) {
QDirIterator dit(d);
while (dit.hasNext()) {
dit.next();
if (!dit.filePath().endsWith(".qm")) continue;
QTranslator * tr = new QTranslator();
if (tr->load(dit.filePath())) {
QString fn = dit.fileInfo().baseName(), lang[2];
if (fn.contains("_")) {
lang[0] = fn.right(fn.size() - fn.lastIndexOf("_") - 1);
fn.chop(lang[0].size() + 1);
if (fn.contains("_")) {
lang[1] = fn.right(fn.size() - fn.lastIndexOf("_") - 1);
fn.chop(lang[1].size() + 1);
lang[1].append("_" + lang[0]);
}
}
for (int i = 0; i < 2; ++i) {
QLocale loc(lang[i]);
if (loc.language() != QLocale::C)
ret << lang[i];
}
}
delete tr;
}
}
return ret.values();
}

View File

@@ -1,59 +0,0 @@
/*
QAD - Qt ADvanced
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QAD_LOCATIONS_H
#define QAD_LOCATIONS_H
#include "qad_export.h"
#include <QString>
namespace QAD {
enum LocationType {
ltConfig,
ltCache,
};
//! Create QStandardPaths::writableLocation(<loc>) directory
//! and returns file name "<name>.<ext>".
//! Extension is selected by "loc":
//! * ltConfig - "conf"
//! * ltCache - "cache"
QAD_EXPORT QString userPath(LocationType loc, QString name = QString());
//! Returns search directories for resource "type"
//! * <applicationDirPath>/<type> presents on all platforms
//! * :/<type> on mobile platforms
//! * <.app>/Resources/<type> on MacOS
//! * /usr/share/[organizationName/]<applicationName>/<type> on Linux
QAD_EXPORT QStringList resourcePaths(QString type);
QAD_EXPORT void loadTranslations(QString lang = QString());
QAD_EXPORT QStringList availableTranslations();
}
#endif // QAD_LOCATIONS_H

View File

@@ -1,278 +0,0 @@
#include "qad_types.h"
#include <QApplication>
#include <QFontMetrics>
#include <QMetaEnum>
#include <QWidget>
#if QT_VERSION >= 0x050000
# include <QWindow>
# include <QScreen>
#endif
bool __QADTypesRegistrator__::_inited = false;
__QADTypesRegistrator__::__QADTypesRegistrator__(int) {
instance()->_inited = true;
}
__QADTypesRegistrator__ *__QADTypesRegistrator__::instance() {
static __QADTypesRegistrator__ ret;
return &ret;
}
__QADTypesRegistrator__::__QADTypesRegistrator__() {
if (_inited) return;
_inited = true;
qRegisterMetaType<QAD::Enumerator>("QAD::Enumerator");
qRegisterMetaTypeStreamOperators<QAD::Enumerator>("QAD::Enumerator");
qRegisterMetaType<QAD::Enum>("QAD::Enum");
qRegisterMetaTypeStreamOperators<QAD::Enum>("QAD::Enum");
qRegisterMetaType<QAD::File>("QAD::File");
qRegisterMetaTypeStreamOperators<QAD::File>("QAD::File");
qRegisterMetaType<QAD::Dir>("QAD::Dir");
qRegisterMetaTypeStreamOperators<QAD::Dir>("QAD::Dir");
qRegisterMetaType<QAD::IODevice>("QAD::IODevice");
qRegisterMetaTypeStreamOperators<QAD::IODevice>("QAD::IODevice");
qRegisterMetaType<QAD::MathVector>("QAD::MathVector");
qRegisterMetaTypeStreamOperators<QAD::MathVector>("QAD::MathVector");
qRegisterMetaType<QAD::MathMatrix>("QAD::MathMatrix");
qRegisterMetaTypeStreamOperators<QAD::MathMatrix>("QAD::MathMatrix");
#if QT_VERSION >= 0x050200
QMetaType::registerConverter<QAD::Enum, int>(&QAD::Enum::selectedValue);
QMetaType::registerConverter<QAD::Enum, QString>(&QAD::Enum::selectedName);
QMetaType::registerConverter<QAD::File, QString>(&QAD::File::toString);
QMetaType::registerConverter<QAD::Dir, QString>(&QAD::Dir::toString);
QMetaType::registerConverter<QAD::IODevice, QString>(&QAD::IODevice::toString);
#endif
}
__QADTypesRegistrator__ __registrator__(1);
QAD::Enum::Enum(const QMetaEnum & meta, int selected) {
enum_name = meta.name();
for (int i = 0; i < meta.keyCount(); ++i) {
enum_list << QAD::Enumerator(meta.value(i), meta.key(i));
}
selectValue(selected);
}
int QAD::Enum::selectedValue() const {
foreach (const Enumerator & e, enum_list)
if (e.name == selected)
return e.value;
return 0;
}
bool QAD::Enum::selectValue(int v) {
foreach (const Enumerator & e, enum_list)
if (e.value == v) {
selected = e.name;
return true;
}
return false;
}
bool QAD::Enum::selectName(const QString & n) {
foreach (const Enumerator & e, enum_list)
if (e.name == n) {
selected = e.name;
return true;
}
return false;
}
int QAD::Enum::value(const QString & n) const {
foreach (const Enumerator & e, enum_list)
if (e.name == n)
return e.value;
return 0;
}
QString QAD::Enum::name(int v) const {
foreach (const Enumerator & e, enum_list)
if (e.value == v)
return e.name;
return QString();
}
QList<int> QAD::Enum::values() const {
QList<int> ret;
foreach (const Enumerator & e, enum_list)
ret << e.value;
return ret;
}
QStringList QAD::Enum::names() const {
QStringList ret;
foreach (const Enumerator & e, enum_list)
ret << e.name;
return ret;
}
QAD::Enum & QAD::Enum::operator <<(const QAD::Enumerator & v) {
enum_list << v;
return *this;
}
QAD::Enum & QAD::Enum::operator <<(const QString & v) {
enum_list << Enumerator(enum_list.size(), v);
return *this;
}
QAD::Enum & QAD::Enum::operator <<(const QStringList & v) {
foreach (const QString & s, v)
(*this) << s;
return *this;
}
QString QAD::IODevice::toString() const {
QString s;
if (__QADTypesRegistrator__::instance()->toString_funcs.contains(qMetaTypeId<QAD::IODevice>())) {
QVariant v;
v.setValue(*this);
(*(__QADTypesRegistrator__::instance()->toString_funcs[qMetaTypeId<QAD::IODevice>()]))(v, s);
return s;
} else {
// s += "IODevice(" + prefix + ", mode=";
// int rwc = 0;
// if (mode & QIODevice::ReadOnly) {s += "r"; ++rwc;}
// if (mode & QIODevice::WriteOnly) {s += "w"; ++rwc;}
// if (rwc == 1) s += "o";
// if (options != 0) {
// s += ", flags=";
// if (options & 1)
// s += "br";
// if (options & 2)
// if (options & 1)
// s+= "|";
// s += "bw";
// }
// PropertyStorage ps = props;
// foreach (const PropertyStorage::Property & p, ps) {
// QString vs = p.value.toString();
// if (p.value.type() == QVariant::StringList)
// vs = p.value.toStringList().join(";");
// s += ", " + p.name + "=\"" + vs + "\"";
// }
// s += ")";
return s;
}
}
QVariant::Type typeFromLetter(const QString & l) {
if (l.isEmpty()) return QVariant::String;
QString ft = l.left(1);
if (ft == "l") return QVariant::StringList;
if (ft == "b") return QVariant::Bool;
if (ft == "n") return QVariant::Int;
if (ft == "f") return QVariant::Double;
if (ft == "c") return QVariant::Color;
if (ft == "r") return QVariant::Rect;
if (ft == "a") return QVariant::RectF;
if (ft == "p") return QVariant::Point;
if (ft == "v") return QVariant::PointF;
if (ft == "e") return (QVariant::Type)qMetaTypeId<QAD::Enum>();
if (ft == "F") return (QVariant::Type)qMetaTypeId<QAD::File>();
if (ft == "D") return (QVariant::Type)qMetaTypeId<QAD::Dir>();
if (ft == "d") return (QVariant::Type)qMetaTypeId<QAD::IODevice>();
if (ft == "V") return (QVariant::Type)qMetaTypeId<QAD::MathVector>();
if (ft == "M") return (QVariant::Type)qMetaTypeId<QAD::MathMatrix>();
return QVariant::String;
}
QString uniqueName(QString n, const QStringList & names) {
if (!names.contains(n))
return n;
QString num;
while (!n.isEmpty()) {
if (n.right(1)[0].isDigit()) {
num.push_front(n.right(1));
n.chop(1);
} else break;
}
if (!n.endsWith('_')) n += '_';
int in = num.toInt() + 1;
QString nn = n + QString::number(in).rightJustified(3, '0');
while (names.contains(nn))
nn = n + QString::number(++in).rightJustified(3, '0');
return nn;
}
int fontHeight(const QWidget * w) {
#ifdef Q_OS_ANDROID
static int ret = QApplication::fontMetrics().size(0, "0").height();
return ret;
#else
# if QT_VERSION >= 0x050000
//qDebug() << "fontHeight" << w;
if (w) {
QWidget * pw = w->window();
if (pw) {
/*QWindow * wnd = pw->windowHandle();
//qDebug() << "wnd" << wnd;
if (wnd) {
QScreen * s = wnd->screen();
qDebug() << "s" << s;
if (s) {
qDebug() << "scales:";
qDebug() << QApplication::fontMetrics().size(0, "0").height() << QApplication::fontMetrics().xHeight();
qDebug() << s->logicalDotsPerInch() << s->logicalDotsPerInch()/96.*QApplication::font().pointSizeF();
}
}*/
return QFontMetrics(QApplication::font(), pw).size(0, "0").height();
}
}
# endif
#endif
return QApplication::fontMetrics().size(0, "0").height();
}
int lineThickness(const QWidget * w) {
return qMax<int>(qRound(fontHeight(w) / 15.), 1);
}
QSize preferredIconSize(float x, const QWidget * w) {
int s = qMax<int>(8, qRound(fontHeight(w) * x));
#ifdef Q_OS_MACOS
s /= 1.25;
#endif
#ifdef Q_OS_ANDROID
s /= 1.4;
#endif
return QSize(s, s);
}
double appScale(const QWidget * w) {
return qMax<double>(fontHeight(w) / 15., 1.);
}

View File

@@ -1,179 +0,0 @@
/*
QAD - Qt ADvanced
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QAD_TYPES_H
#define QAD_TYPES_H
#include "propertystorage.h"
#include "qad_export.h"
#include <QCoreApplication>
//! Set QCoreApplication properties from CMake "deploy_properties"
//! Affect applicationName, organizationName and applicationVersion
#define QAD_SETUP_APPLICATION \
QCoreApplication::setApplicationName(__TARGET_NAME__); \
QCoreApplication::setOrganizationName(__TARGET_COMPANY__); \
QCoreApplication::setApplicationVersion(__TARGET_VERSION__);
class QMetaEnum;
namespace QAD {
struct QAD_EXPORT Enumerator {
Enumerator(int v = 0, const QString & n = QString()): value(v), name(n) {}
int value;
QString name;
};
struct QAD_EXPORT Enum {
Enum(const QString & n = QString()): enum_name(n) {}
Enum(const QMetaEnum & meta, int selected = 0);
int selectedValue() const;
QString selectedName() const {return selected;}
bool selectValue(int v);
bool selectName(const QString & n);
int value(const QString & n) const;
QString name(int v) const;
QList<int> values() const;
QStringList names() const;
int size() const {return enum_list.size();}
QString enum_name;
QString selected;
QList<Enumerator> enum_list;
Enum & operator <<(const Enumerator & v);
Enum & operator <<(const QString & v);
Enum & operator <<(const QStringList & v);
};
struct QAD_EXPORT File {
File(const QString & p = QString(), const QString & f = QString(), bool abs = false, bool save_mode = false):
file(p), filter(f), is_abs(abs), is_save(save_mode) {}
QString toString() const {return file;}
QString file;
QString filter;
bool is_abs;
bool is_save;
};
struct QAD_EXPORT Dir {
Dir(const QString & d = QString(), bool abs = false):
dir(d), is_abs(abs) {}
QString toString() const {return dir;}
QString dir;
bool is_abs;
};
struct QAD_EXPORT IODevice {
IODevice(const QString & device_prefix = QString(), const PropertyStorage & device_properties = PropertyStorage(),
int open_mode = QIODevice::ReadWrite, int device_options = 0)
: prefix(device_prefix), mode(open_mode), options(device_options), props(device_properties) {}
QString toString() const;
bool isValid() const {return !prefix.isEmpty();}
QString prefix;
int mode;
int options;
PropertyStorage props;
};
struct QAD_EXPORT MathVector {
MathVector(const QVector<double> & vec = QVector<double>()) {v = vec;}
QVector<double> v;
};
struct QAD_EXPORT MathMatrix {
MathMatrix(const QVector<QVector<double> > & mat = QVector<QVector<double> > ()) {m = mat;}
QVector<QVector<double> > m; // [Row][Column]
};
}
Q_DECLARE_METATYPE(QAD::Enumerator)
inline QDataStream & operator <<(QDataStream & s, const QAD::Enumerator & v) {s << v.value << v.name; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::Enumerator & v) {s >> v.value >> v.name; return s;}
inline QDebug operator <<(QDebug s, const QAD::Enumerator & v) {s.nospace() << v.name << "(" << v.value << ")"; return s.space();}
Q_DECLARE_METATYPE(QAD::Enum)
inline QDataStream & operator <<(QDataStream & s, const QAD::Enum & v) {s << v.enum_name << v.selected << v.enum_list; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::Enum & v) {s >> v.enum_name >> v.selected >> v.enum_list; return s;}
inline QDebug operator <<(QDebug s, const QAD::Enum & v) {s.nospace() << v.selected; return s.space();}
Q_DECLARE_METATYPE(QAD::File)
inline QDataStream & operator <<(QDataStream & s, const QAD::File & v) {s << v.file << v.filter << uchar((v.is_abs ? 1 : 0) + (v.is_save ? 2 : 0)); return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::File & v) {uchar f(0); s >> v.file >> v.filter >> f; v.is_abs = ((f & 1) == 1); v.is_save = ((f & 2) == 2); return s;}
inline QDebug operator <<(QDebug s, const QAD::File & v) {s.nospace() << v.file; return s.space();}
Q_DECLARE_METATYPE(QAD::Dir)
inline QDataStream & operator <<(QDataStream & s, const QAD::Dir & v) {s << v.dir << v.is_abs; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::Dir & v) {s >> v.dir >> v.is_abs; return s;}
inline QDebug operator <<(QDebug s, const QAD::Dir & v) {s.nospace() << v.dir; return s.space();}
Q_DECLARE_METATYPE(QAD::IODevice)
inline QDataStream & operator <<(QDataStream & s, const QAD::IODevice & v) {s << v.prefix << v.mode << v.options << v.props; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::IODevice & v) {s >> v.prefix >> v.mode >> v.options >> v.props; return s;}
inline QDebug operator <<(QDebug s, const QAD::IODevice & v) {s.nospace() << v.toString(); return s.space();}
Q_DECLARE_METATYPE(QAD::MathVector)
inline QDataStream & operator <<(QDataStream & s, const QAD::MathVector & v) {s << v.v; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::MathVector & v) {s >> v.v; return s;}
inline QDebug operator <<(QDebug s, const QAD::MathVector & v) {s.nospace() << "Vector " << v.v; return s.space();}
Q_DECLARE_METATYPE(QAD::MathMatrix)
inline QDataStream & operator <<(QDataStream & s, const QAD::MathMatrix & v) {s << v.m; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::MathMatrix & v) {s >> v.m; return s;}
inline QDebug operator <<(QDebug s, const QAD::MathMatrix & v) {s.nospace() << "Matrix " << v.m; return s.space();}
class QAD_EXPORT __QADTypesRegistrator__ {
public:
__QADTypesRegistrator__(int);
static __QADTypesRegistrator__ * instance();
QMap<int, void(*)(const QVariant &, QString &)> toString_funcs;
private:
__QADTypesRegistrator__();
static bool _inited;
};
inline qreal quantize(qreal x, qreal q = 10.f) {return qRound(x / q) * q;}
inline QPointF quantize(QPointF x, qreal q = 10.f) {return QPointF(quantize(x.x(), q), quantize(x.y(), q));}
inline qreal distPointToLine(const QPointF & lp0, const QPointF & lp1, const QPointF & p) {
QLineF a(lp0, lp1), b(lp0, p), c(lp1, p);
qreal f = qAbs(a.dx()*b.dy() - a.dy()*b.dx()) / a.length(), s = b.length() + c.length() - a.length();
return qMax(f, s);
}
inline QPointF nearestPointOnLine(const QPointF & lp0, const QPointF & lp1, const QPointF & p) {
QLineF a(lp0, lp1), b(lp0, p);
return a.pointAt(b.length() / a.length());
}
inline QRectF enlargedRect(const QRectF & r, qreal dx, qreal dy, qreal v) {
return QRectF(r.left() - v + dx, r.top() - v + dy, r.width() + v+v, r.height() + v+v);
}
QAD_EXPORT QVariant::Type typeFromLetter(const QString & l);
QAD_EXPORT QString uniqueName(QString n, const QStringList & names);
QAD_EXPORT int fontHeight(const QWidget * w = 0);
QAD_EXPORT int lineThickness(const QWidget * w = 0);
QAD_EXPORT QSize preferredIconSize(float x = 1.f, const QWidget * w = 0);
QAD_EXPORT double appScale(const QWidget * w = 0);
#endif // QAD_TYPES_H

View File

@@ -1,17 +0,0 @@
<RCC>
<qresource prefix="/">
<file>../icons/edit-clear.png</file>
<file>../icons/document-save.png</file>
<file>../icons/edit-clear-locationbar-rtl.png</file>
<file>../icons/edit-find.png</file>
<file>../icons/list-add.png</file>
<file>../icons/edit-delete.png</file>
<file>../icons/item-add.png</file>
<file>../icons/item.png</file>
<file>../icons/node-add.png</file>
<file>../icons/node.png</file>
<file>../icons/edit-copy.png</file>
<file>../icons/edit-paste.png</file>
<file>../icons/document-open_16.png</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,23 @@
project(qpicalc)
find_qt(${QtVersions} Core Gui Widgets)
qt_sources(SRC)
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qad_graphic)
message(STATUS "Building ${PROJECT_NAME}")
if(LIB)
if(WIN32)
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
else()
if (DEFINED ANDROID_PLATFORM)
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/bin)
else()
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
endif()
endif()
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

View File

@@ -0,0 +1,351 @@
<?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="256"
height="256"
id="svg2"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="mbricks.svg"
inkscape:export-filename="/home/peri4/pprojects/mbricks/icons/mbricks_256.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<marker
inkscape:stockid="TriangleOutM"
orient="auto"
refY="0.0"
refX="0.0"
id="TriangleOutM"
style="overflow:visible">
<path
id="path4080"
d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.4)" />
</marker>
<linearGradient
id="linearGradient7185">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop7187" />
<stop
style="stop-color:#9f5321;stop-opacity:1;"
offset="1"
id="stop7189" />
</linearGradient>
<marker
inkscape:stockid="Scissors"
orient="auto"
refY="0.0"
refX="0.0"
id="Scissors"
style="overflow:visible">
<path
id="schere"
style="marker-start:none"
d="M 9.0898857,-3.6061018 C 8.1198849,-4.7769976 6.3697607,-4.7358294 5.0623558,-4.2327734 L -3.1500488,-1.1548705 C -5.5383421,-2.4615840 -7.8983361,-2.0874077 -7.8983361,-2.7236578 C -7.8983361,-3.2209742 -7.4416699,-3.1119800 -7.5100293,-4.4068519 C -7.5756648,-5.6501286 -8.8736064,-6.5699315 -10.100428,-6.4884954 C -11.327699,-6.4958500 -12.599867,-5.5553341 -12.610769,-4.2584343 C -12.702194,-2.9520479 -11.603560,-1.7387447 -10.304005,-1.6532027 C -8.7816644,-1.4265411 -6.0857470,-2.3487593 -4.8210600,-0.082342643 C -5.7633447,1.6559151 -7.4350844,1.6607341 -8.9465707,1.5737277 C -10.201445,1.5014928 -11.708664,1.8611256 -12.307219,3.0945882 C -12.885586,4.2766744 -12.318421,5.9591904 -10.990470,6.3210002 C -9.6502788,6.8128279 -7.8098011,6.1912892 -7.4910978,4.6502760 C -7.2454393,3.4624530 -8.0864637,2.9043186 -7.7636052,2.4731223 C -7.5199917,2.1477623 -5.9728246,2.3362771 -3.2164999,1.0982979 L 5.6763468,4.2330688 C 6.8000164,4.5467672 8.1730685,4.5362646 9.1684433,3.4313614 L -0.051640930,-0.053722219 L 9.0898857,-3.6061018 z M -9.2179159,-5.5066058 C -7.9233569,-4.7838060 -8.0290767,-2.8230356 -9.3743431,-2.4433169 C -10.590861,-2.0196559 -12.145370,-3.2022863 -11.757521,-4.5207817 C -11.530373,-5.6026336 -10.104134,-6.0014137 -9.2179159,-5.5066058 z M -9.1616516,2.5107591 C -7.8108215,3.0096239 -8.0402087,5.2951947 -9.4138723,5.6023681 C -10.324932,5.9187072 -11.627422,5.4635705 -11.719569,4.3902287 C -11.897178,3.0851737 -10.363484,1.9060805 -9.1616516,2.5107591 z " />
</marker>
<marker
inkscape:stockid="TriangleOutL"
orient="auto"
refY="0.0"
refX="0.0"
id="TriangleOutL"
style="overflow:visible">
<path
id="path4077"
d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
transform="scale(0.8)" />
</marker>
<marker
inkscape:stockid="Arrow2Lstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lstart"
style="overflow:visible">
<path
id="path3952"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) translate(1,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lend"
style="overflow:visible;">
<path
id="path3955"
style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) rotate(180) translate(1,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lend"
style="overflow:visible;">
<path
id="path3937"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
transform="scale(0.8) rotate(180) translate(12.5,0)" />
</marker>
<linearGradient
id="linearGradient2880">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2882" />
<stop
style="stop-color:#a1a0ec;stop-opacity:1;"
offset="1"
id="stop2884" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-27.752184 : 226.04049 : 1"
inkscape:vp_y="0 : 532.84338 : 0"
inkscape:vp_z="668.44676 : 231.8798 : 1"
inkscape:persp3d-origin="729.03793 : 212.46096 : 1"
id="perspective10" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2880"
id="radialGradient3660"
cx="44.799999"
cy="841.16217"
fx="44.799999"
fy="841.16217"
r="83.199997"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-1.9999999,1.9999998,-2.0000003,-2.0000003,1816.7246,2433.8867)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient7185"
id="radialGradient7191"
cx="79.29837"
cy="78.79641"
fx="79.29837"
fy="78.79641"
r="49.693359"
gradientTransform="matrix(3.7537835e-8,1.9999999,-1.9999999,6.9316032e-8,236.4014,-58.319081)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient7185"
id="radialGradient7193"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(3.7537835e-8,1.9999999,-1.9999999,6.9316032e-8,236.4014,-58.319081)"
cx="79.29837"
cy="78.79641"
fx="79.29837"
fy="78.79641"
r="49.693359" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient7185"
id="radialGradient7195"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(3.7537835e-8,1.9999999,-1.9999999,6.9316032e-8,236.4014,-58.319081)"
cx="79.29837"
cy="78.79641"
fx="79.29837"
fy="78.79641"
r="49.693359" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient7185"
id="radialGradient7197"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(3.7537835e-8,1.9999999,-1.9999999,6.9316032e-8,236.4014,-58.319081)"
cx="79.29837"
cy="78.79641"
fx="79.29837"
fy="78.79641"
r="49.693359" />
<filter
inkscape:collect="always"
id="filter7823">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.1939744"
id="feGaussianBlur7825" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.9694029"
inkscape:cx="174.88154"
inkscape:cy="103.79424"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
borderlayer="false"
showborder="true"
inkscape:showpageshadow="true"
inkscape:snap-global="true"
inkscape:snap-page="true"
inkscape:snap-grids="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-center="true"
inkscape:window-width="1680"
inkscape:window-height="957"
inkscape:window-x="-2"
inkscape:window-y="-3"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid2878"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-796.36218)">
<rect
style="fill:url(#radialGradient3660);fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
id="rect2873"
width="166.39999"
height="166.39999"
x="44.799999"
y="841.16217"
ry="19.968" />
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 240,0 0,81 -20.47574,0"
id="path3745"
transform="translate(0,796.36218)"
sodipodi:nodetypes="ccc" />
<path
sodipodi:type="arc"
style="fill:#0000ff;stroke:#0000ff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1;fill-rule:nonzero"
id="path3666"
sodipodi:cx="212.14285"
sodipodi:cy="102.42857"
sodipodi:rx="13.571428"
sodipodi:ry="13.571428"
d="m 225.71428,102.42857 c 0,7.4953 -6.07613,13.57143 -13.57143,13.57143 -7.49529,0 -13.57143,-6.07613 -13.57143,-13.57143 0,-7.495289 6.07614,-13.571425 13.57143,-13.571425 7.4953,0 13.57143,6.076136 13.57143,13.571425 z"
transform="matrix(0.5,0,0,0.5,106.12857,826.1479)" />
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow2Lend)"
d="m 0,81 40,0"
id="path3747"
transform="translate(0,796.36218)"
sodipodi:nodetypes="cc" />
<path
transform="matrix(0.5,0,0,0.5,-62.271427,826.1479)"
d="m 225.71428,102.42857 c 0,7.4953 -6.07613,13.57143 -13.57143,13.57143 -7.49529,0 -13.57143,-6.07613 -13.57143,-13.57143 0,-7.495289 6.07614,-13.571425 13.57143,-13.571425 7.4953,0 13.57143,6.076136 13.57143,13.571425 z"
sodipodi:ry="13.571428"
sodipodi:rx="13.571428"
sodipodi:cy="102.42857"
sodipodi:cx="212.14285"
id="path3743"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<path
sodipodi:nodetypes="ccc"
id="path5719"
d="m 5,1052.3622 0,-85.00002 35,0"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow2Lend);opacity:1" />
<path
sodipodi:type="arc"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path5721"
sodipodi:cx="212.14285"
sodipodi:cy="102.42857"
sodipodi:rx="13.571428"
sodipodi:ry="13.571428"
d="m 225.71428,102.42857 c 0,7.4953 -6.07613,13.57143 -13.57143,13.57143 -7.49529,0 -13.57143,-6.07613 -13.57143,-13.57143 0,-7.495289 6.07614,-13.571425 13.57143,-13.571425 7.4953,0 13.57143,6.076136 13.57143,13.571425 z"
transform="matrix(0.5,0,0,0.5,-62.271427,916.14789)" />
<path
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow2Lend)"
d="m 0,922.36217 40,0"
id="path5723"
sodipodi:nodetypes="cc" />
<path
transform="matrix(0.5,0,0,0.5,-62.271427,871.14789)"
d="m 225.71428,102.42857 c 0,7.4953 -6.07613,13.57143 -13.57143,13.57143 -7.49529,0 -13.57143,-6.07613 -13.57143,-13.57143 0,-7.495289 6.07614,-13.571425 13.57143,-13.571425 7.4953,0 13.57143,6.076136 13.57143,13.571425 z"
sodipodi:ry="13.571428"
sodipodi:rx="13.571428"
sodipodi:cy="102.42857"
sodipodi:cx="212.14285"
id="path5725"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<path
sodipodi:nodetypes="cccc"
id="path5727"
d="m 256,967.36218 -16,0 0,-45 -20,0"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
transform="matrix(0.5,0,0,0.5,106.12857,871.14789)"
d="m 225.71428,102.42857 c 0,7.4953 -6.07613,13.57143 -13.57143,13.57143 -7.49529,0 -13.57143,-6.07613 -13.57143,-13.57143 0,-7.495289 6.07614,-13.571425 13.57143,-13.571425 7.4953,0 13.57143,6.076136 13.57143,13.571425 z"
sodipodi:ry="13.571428"
sodipodi:rx="13.571428"
sodipodi:cy="102.42857"
sodipodi:cx="212.14285"
id="path5729"
style="fill:#0000ff;fill-opacity:1;fill-rule:nonzero;stroke:#0000ff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<flowRoot
xml:space="preserve"
id="flowRoot5731"
style="font-size:72px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:url(#radialGradient7191);fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:Bitstream Vera Sans Bold;stroke-width:0.70352161999999996;stroke-miterlimit:4;stroke-dasharray:none;filter:url(#filter7823)"
transform="matrix(1.2,0,0,1.6836967,-25.658203,708.84411)"><flowRegion
id="flowRegion5733"
style="fill:url(#radialGradient7195);fill-opacity:1"><rect
id="rect5735"
width="145"
height="120"
x="55"
y="81"
style="font-size:72px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:url(#radialGradient7193);fill-opacity:1;font-family:DejaVu Sans;-inkscape-font-specification:Bitstream Vera Sans Bold;stroke-width:0.70352162;stroke-miterlimit:4;stroke-dasharray:none"
ry="0" /></flowRegion><flowPara
id="flowPara5737"
style="font-weight:bold;fill:url(#radialGradient7197);fill-opacity:1;-inkscape-font-specification:Bitstream Vera Sans Bold;stroke-width:0.70352162;stroke-miterlimit:4;stroke-dasharray:none">MB</flowPara></flowRoot> </g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

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