updatePixmap();
}
-QPoint SmallRuler::zone()
+QPoint SmallRuler::zone() const
{
return QPoint(m_zoneStart, m_zoneEnd);
}
void setZone(int start, int end);
void setZoneStart();
void setZoneEnd();
- QPoint zone();
+ QPoint zone() const;
void setMarkers(const QList < CommentedTime >& list);
void updatePalette();
void refreshRuler();
bool newMessage = false;
// Get the next message from the queue, unless the current one needs to be confirmed
- if (m_messageQueue.size() > 0) {
+ if (!m_messageQueue.isEmpty()) {
if (!m_currentMessage.needsConfirmation()) {
}
// If the queue is empty, add a default (empty) message
- if (m_messageQueue.size() == 0 && m_currentMessage.type != DefaultMessage) {
+ if (m_messageQueue.isEmpty() && m_currentMessage.type != DefaultMessage) {
m_messageQueue.push_back(StatusBarMessageItem());
}
// Start a new timer, unless the current message still needs to be confirmed
- if (m_messageQueue.size() > 0) {
+ if (!m_messageQueue.isEmpty()) {
if (!m_currentMessage.needsConfirmation()) {
QTransform TitleDocument::stringToTransform(const QString& s)
{
- QStringList l = s.split(',');
+ QStringList l = s.split(QLatin1Char(','));
if (l.size() < 9)
return QTransform();
return QTransform(
// scale the view so that the title widget is not too big at startup
graphicsView->scale(.5, .5);
- if (!url.isEmpty()) loadTitle(url);
- else {
+ if (!url.isEmpty()) {
+ loadTitle(url);
+ } else {
prepareTools(NULL);
slotTextTool();
QTimer::singleShot(200, this, SLOT(slotAdjustZoom()));
QString item = templateBox->itemData(index).toString();
if (!item.isEmpty()) {
if (lastDocumentHash != QCryptographicHash::hash(xml().toString().toAscii(), QCryptographicHash::Md5).toHex()) {
- if (KMessageBox::questionYesNo(this, i18n("Do you really want to load a new template? Changes in this title will be lost!")) == KMessageBox::No) return;
+ if (KMessageBox::questionYesNo(this, i18n("Do you really want to load a new template? Changes in this title will be lost!")) == KMessageBox::No)
+ return;
}
loadTitle(item);
zUp->setEnabled(false);
zDown->setEnabled(false);
}
-
-
}
-
}
void TitleWidget::slotValueChanged(int type)
void TitleWidget::rectChanged()
{
QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
- int i;
- for (i = 0; i < l.length(); ++i) {
+ for (int i = 0; i < l.length(); ++i) {
if (l.at(i)->type() == RECTITEM && !settingUp) {
QGraphicsRectItem *rec = static_cast<QGraphicsRectItem *>(l.at(i));
QColor f = rectFColor->color();