File indexing completed on 2024-12-22 04:14:47

0001 /*
0002  *  SPDX-FileCopyrightText: 2011 Sven Langkamp <sven.langkamp@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #include "channeldocker.h"
0008 
0009 #include <stdlib.h>
0010 
0011 #include <QTimer>
0012 
0013 
0014 #include <kis_debug.h>
0015 #include <kpluginfactory.h>
0016 #include <klocalizedstring.h>
0017 
0018 #include <KoDockFactoryBase.h>
0019 
0020 #include "kis_config.h"
0021 #include "kis_cursor.h"
0022 #include "kis_global.h"
0023 #include "kis_types.h"
0024 #include "KisViewManager.h"
0025 
0026 #include "channeldocker_dock.h"
0027 #include <KoDockRegistry.h>
0028 
0029 K_PLUGIN_FACTORY_WITH_JSON(ChannelDockerPluginFactory, "krita_channeldocker.json", registerPlugin<ChannelDockerPlugin>();)
0030 
0031 class ChannelDockerDockFactory : public KoDockFactoryBase {
0032 public:
0033     ChannelDockerDockFactory()
0034     {
0035     }
0036 
0037     QString id() const override
0038     {
0039         return QString( "ChannelDocker" );
0040     }
0041 
0042     virtual Qt::DockWidgetArea defaultDockWidgetArea() const
0043     {
0044         return Qt::RightDockWidgetArea;
0045     }
0046 
0047     QDockWidget* createDockWidget() override
0048     {
0049         ChannelDockerDock * dockWidget = new ChannelDockerDock();
0050         
0051         dockWidget->setObjectName(id());
0052 
0053         return dockWidget;
0054     }
0055 
0056     DockPosition defaultDockPosition() const override
0057     {
0058         return DockMinimized;
0059     }
0060 private:
0061 
0062 
0063 };
0064 
0065 
0066 ChannelDockerPlugin::ChannelDockerPlugin(QObject *parent, const QVariantList &)
0067     : QObject(parent)
0068 {
0069     KoDockRegistry::instance()->add(new ChannelDockerDockFactory());
0070 }
0071 
0072 ChannelDockerPlugin::~ChannelDockerPlugin()
0073 {
0074 }
0075 
0076 #include "channeldocker.moc"