drop another part of pornography in gi

more intuinitve configuration interface in graphicalitem. Improve code
for the future references (in case if new color type will be added).
Change X-AW-*Color values to ones with prefixes (added autoconversion
from old-version api)
This commit is contained in:
Evgenii Alekseev 2016-04-12 14:22:19 +03:00
parent 354fd3cd0c
commit a3e7a84b92
11 changed files with 157 additions and 198 deletions

View File

@ -74,14 +74,18 @@ bool AWUpdateHelper::checkVersion()
// update version // update version
settings.setValue(QString("Version"), QString(VERSION)); settings.setValue(QString("Version"), QString(VERSION));
settings.sync(); settings.sync();
qCInfo(LOG_AW) << "Found version" << version << "actual one is"
<< m_foundVersion;
qCInfo(LOG_AW) << "Found version" << version << "actual one is" << VERSION; if ((version != m_foundVersion) && (!QString(CHANGELOG).isEmpty())) {
if (version != QVersionNumber::fromString(VERSION)) {
genMessageBox(i18n("Changelog of %1", QString(VERSION)), genMessageBox(i18n("Changelog of %1", QString(VERSION)),
QString(CHANGELOG).replace(QChar('@'), QChar('\n')), QString(CHANGELOG).replace(QChar('@'), QChar('\n')),
QMessageBox::Ok) QMessageBox::Ok)
->open(); ->open();
return true; return true;
} else if (version != m_foundVersion) {
qCWarning(LOG_AW) << "No changelog information provided";
return true;
} else { } else {
qCInfo(LOG_AW) << "No need to update version"; qCInfo(LOG_AW) << "No need to update version";
} }

View File

@ -6,11 +6,11 @@ X-AW-Value=bat
X-AW-Custom=false X-AW-Custom=false
X-AW-Max=100.0 X-AW-Max=100.0
X-AW-Min=0.0 X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255" X-AW-ActiveColor="color://0,0,0,255"
X-AW-InactiveColor="255,255,255,255" X-AW-InactiveColor="color://255,255,255,255"
X-AW-Type=Horizontal X-AW-Type=Horizontal
X-AW-Direction=LeftToRight X-AW-Direction=LeftToRight
X-AW-Height=25 X-AW-Height=25
X-AW-Width=100 X-AW-Width=100
X-AW-ApiVersion=4 X-AW-ApiVersion=5
X-AW-Number=3 X-AW-Number=3

View File

@ -6,11 +6,11 @@ X-AW-Value=cpu
X-AW-Custom=false X-AW-Custom=false
X-AW-Max=100.0 X-AW-Max=100.0
X-AW-Min=0.0 X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255" X-AW-ActiveColor="color://0,0,0,255"
X-AW-InactiveColor="255,255,255,255" X-AW-InactiveColor="color://255,255,255,255"
X-AW-Type=Horizontal X-AW-Type=Horizontal
X-AW-Direction=LeftToRight X-AW-Direction=LeftToRight
X-AW-Height=25 X-AW-Height=25
X-AW-Width=100 X-AW-Width=100
X-AW-ApiVersion=4 X-AW-ApiVersion=5
X-AW-Number=0 X-AW-Number=0

View File

@ -6,11 +6,11 @@ X-AW-Value=mem
X-AW-Custom=false X-AW-Custom=false
X-AW-Max=100.0 X-AW-Max=100.0
X-AW-Min=0.0 X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255" X-AW-ActiveColor="color://0,0,0,255"
X-AW-InactiveColor="255,255,255,255" X-AW-InactiveColor="color://255,255,255,255"
X-AW-Type=Horizontal X-AW-Type=Horizontal
X-AW-Direction=LeftToRight X-AW-Direction=LeftToRight
X-AW-Height=25 X-AW-Height=25
X-AW-Width=100 X-AW-Width=100
X-AW-ApiVersion=4 X-AW-ApiVersion=5
X-AW-Number=1 X-AW-Number=1

View File

@ -6,11 +6,11 @@ X-AW-Value=swap
X-AW-Custom=false X-AW-Custom=false
X-AW-Max=100.0 X-AW-Max=100.0
X-AW-Min=0.0 X-AW-Min=0.0
X-AW-ActiveColor="0,0,0,255" X-AW-ActiveColor="color://0,0,0,255"
X-AW-InactiveColor="255,255,255,255" X-AW-InactiveColor="color://255,255,255,255"
X-AW-Type=Horizontal X-AW-Type=Horizontal
X-AW-Direction=LeftToRight X-AW-Direction=LeftToRight
X-AW-Height=25 X-AW-Height=25
X-AW-Width=100 X-AW-Width=100
X-AW-ApiVersion=4 X-AW-ApiVersion=5
X-AW-Number=2 X-AW-Number=2

View File

@ -50,9 +50,9 @@ GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName,
SLOT(changeValue(int))); SLOT(changeValue(int)));
connect(ui->comboBox_type, SIGNAL(currentIndexChanged(int)), this, connect(ui->comboBox_type, SIGNAL(currentIndexChanged(int)), this,
SLOT(changeCountState(int))); SLOT(changeCountState(int)));
connect(ui->pushButton_activeColor, SIGNAL(clicked()), this, connect(ui->toolButton_activeColor, SIGNAL(clicked()), this,
SLOT(changeColor())); SLOT(changeColor()));
connect(ui->pushButton_inactiveColor, SIGNAL(clicked()), this, connect(ui->toolButton_inactiveColor, SIGNAL(clicked()), this,
SLOT(changeColor())); SLOT(changeColor()));
} }
@ -415,9 +415,18 @@ void GraphicalItem::readConfiguration()
.toString()); .toString());
setHeight(settings.value(QString("X-AW-Height"), m_height).toInt()); setHeight(settings.value(QString("X-AW-Height"), m_height).toInt());
setWidth(settings.value(QString("X-AW-Width"), m_width).toInt()); setWidth(settings.value(QString("X-AW-Width"), m_width).toInt());
// api == 2 // api == 5
if (apiVersion() < 2) if (apiVersion() < 5) {
setNumber(bar().remove(QString("bar")).toInt()); QString prefix;
prefix = m_activeColor.startsWith(QString("/"))
? QString("file://%1")
: QString("color://%1");
m_activeColor = prefix.arg(m_activeColor);
prefix = m_inactiveColor.startsWith(QString("/"))
? QString("file://%1")
: QString("color://%1");
m_inactiveColor = prefix.arg(m_inactiveColor);
}
settings.endGroup(); settings.endGroup();
} }
@ -449,12 +458,16 @@ int GraphicalItem::showConfiguration(const QVariant args)
ui->doubleSpinBox_max->setValue(m_maxValue); ui->doubleSpinBox_max->setValue(m_maxValue);
ui->doubleSpinBox_min->setValue(m_minValue); ui->doubleSpinBox_min->setValue(m_minValue);
ui->spinBox_count->setValue(m_count); ui->spinBox_count->setValue(m_count);
ui->checkBox_activeCheck->setChecked( if (m_helper->isColor(m_activeColor))
m_activeColor.startsWith(QString("/"))); ui->comboBox_activeImageType->setCurrentIndex(0);
ui->pushButton_activeColor->setText(m_activeColor); else
ui->checkBox_inactiveCheck->setChecked( ui->comboBox_activeImageType->setCurrentIndex(1);
m_inactiveColor.startsWith(QString("/"))); ui->lineEdit_activeColor->setText(m_activeColor);
ui->pushButton_inactiveColor->setText(m_inactiveColor); if (m_helper->isColor(m_inactiveColor))
ui->comboBox_inactiveImageType->setCurrentIndex(0);
else
ui->comboBox_inactiveImageType->setCurrentIndex(1);
ui->lineEdit_inactiveColor->setText(m_inactiveColor);
ui->comboBox_type->setCurrentIndex(static_cast<int>(m_type)); ui->comboBox_type->setCurrentIndex(static_cast<int>(m_type));
ui->comboBox_direction->setCurrentIndex(static_cast<int>(m_direction)); ui->comboBox_direction->setCurrentIndex(static_cast<int>(m_direction));
ui->spinBox_height->setValue(m_height); ui->spinBox_height->setValue(m_height);
@ -477,8 +490,8 @@ int GraphicalItem::showConfiguration(const QVariant args)
: ui->comboBox_value->currentText()); : ui->comboBox_value->currentText());
setMaxValue(ui->doubleSpinBox_max->value()); setMaxValue(ui->doubleSpinBox_max->value());
setMinValue(ui->doubleSpinBox_min->value()); setMinValue(ui->doubleSpinBox_min->value());
setActiveColor(ui->pushButton_activeColor->text().remove(QChar('&'))); setActiveColor(ui->lineEdit_activeColor->text());
setInactiveColor(ui->pushButton_inactiveColor->text().remove(QChar('&'))); setInactiveColor(ui->lineEdit_inactiveColor->text());
setStrType(ui->comboBox_type->currentText()); setStrType(ui->comboBox_type->currentText());
setStrDirection(ui->comboBox_direction->currentText()); setStrDirection(ui->comboBox_direction->currentText());
setHeight(ui->spinBox_height->value()); setHeight(ui->spinBox_height->value());
@ -518,22 +531,20 @@ void GraphicalItem::writeConfiguration() const
void GraphicalItem::changeColor() void GraphicalItem::changeColor()
{ {
QString outputColor; QLineEdit *lineEdit;
bool imageRequired = sender() == ui->pushButton_activeColor int state;
? ui->checkBox_activeCheck->isChecked() if (sender() == ui->toolButton_activeColor) {
: ui->checkBox_inactiveCheck->isChecked(); lineEdit = ui->lineEdit_activeColor;
state = ui->comboBox_activeImageType->currentIndex();
if (imageRequired) {
QString path = static_cast<QPushButton *>(sender())->text();
QString directory = QFileInfo(path).absolutePath();
outputColor = QFileDialog::getOpenFileName(
this, tr("Select path"), directory,
tr("Images (*.png *.bpm *.jpg);;All files (*.*)"));
qCInfo(LOG_LIB) << "Selected path" << outputColor;
} else { } else {
QColor color = m_helper->stringToColor( lineEdit = ui->lineEdit_inactiveColor;
(static_cast<QPushButton *>(sender()))->text()); state = ui->comboBox_inactiveImageType->currentIndex();
}
qCInfo(LOG_LIB) << "Using state" << state << "and lineEdit" << lineEdit;
QString outputColor;
if (state == 0) {
QColor color = m_helper->stringToColor(lineEdit->text());
QColor newColor = QColorDialog::getColor( QColor newColor = QColorDialog::getColor(
color, this, tr("Select color"), QColorDialog::ShowAlphaChannel); color, this, tr("Select color"), QColorDialog::ShowAlphaChannel);
if (!newColor.isValid()) if (!newColor.isValid())
@ -546,10 +557,23 @@ void GraphicalItem::changeColor()
colorText.append(QString("%1").arg(newColor.blue())); colorText.append(QString("%1").arg(newColor.blue()));
colorText.append(QString("%1").arg(newColor.alpha())); colorText.append(QString("%1").arg(newColor.alpha()));
outputColor = colorText.join(QChar(',')); outputColor = QString("color://%1").arg(colorText.join(QChar(',')));
} else if (state == 1) {
QString path = lineEdit->text();
QString directory = QFileInfo(path).absolutePath();
outputColor = QFileDialog::getOpenFileUrl(
this, tr("Select path"), directory,
tr("Images (*.png *.bpm *.jpg);;All files (*.*)"))
.toString();
qCInfo(LOG_LIB) << "Selected path" << outputColor;
} }
return static_cast<QPushButton *>(sender())->setText(outputColor); if (outputColor.isEmpty()) {
qCWarning(LOG_LIB) << "Empty color selected, skipping";
return;
}
return lineEdit->setText(outputColor);
} }
@ -602,12 +626,17 @@ void GraphicalItem::translate()
ui->label_customValue->setText(i18n("Value")); ui->label_customValue->setText(i18n("Value"));
ui->label_max->setText(i18n("Max value")); ui->label_max->setText(i18n("Max value"));
ui->label_min->setText(i18n("Min value")); ui->label_min->setText(i18n("Min value"));
ui->checkBox_activeCheck->setText(i18n("Use image for active")); ui->label_activeImageType->setText(i18n("Active image type"));
ui->label_activeColor->setText(i18n("Active color")); ui->label_inactiveImageType->setText(i18n("Inctive image type"));
ui->checkBox_inactiveCheck->setText(i18n("Use image for inactive"));
ui->label_inactiveColor->setText(i18n("Inactive color"));
ui->label_type->setText(i18n("Type")); ui->label_type->setText(i18n("Type"));
ui->label_direction->setText(i18n("Direction")); ui->label_direction->setText(i18n("Direction"));
ui->label_height->setText(i18n("Height")); ui->label_height->setText(i18n("Height"));
ui->label_width->setText(i18n("Width")); ui->label_width->setText(i18n("Width"));
ui->comboBox_activeImageType->clear();
ui->comboBox_activeImageType->addItem(i18n("color"));
ui->comboBox_activeImageType->addItem(i18n("image"));
ui->comboBox_inactiveImageType->clear();
ui->comboBox_inactiveImageType->addItem(i18n("color"));
ui->comboBox_inactiveImageType->addItem(i18n("image"));
} }

View File

@ -76,10 +76,11 @@ public:
QString uniq() const; QString uniq() const;
// set methods // set methods
void setBar(const QString _bar = QString("cpu")); void setBar(const QString _bar = QString("cpu"));
void setActiveColor(const QString _color = QString("0,0,0,130")); void setActiveColor(const QString _color = QString("color://0,0,0,130"));
void setCount(const int _count = 100); void setCount(const int _count = 100);
void setCustom(const bool _custom = false); void setCustom(const bool _custom = false);
void setInactiveColor(const QString _color = QString("255,255,255,130")); void setInactiveColor(const QString _color
= QString("color://255,255,255,130"));
void setMinValue(const float _value = 0.0); void setMinValue(const float _value = 0.0);
void setMaxValue(const float _value = 100.0); void setMaxValue(const float _value = 100.0);
void setType(const Type _type = Horizontal); void setType(const Type _type = Horizontal);
@ -112,8 +113,8 @@ private:
QString m_bar = QString("cpu"); QString m_bar = QString("cpu");
int m_count = 100; int m_count = 100;
bool m_custom = false; bool m_custom = false;
QString m_activeColor; QString m_activeColor = QString("color://0,0,0,130");
QString m_inactiveColor; QString m_inactiveColor = QString("color://255,255,255,130");
float m_minValue = 0.0f; float m_minValue = 0.0f;
float m_maxValue = 100.0f; float m_maxValue = 100.0f;
Type m_type = Horizontal; Type m_type = Horizontal;

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>416</width> <width>416</width>
<height>537</height> <height>540</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -100,16 +100,7 @@
<item> <item>
<widget class="QWidget" name="widget_value" native="true"> <widget class="QWidget" name="widget_value" native="true">
<layout class="QHBoxLayout" name="layout_value"> <layout class="QHBoxLayout" name="layout_value">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -135,16 +126,7 @@
<item> <item>
<widget class="QWidget" name="widget_customValue" native="true"> <widget class="QWidget" name="widget_customValue" native="true">
<layout class="QHBoxLayout" name="layout_customValue"> <layout class="QHBoxLayout" name="layout_customValue">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -219,134 +201,74 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layout_activeCheck"> <layout class="QHBoxLayout" name="layout_activeImageType">
<item> <item>
<spacer name="spacer_activeCheck"> <widget class="QLabel" name="label_activeImageType">
<property name="orientation"> <property name="text">
<enum>Qt::Horizontal</enum> <string>Active image type</string>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="alignment">
<size> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<width>40</width>
<height>20</height>
</size>
</property> </property>
</spacer> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkBox_activeCheck"> <widget class="QComboBox" name="comboBox_activeImageType"/>
<property name="sizePolicy"> </item>
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> </layout>
<horstretch>0</horstretch> </item>
<verstretch>0</verstretch> <item>
</sizepolicy> <layout class="QHBoxLayout" name="layout_activeColorButton">
<item>
<widget class="QLineEdit" name="lineEdit_activeColor">
<property name="readOnly">
<bool>true</bool>
</property> </property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toolButton_activeColor">
<property name="text"> <property name="text">
<string>Use image for active</string> <string>...</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget_activeColor" native="true"> <layout class="QHBoxLayout" name="layout_inactiveImageType">
<layout class="QHBoxLayout" name="layout_activeColor">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_activeColor">
<property name="text">
<string>Active color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_activeColor">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_inactiveCheck">
<item> <item>
<spacer name="spacer_inactiveCheck"> <widget class="QLabel" name="label_inactiveImageType">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_inactiveCheck">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text"> <property name="text">
<string>Use image for inactive</string> <string>Inactive image type</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QComboBox" name="comboBox_inactiveImageType"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget_inactiveColor" native="true"> <layout class="QHBoxLayout" name="layout_inactiveColorButton">
<layout class="QHBoxLayout" name="layout_inactiveColor"> <item>
<property name="leftMargin"> <widget class="QLineEdit" name="lineEdit_inactiveColor">
<number>0</number> <property name="readOnly">
</property> <bool>true</bool>
<property name="topMargin"> </property>
<number>0</number> </widget>
</property> </item>
<property name="rightMargin"> <item>
<number>0</number> <widget class="QToolButton" name="toolButton_inactiveColor">
</property> <property name="text">
<property name="bottomMargin"> <string>...</string>
<number>0</number> </property>
</property> </widget>
<item> </item>
<widget class="QLabel" name="label_inactiveColor"> </layout>
<property name="text">
<string>Inactive color</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_inactiveColor">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layout_type"> <layout class="QHBoxLayout" name="layout_type">
@ -417,16 +339,7 @@
<item> <item>
<widget class="QWidget" name="widget_count" native="true"> <widget class="QWidget" name="widget_count" native="true">
<layout class="QHBoxLayout" name="layout_count"> <layout class="QHBoxLayout" name="layout_count">
<property name="leftMargin"> <property name="margin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>

View File

@ -50,7 +50,9 @@ void GraphicalItemHelper::setParameters(const QString active,
// put images to pens if any otherwise set pen colors // put images to pens if any otherwise set pen colors
// Images resize to content here as well // Images resize to content here as well
if (active.startsWith(QString("/"))) { if (isColor(active)) {
m_activePen.setColor(stringToColor(active));
} else {
qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << active; qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << active;
QPixmap pixmap = QPixmap(active); QPixmap pixmap = QPixmap(active);
if (pixmap.isNull()) { if (pixmap.isNull()) {
@ -59,10 +61,10 @@ void GraphicalItemHelper::setParameters(const QString active,
} else { } else {
m_activePen.setBrush(QBrush(pixmap.scaled(width, height))); m_activePen.setBrush(QBrush(pixmap.scaled(width, height)));
} }
} else {
m_activePen.setColor(stringToColor(active));
} }
if (inactive.startsWith(QString("/"))) { if (isColor(inactive)) {
m_inactivePen.setColor(stringToColor(inactive));
} else {
qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << inactive; qCInfo(LOG_LIB) << "Found path, trying to load Pixmap from" << inactive;
QPixmap pixmap = QPixmap(inactive); QPixmap pixmap = QPixmap(inactive);
if (pixmap.isNull()) { if (pixmap.isNull()) {
@ -71,8 +73,6 @@ void GraphicalItemHelper::setParameters(const QString active,
} else { } else {
m_inactivePen.setBrush(QBrush(pixmap.scaled(width, height))); m_inactivePen.setBrush(QBrush(pixmap.scaled(width, height)));
} }
} else {
m_inactivePen.setColor(stringToColor(inactive));
} }
m_width = width; m_width = width;
m_height = height; m_height = height;
@ -171,14 +171,25 @@ float GraphicalItemHelper::getPercents(const float &value, const float &min,
} }
bool GraphicalItemHelper::isColor(const QString &input)
{
qCDebug(LOG_LIB) << "Define input type in" << input;
return input.startsWith(QString("color://"));
}
QColor GraphicalItemHelper::stringToColor(const QString &color) QColor GraphicalItemHelper::stringToColor(const QString &color)
{ {
qCDebug(LOG_LIB) << "Color" << color; qCDebug(LOG_LIB) << "Color" << color;
QColor qColor;
QStringList listColor = color.split(QChar(',')); QStringList listColor = color.split(QChar(','));
while (listColor.count() < 4) while (listColor.count() < 4)
listColor.append(QString("0")); listColor.append(QString("0"));
// remove prefix
listColor[0].remove(QString("color://"));
// init color
QColor qColor;
qColor.setRed(listColor.at(0).toInt()); qColor.setRed(listColor.at(0).toInt());
qColor.setGreen(listColor.at(1).toInt()); qColor.setGreen(listColor.at(1).toInt());
qColor.setBlue(listColor.at(2).toInt()); qColor.setBlue(listColor.at(2).toInt());

View File

@ -41,6 +41,7 @@ public:
void paintVertical(const float &percent); void paintVertical(const float &percent);
// additional conversion methods // additional conversion methods
float getPercents(const float &value, const float &min, const float &max); float getPercents(const float &value, const float &min, const float &max);
bool isColor(const QString &input);
QColor stringToColor(const QString &color); QColor stringToColor(const QString &color);
private: private:

View File

@ -24,7 +24,7 @@
// configuraion // configuraion
// graphical items api version // graphical items api version
#define AWGIAPI 4 #define AWGIAPI 5
// extquotes api version // extquotes api version
#define AWEQAPI 3 #define AWEQAPI 3
// extscript api version // extscript api version