File indexing completed on 2024-10-06 04:25:58

0001 /*
0002     SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef _K3B_CONTENTS_VIEW_H_
0007 #define _K3B_CONTENTS_VIEW_H_
0008 
0009 #include "k3bthememanager.h"
0010 #include <QWidget>
0011 
0012 namespace K3b {
0013     class ThemedHeader;
0014 
0015     class ContentsView : public QWidget
0016     {
0017         Q_OBJECT
0018 
0019     public:
0020         ~ContentsView() override;
0021 
0022     protected:
0023         ContentsView( bool withHeader,
0024                       QWidget* parent = 0 );
0025 
0026         QWidget* mainWidget();
0027         void setMainWidget( QWidget* );
0028         void setTitle( const QString& title, const QString& subtitle = QString() );
0029         void setLeftPixmap( Theme::PixmapType );
0030         void setRightPixmap( Theme::PixmapType );
0031         
0032         /**
0033          * \return true if content view is a currently selected view
0034          */
0035         bool isActive() const { return m_active; }
0036         
0037     public Q_SLOTS:
0038         virtual void activate( bool active );
0039 
0040     private:
0041         ThemedHeader* m_header;
0042         QWidget* m_centerWidget;
0043         bool m_active;
0044     };
0045 }
0046 
0047 #endif