X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtopia%2Ftopicbar.h;fp=src%2Fqtopia%2Ftopicbar.h;h=23afb1d6339828fc7e66a3e3a61cc3dd3175ed62;hb=4e9a619ab2a22ce3c933fbb36122632debfd415a;hp=0000000000000000000000000000000000000000;hpb=a762b470185f27dbca6d75e58a29e3a055b2969c;p=quassel.git diff --git a/src/qtopia/topicbar.h b/src/qtopia/topicbar.h new file mode 100644 index 00000000..23afb1d6 --- /dev/null +++ b/src/qtopia/topicbar.h @@ -0,0 +1,60 @@ +/*************************************************************************** + * Copyright (C) 2005-07 by The Quassel IRC Development Team * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _TOPICBAR_H_ +#define _TOPICBAR_H_ + +#include +#include + +#include + +class QPixmap; +class QTimer; + +class TopicBar : public QPushButton { + Q_OBJECT + + public: + TopicBar(QWidget *parent = 0); + ~TopicBar(); + + public slots: + void setContents(QString text, bool oneshot = true); + + protected: + virtual void paintEvent(QPaintEvent * event); + + private slots: + void updateOffset(); + + private: + QTimer *timer; + int offset; + int fillTextStart, secondTextStart; + QString text; + QString fillText; + QFont topicFont; + int frameWidth; + bool oneshot; +}; + + +#endif