parts/regexptest/regexptestpart.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
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
00024
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"
This file is part of the documentation for KDevelop Version 3.0.4.