File indexing completed on 2024-05-19 05:21:24

0001 /*
0002   This file is part of the KDE Kontact.
0003 
0004   SPDX-FileCopyrightText: 2003 Cornelius Schumacher <schumacher@kde.org>
0005   SPDX-FileCopyrightText: 2008 Rafael Fernández López <ereslibre@kde.org>
0006 
0007   SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include <QWidget>
0012 
0013 namespace KontactInterface
0014 {
0015 class Core;
0016 class Plugin;
0017 }
0018 
0019 namespace Kontact
0020 {
0021 class SidePaneBase : public QWidget
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit SidePaneBase(KontactInterface::Core *core, QWidget *parent);
0027     ~SidePaneBase() override;
0028 
0029     virtual void setCurrentPlugin(const QString &) = 0;
0030 
0031 Q_SIGNALS:
0032     void pluginSelected(KontactInterface::Plugin *);
0033 
0034 public Q_SLOTS:
0035     /**
0036       This method is called by the core whenever the count
0037       of plugins has changed.
0038      */
0039     virtual void updatePlugins() = 0;
0040 
0041 protected:
0042     KontactInterface::Core *core() const;
0043 
0044 private:
0045     KontactInterface::Core *const mCore;
0046 };
0047 }