2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
11 #include <QResizeEvent>
12 #include "infodisplay.h"
13 #include "canvas/text.h"
15 class MessageItem
: public Canvas::Text
{
17 MessageItem(const QString
& text
, const QFont
& font
, Canvas::Abstract
* canvas
)
18 : Canvas::Text(text
, Qt::black
, font
,
19 Canvas::Text::HStart
, Canvas::Text::VCenter
,
23 InfoDisplay::InfoDisplay(Canvas::Abstract
* parent
)
24 : Canvas::Group(parent
) {
25 m_message
= new MessageItem("", QFont(), this);
26 m_message
->moveTo(QPoint(0, 0));
30 InfoDisplay::~InfoDisplay() {
34 void InfoDisplay::resizeEvent(QResizeEvent
* e
) {
35 // m_message->setSize(e->size());
38 void InfoDisplay::setMessage(const QString
& msg
) {
39 m_message
->setText(msg
);
42 void InfoDisplay::settingsChanged() {