* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef TOPICBUTTON_H
-#define TOPICBUTTON_H
+#ifndef TOPICLABEL_H
+#define TOPICLABEL_H
#include <QSize>
-#include <QAbstractButton>
+#include <QFrame>
#include "uistyle.h"
-class TopicButton : public QAbstractButton {
+class TopicLabel : public QFrame {
Q_OBJECT
public:
- TopicButton(QWidget *parent = 0);
+ TopicLabel(QWidget *parent = 0);
- void setAndStyleText(const QString &text);
+ void setText(const QString &text);
protected:
virtual void paintEvent(QPaintEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void mouseDoubleClickEvent(QMouseEvent *event);
+
private:
#ifndef SPUTDEV
UiStyle::StyledText styledContents;
#endif
+ QString _text;
QSize _sizeHint;
+
+ int offset;
+ int dragStartX;
+ bool dragMode;
+
+ QList<int> textPartOffset; // needed for location url positions
};
#endif