File indexing completed on 2024-04-21 04:50:15

0001 /* 
0002 
0003     SPDX-FileCopyrightText: 2006-2008 Sebastian Trueg <trueg@k3b.org>
0004     SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org>
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef _K3B_THEMED_HEADER_H_
0009 #define _K3B_THEMED_HEADER_H_
0010 
0011 #include "k3bthememanager.h"
0012 
0013 #include <QFrame>
0014 
0015 namespace K3b {
0016     class TitleLabel;
0017 }
0018 class QLabel;
0019 
0020 namespace K3b {
0021 class ThemedHeader : public QFrame
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit ThemedHeader( QWidget* parent = 0 );
0027     ThemedHeader( const QString& title, const QString& subtitle, QWidget* parent = 0 );
0028     ~ThemedHeader() override;
0029 
0030 public Q_SLOTS:
0031     void setTitle( const QString& title, const QString& subtitle = QString() );
0032     void setSubTitle( const QString& subtitle );
0033     void setAlignment( Qt::Alignment alignment );
0034     void setLeftPixmap( Theme::PixmapType );
0035     void setRightPixmap( Theme::PixmapType );
0036 
0037 protected:
0038     bool event( QEvent* event ) override;
0039 
0040 private Q_SLOTS:
0041     void slotThemeChanged();
0042 
0043 private:
0044     void init();
0045 
0046     TitleLabel* m_titleLabel;
0047     QLabel* m_leftLabel;
0048     QLabel* m_rightLabel;
0049     Theme::PixmapType m_leftPix;
0050     Theme::PixmapType m_rightPix;
0051 };
0052 }
0053 
0054 #endif