Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_elided_label.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_ELIDED_LABEL_H
8#define __KIS_ELIDED_LABEL_H
9
10#include <QScopedPointer>
11#include <QLabel>
12
13#include "kritaui_export.h"
14
15
23class KRITAUI_EXPORT KisElidedLabel : public QLabel
24{
25public:
26 KisElidedLabel(const QString &text, Qt::TextElideMode mode, QWidget *parent = 0);
27 ~KisElidedLabel() override;
28
29 void setLongText(const QString &text);
30
31protected:
32 void resizeEvent(QResizeEvent *event) override;
33
34private:
35 void updateText();
36 using QLabel::setText;
37
38private:
39 struct Private;
40 const QScopedPointer<Private> m_d;
41};
42
43#endif /* __KIS_ELIDED_LABEL_H */
const QScopedPointer< Private > m_d