KDevelop API Documentation

parts/regexptest/regexptestpart.cpp

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2001 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #include "regexptestpart.h" 00013 00014 #include <klocale.h> 00015 #include <kdevgenericfactory.h> 00016 #include <kaction.h> 00017 00018 #include "kdevcore.h" 00019 #include "regexptestdlg.h" 00020 00021 static const KAboutData data("kdevregexptest", I18N_NOOP("Debug Regular Expression..."), "1.0"); 00022 00023 //typedef KDevGenericFactory<CloserPart> CloserFactory; 00024 //K_EXPORT_COMPONENT_FACTORY( libkdevcloser, CloserFactory( &data ) ) 00025 00026 typedef KDevGenericFactory<RegexpTestPart> RegexpTestFactory; 00027 K_EXPORT_COMPONENT_FACTORY( libkdevregexptest, RegexpTestFactory( &data ) ) 00028 00029 RegexpTestPart::RegexpTestPart(QObject *parent, const char *name, const QStringList &) 00030 : KDevPlugin("RegExpTest", "regexptest", parent, name ? name : "RegexpTestPart") 00031 { 00032 setInstance(RegexpTestFactory::instance()); 00033 setXMLFile("kdevregexptest.rc"); 00034 00035 KAction *action; 00036 00037 action = new KAction( i18n("Debug Regular Expression..."), 0, 00038 this, SLOT(slotRegexpTest()), 00039 actionCollection(), "tools_regexptest" ); 00040 action->setToolTip(i18n("Debug regular expression")); 00041 action->setWhatsThis(i18n("<b>Debug regular expression</b><p>Allows to enter a regular expression " 00042 "and validate it. It is possible to check syntax of basic POSIX, extended POSIX " 00043 "regular expressions and also syntax allowed by QRegExp and KRegExp classes.")); 00044 00045 m_dialog = 0; 00046 } 00047 00048 00049 RegexpTestPart::~RegexpTestPart() 00050 { 00051 delete m_dialog; 00052 } 00053 00054 00055 void RegexpTestPart::slotRegexpTest() 00056 { 00057 if (!m_dialog) { 00058 m_dialog = new RegexpTestDialog(this); 00059 } 00060 00061 m_dialog->show(); 00062 } 00063 00064 00065 #include "regexptestpart.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:52 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003