diff options
Diffstat (limited to 'Swift/QtUI/QtElidingLabel.h')
-rw-r--r-- | Swift/QtUI/QtElidingLabel.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Swift/QtUI/QtElidingLabel.h b/Swift/QtUI/QtElidingLabel.h new file mode 100644 index 0000000..589d6f6 --- /dev/null +++ b/Swift/QtUI/QtElidingLabel.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <QLabel> + +namespace Swift { + class QtElidingLabel : public QLabel { + Q_OBJECT + public: + QtElidingLabel(QWidget* parent = NULL, Qt::WindowFlags f = 0); + QtElidingLabel(const QString &text, QWidget* parent = NULL, Qt::WindowFlags f = 0); + virtual ~QtElidingLabel(); + + virtual void paintEvent(QPaintEvent* event); + private: + void setSizes(); + }; +} |