diff options
Diffstat (limited to 'src/gui/ratingwidget.cpp')
-rw-r--r-- | src/gui/ratingwidget.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/ratingwidget.cpp b/src/gui/ratingwidget.cpp index ec5d717..a35c3fa 100644 --- a/src/gui/ratingwidget.cpp +++ b/src/gui/ratingwidget.cpp @@ -20,7 +20,7 @@ #include <kiconloader.h> #include <tqintdict.h> -#include <tqlayout.h> +#include <layout.h> namespace { static const int RATING_WIDGET_MAX_ICONS = 10; // same as in Field::ratingValues() @@ -43,7 +43,7 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) { return *pixmaps[n]; } - TQString picName = TQString::tqfromLatin1("stars%1").tqarg(n); + TQString picName = TQString::fromLatin1("stars%1").arg(n); TQPixmap* pix = new TQPixmap(UserIcon(picName)); pixmaps.insert(n, pix); return *pix; @@ -51,8 +51,8 @@ const TQPixmap& RatingWidget::pixmap(const TQString& value_) { RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* parent_, const char* name_/*=0*/) : TQHBox(parent_, name_), m_field(field_), m_currIndex(-1) { - m_pixOn = UserIcon(TQString::tqfromLatin1("star_on")); - m_pixOff = UserIcon(TQString::tqfromLatin1("star_off")); + m_pixOn = UserIcon(TQString::fromLatin1("star_on")); + m_pixOff = UserIcon(TQString::fromLatin1("star_off")); setSpacing(0); // find maximum width and height @@ -65,7 +65,7 @@ RatingWidget::RatingWidget(Data::FieldPtr field_, TQWidget* parent_, const char* } init(); - TQBoxLayout* l = dynamic_cast<TQBoxLayout*>(tqlayout()); + TQBoxLayout* l = dynamic_cast<TQBoxLayout*>(layout()); if(l) { l->addStretch(1); } @@ -86,8 +86,8 @@ void RatingWidget::init() { void RatingWidget::updateBounds() { bool ok; // not used; - m_min = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("minimum")), &ok); - m_max = Tellico::toUInt(m_field->property(TQString::tqfromLatin1("maximum")), &ok); + m_min = Tellico::toUInt(m_field->property(TQString::fromLatin1("minimum")), &ok); + m_max = Tellico::toUInt(m_field->property(TQString::fromLatin1("maximum")), &ok); if(m_max > RATING_WIDGET_MAX_ICONS) { myDebug() << "RatingWidget::updateBounds() - max is too high: " << m_max << endl; m_max = RATING_WIDGET_MAX_ICONS; @@ -116,7 +116,7 @@ void RatingWidget::mousePressEvent(TQMouseEvent* event_) { } int idx; - TQWidget* child = tqchildAt(event_->pos()); + TQWidget* child = childAt(event_->pos()); if(child) { idx = m_widgets.findRef(static_cast<TQLabel*>(child)); // if the widget is clicked beyond the maximum value, clear it |