[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Announcement: KRegExpEditor now available in kdelibs/kdesupport.
From:       blackie () kde ! org (Jesper K !  Pedersen)
Date:       2001-08-23 14:45:16
[Download RAW message or body]

Hi.

The last 1 1/2 year I've been working on a graphical editor for regular
expression. Finally I got it complete enough so that it is useful in
applications.

What is regular expressions?
============================
No, this is not the place to teach you regular expression. Still, try out
the demo (see below), that might give you a clue what it is.

What is KRegExpEditor
=====================
KRegExpEditor is basicly just a widget. A large one however. The widgets
resemble quite a lot a drawing tool.

From a programmers point of view this is just an alternative to a QLineEdit
for asking the user for a regular expression. From, a users point of view,
however, this is an good chance to use regular expressions without having
to learn some hard-to-remember ascii syntax.

Try a demo
==========
In kdeutils/regexptest there is a very small program that shows the widget
in action. To give you an expression of how easy it is to use this widget,
here is the program in its whole length:
  #include <kregexpeditor.h>
  #include <kapp.h>
  #include <kcmdlineargs.h>
  
  int main( int argc, char* argv[] )
  {
    KCmdLineArgs::init(argc, argv, "RegExp Example","","");
    KApplication myapp( argc, argv );
  
    KRegExpEditor *regexp = KRegExpEditor::createEditor(0);
    
    regexp->show();
    myapp.setMainWidget(regexp);
  
    return myapp.exec();
  }

For this program to work, you need to cvs update and compile
kdelibs/interfaces, kdeutils/kregexpeditor and of course kdeutils/regexptest

See some screen dumps.
======================
You can see some screen dumps of the test program at work at
http://www.blackie.dk/KDE/KRegExpEditor.

All the icons have not been drawn yet, so please bare over with my own drawing ;-)

What is required for it to work
===============================
To use the widget you must link your application with -lkregexpeditor. If
you have kdeutil installed then you will get this fancy graphical
editor. If not, then you will get a null pointer back from the call to
KRegExpEditor::createEditor, and it is then your responsibility to just
offer a lineedit to the user.

The idea behind this is that the widget is quite huge (takes several minute
on my dual PIII-800 to compile). Therefore it needed to be placed somewhere
else than kdelibs/kdebase still several programs in kdebase might use it if
available.

As a result an interface is located in kdelibs, and the actual
implementation is located in kdeutil.

Suggestions, comments, praises
==============================
This widget can of course still be made better so any suggestion are more
than welcome.

Kind Regards
Jesper <blackie@kde.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic