2
* tool_crop.cc -- Part of Krita
4
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
#include <kiconloader.h>
27
#include <kinstance.h>
28
#include <kmessagebox.h>
29
#include <kstandarddirs.h>
31
#include <kgenericfactory.h>
33
#include <kis_global.h>
34
#include <kis_types.h>
35
#include <kis_tool_registry.h>
36
#include <kis_factory.h>
39
#include "tool_crop.h"
40
#include "kis_tool_crop.h"
43
typedef KGenericFactory<ToolCrop> ToolCropFactory;
44
K_EXPORT_COMPONENT_FACTORY( kritatoolcrop, ToolCropFactory( "krita" ) )
47
ToolCrop::ToolCrop(QObject *parent, const char *name, const QStringList &)
48
: KParts::Plugin(parent, name)
50
setInstance(ToolCropFactory::instance());
52
kdDebug() << "Crop tool plugin. Class: "
55
<< parent -> className()
58
if ( parent->inherits("KisView") )
60
KisView * view = dynamic_cast<KisView *>(parent);
62
KisToolRegistry * r = view -> toolRegistry();
64
r -> add(new KisToolCropFactory(actionCollection()));
73
#include "tool_crop.moc"