You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.2 KiB
82 lines
2.2 KiB
15 years ago
|
/*
|
||
|
* This file is part of the KDE libraries
|
||
13 years ago
|
* Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
|
||
15 years ago
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License version 2 as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This library is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
**/
|
||
|
|
||
|
#include "printpart.h"
|
||
|
|
||
13 years ago
|
#include <tdeprint/kmmainview.h>
|
||
|
#include <tdeprint/kiconselectaction.h>
|
||
15 years ago
|
#include <kaction.h>
|
||
|
#include <klocale.h>
|
||
|
#include <kinstance.h>
|
||
|
#include <kiconloader.h>
|
||
|
#include <kaboutdata.h>
|
||
|
#include <kdebug.h>
|
||
|
#include <kparts/genericfactory.h>
|
||
15 years ago
|
#include <tqwidget.h>
|
||
15 years ago
|
|
||
|
typedef KParts::GenericFactory<PrintPart> PrintPartFactory;
|
||
13 years ago
|
K_EXPORT_COMPONENT_FACTORY( libtdeprint_part, PrintPartFactory )
|
||
15 years ago
|
|
||
14 years ago
|
PrintPart::PrintPart(TQWidget *parentWidget, const char * /*widgetName*/ ,
|
||
15 years ago
|
TQObject *parent, const char *name,
|
||
|
const TQStringList & /*args*/ )
|
||
15 years ago
|
: KParts::ReadOnlyPart(parent, name)
|
||
|
{
|
||
|
setInstance(PrintPartFactory::instance());
|
||
13 years ago
|
instance()->iconLoader()->addAppDir("tdeprint");
|
||
15 years ago
|
m_extension = new PrintPartExtension(this);
|
||
|
|
||
14 years ago
|
m_view = new KMMainView(parentWidget, "MainView", actionCollection());
|
||
14 years ago
|
m_view->setFocusPolicy(TQ_ClickFocus);
|
||
15 years ago
|
m_view->enableToolbar(false);
|
||
|
setWidget(m_view);
|
||
|
|
||
|
initActions();
|
||
|
}
|
||
|
|
||
|
PrintPart::~PrintPart()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
KAboutData *PrintPart::createAboutData()
|
||
|
{
|
||
13 years ago
|
return new KAboutData(I18N_NOOP("tdeprint_part"), I18N_NOOP("A Konqueror Plugin for Print Management"), "0.1");
|
||
15 years ago
|
}
|
||
|
|
||
|
bool PrintPart::openFile()
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
void PrintPart::initActions()
|
||
|
{
|
||
13 years ago
|
setXMLFile("tdeprint_part.rc");
|
||
15 years ago
|
}
|
||
|
|
||
|
PrintPartExtension::PrintPartExtension(PrintPart *parent)
|
||
|
: KParts::BrowserExtension(parent, "PrintPartExtension")
|
||
|
{
|
||
|
}
|
||
|
|
||
|
PrintPartExtension::~PrintPartExtension()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
#include "printpart.moc"
|