diff -r a5b53cc10436 -r 0b3a5bc4e8a8 config/versionguientry.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/versionguientry.cpp Sun Jun 07 19:55:06 2015 +0300 @@ -0,0 +1,72 @@ +#include +#include +#include "versionguientry.h" + +// +// ----------------------------------------------------------------------------- +// + +VersionGuiEntry::VersionGuiEntry (const QString& name, bool isRelease, + QLabel* label, QTableWidgetItem* pathItem) + : m_name (name), + m_isRelease (isRelease), + m_label (label), + m_pathItem (pathItem) +{ + updateStyleSheet(); +} + +// +// ----------------------------------------------------------------------------- +// + +void VersionGuiEntry::setRelease (bool a) +{ + m_isRelease = a; + updateStyleSheet(); +} + +// +// ----------------------------------------------------------------------------- +// + +void VersionGuiEntry::updateStyleSheet() +{ + m_label->setStyleSheet (m_isRelease ? "font-weight: bold" : ""); +} + +// +// ----------------------------------------------------------------------------- +// + +class QLabel* VersionGuiEntry::label() +{ + return m_label; +} + +// +// ----------------------------------------------------------------------------- +// + +class QTableWidgetItem* VersionGuiEntry::pathItem() +{ + return m_pathItem; +} + +// +// ----------------------------------------------------------------------------- +// + +const QString& VersionGuiEntry::name() +{ + return m_name; +} + +// +// ----------------------------------------------------------------------------- +// + +bool VersionGuiEntry::isRelease() +{ + return m_isRelease; +} \ No newline at end of file