From 79fd2b2bbd9f842ce3c84c67e3314033a9cceea4 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:18:06 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kregexpeditor/CMakeLists.txt | 2 +- kregexpeditor/KMultiFormListBox/CMakeLists.txt | 22 +- kregexpeditor/KMultiFormListBox/Makefile.am | 18 +- kregexpeditor/KMultiFormListBox/ccp.cpp | 2 +- .../kmultiformlistbox-multivisible.cpp | 305 --------------------- .../kmultiformlistbox-multivisible.h | 136 --------- .../KMultiFormListBox/kmultiformlistbox-shower.h | 53 ---- .../kmultiformlistbox-windowed.cpp | 213 -------------- .../KMultiFormListBox/kmultiformlistbox-windowed.h | 84 ------ .../KMultiFormListBox/kmultiformlistbox.cpp | 104 ------- .../KMultiFormListBox/kmultiformlistbox.h | 126 --------- .../KMultiFormListBox/kmultiformlistboxentry.cpp | 44 --- .../KMultiFormListBox/kmultiformlistboxentry.h | 74 ----- .../KMultiFormListBox/kmultiformlistboxfactory.cpp | 26 -- .../KMultiFormListBox/kmultiformlistboxfactory.h | 70 ----- .../tdemultiformlistbox-multivisible.cpp | 305 +++++++++++++++++++++ .../tdemultiformlistbox-multivisible.h | 136 +++++++++ .../KMultiFormListBox/tdemultiformlistbox-shower.h | 53 ++++ .../tdemultiformlistbox-windowed.cpp | 213 ++++++++++++++ .../tdemultiformlistbox-windowed.h | 84 ++++++ .../KMultiFormListBox/tdemultiformlistbox.cpp | 104 +++++++ .../KMultiFormListBox/tdemultiformlistbox.h | 126 +++++++++ .../KMultiFormListBox/tdemultiformlistboxentry.cpp | 44 +++ .../KMultiFormListBox/tdemultiformlistboxentry.h | 74 +++++ .../tdemultiformlistboxfactory.cpp | 26 ++ .../KMultiFormListBox/tdemultiformlistboxfactory.h | 70 +++++ kregexpeditor/KMultiFormListBox/widgetwindow.h | 2 +- kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp | 2 +- kregexpeditor/Makefile.am | 4 +- kregexpeditor/characterswidget.h | 2 +- kregexpeditor/qt-only/qt-only.pro | 22 +- 31 files changed, 1273 insertions(+), 1273 deletions(-) delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistbox.h delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp delete mode 100644 kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.cpp create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.h create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox-shower.h create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.cpp create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.h create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox.cpp create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistbox.h create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.cpp create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.h create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.cpp create mode 100644 kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.h (limited to 'kregexpeditor') diff --git a/kregexpeditor/CMakeLists.txt b/kregexpeditor/CMakeLists.txt index ee0eca5..1ebb963 100644 --- a/kregexpeditor/CMakeLists.txt +++ b/kregexpeditor/CMakeLists.txt @@ -77,7 +77,7 @@ tde_add_library( kregexpeditorcommon SHARED AUTOMOC emacsregexpconverter.cpp regexphighlighter.cpp util.cpp VERSION 1.0.0 - LINK kio-shared kmultiformlistbox-static + LINK kio-shared tdemultiformlistbox-static kwidgetstreamer-static DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/kregexpeditor/KMultiFormListBox/CMakeLists.txt b/kregexpeditor/KMultiFormListBox/CMakeLists.txt index 31f4b3e..67bfa33 100644 --- a/kregexpeditor/KMultiFormListBox/CMakeLists.txt +++ b/kregexpeditor/KMultiFormListBox/CMakeLists.txt @@ -27,14 +27,14 @@ add_definitions( ) -##### kmultiformlistbox (static) ################ - -tde_add_library( kmultiformlistbox STATIC_PIC AUTOMOC - SOURCES ccp.cpp kmultiformlistboxentry.cpp - kmultiformlistbox.cpp - kmultiformlistbox-multivisible.cpp - kmultiformlistboxfactory.cpp indexWindow.cpp - kmultiformlistbox-windowed.cpp +##### tdemultiformlistbox (static) ################ + +tde_add_library( tdemultiformlistbox STATIC_PIC AUTOMOC + SOURCES ccp.cpp tdemultiformlistboxentry.cpp + tdemultiformlistbox.cpp + tdemultiformlistbox-multivisible.cpp + tdemultiformlistboxfactory.cpp indexWindow.cpp + tdemultiformlistbox-windowed.cpp widgetwindow.cpp windowlistboxitem.cpp ) @@ -43,8 +43,8 @@ tde_add_library( kmultiformlistbox STATIC_PIC AUTOMOC install( FILES - kmultiformlistbox.h - kmultiformlistboxentry.h - kmultiformlistboxfactory.h + tdemultiformlistbox.h + tdemultiformlistboxentry.h + tdemultiformlistboxfactory.h DESTINATION ${INCLUDE_INSTALL_DIR} ) diff --git a/kregexpeditor/KMultiFormListBox/Makefile.am b/kregexpeditor/KMultiFormListBox/Makefile.am index 5ee885f..3f2a395 100644 --- a/kregexpeditor/KMultiFormListBox/Makefile.am +++ b/kregexpeditor/KMultiFormListBox/Makefile.am @@ -1,15 +1,15 @@ AM_CPPFLAGS = -DQT_NO_CAST_ASCII -noinst_LTLIBRARIES = libkmultiformlistbox.la +noinst_LTLIBRARIES = libtdemultiformlistbox.la INCLUDES= -I$(srcdir)/../KWidgetStreamer $(all_includes) -include_HEADERS = kmultiformlistboxentry.h kmultiformlistbox.h \ - kmultiformlistboxfactory.h -noinst_HEADERS = ccp.h indexWindow.h kmultiformlistbox-multivisible.h \ - kmultiformlistbox-windowed.h widgetwindow.h windowlistboxitem.h -libkmultiformlistbox_la_SOURCES = ccp.cpp kmultiformlistboxentry.cpp \ - kmultiformlistbox.cpp kmultiformlistbox-multivisible.cpp \ - kmultiformlistboxfactory.cpp indexWindow.cpp \ - kmultiformlistbox-windowed.cpp widgetwindow.cpp windowlistboxitem.cpp +include_HEADERS = tdemultiformlistboxentry.h tdemultiformlistbox.h \ + tdemultiformlistboxfactory.h +noinst_HEADERS = ccp.h indexWindow.h tdemultiformlistbox-multivisible.h \ + tdemultiformlistbox-windowed.h widgetwindow.h windowlistboxitem.h +libtdemultiformlistbox_la_SOURCES = ccp.cpp tdemultiformlistboxentry.cpp \ + tdemultiformlistbox.cpp tdemultiformlistbox-multivisible.cpp \ + tdemultiformlistboxfactory.cpp indexWindow.cpp \ + tdemultiformlistbox-windowed.cpp widgetwindow.cpp windowlistboxitem.cpp METASOURCES = AUTO diff --git a/kregexpeditor/KMultiFormListBox/ccp.cpp b/kregexpeditor/KMultiFormListBox/ccp.cpp index be65d35..8197d2c 100644 --- a/kregexpeditor/KMultiFormListBox/ccp.cpp +++ b/kregexpeditor/KMultiFormListBox/ccp.cpp @@ -19,7 +19,7 @@ // ccp = Cut-Copy-Paste //--------------------- -#include "kmultiformlistbox-multivisible.h" +#include "tdemultiformlistbox-multivisible.h" #include "ccp.h" #include #include diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp deleted file mode 100644 index 3dcab67..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.cpp +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ - -#ifdef TQT_ONLY - #include "compat.h" - #include -#else - #include - #include "kmultiformlistbox-multivisible.moc" -#endif - -#include "kmultiformlistbox-multivisible.h" -#include "indexWindow.h" -#include "ccp.h" - -#include - -const int indexButtonWidth = 16; -const int indexButtonHeight = 12; -const uchar indexButtonBits[] = { - 0x00, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x04, 0x02, 0x04, 0x02, 0xc4, 0x8a, - 0x24, 0x53, 0x14, 0x22, 0x14, 0x22, 0x24, 0x53, 0xce, 0x8a, 0x00, 0x00 -}; - - -KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *fact, TQWidget *parent, const char *name) - : TQScrollView(parent, name) -{ - factory = fact; - - // Initialize the element list - elms = new WidgetList(); - - // Initialize the clipper. - enableClipper(true); - resizeContents(50,50); // This is required for proper functionality -} - - - -//---------------------------------------------------------------------- -// This function returns a list of the elements in the KMultiFormListBox widget. -//---------------------------------------------------------------------- -KMultiFormListBoxEntryList KMultiFormListBoxMultiVisible::elements() -{ - KMultiFormListBoxEntryList res; - for (TQWidget *child = elms->first(); child; child=elms->next()) { - if (strcmp(child->name(),"seperator") != 0) { - res.append((KMultiFormListBoxEntry *) child); - } - } - return res; -} - - -//---------------------------------------------------------------------- -// This function is called whenever the KMultiFormListBox widget is resized. It is -// necessary to ensure that the content of the clipper is resized. -//---------------------------------------------------------------------- -void KMultiFormListBoxMultiVisible::resizeEvent(TQResizeEvent *e) -{ - // The call of the super class ensures that the outer border is updated. - TQScrollView::resizeEvent(e); - - updateClipperContent(); -} - -void KMultiFormListBoxMultiVisible::updateClipperContent() -{ - // Extract the current size of the clipper - int ClipperWidth = clipper()->size().width(); - int ClipperHeight = clipper()->size().height(); - - // Initialize the calculation of the size of the new clipper. - int totalHeight = 0; - int maxWidth = ClipperWidth; - int count = 0; - - - // calculate the required size. - for (TQWidget *child = elms->first(); child; child=elms->next()) { - maxWidth = TQMAX(maxWidth, child->sizeHint().width()); - if (strcmp(child->name(), "seperator") != 0) { - totalHeight += child->sizeHint().height(); - count++; - } - else { - totalHeight += child->size().height(); - } - } - - // Calculate the extra height for the elements. - int extra = 0; - if (totalHeight < ClipperHeight && count != 0) { - extra = (ClipperHeight - totalHeight) / count; - totalHeight = ClipperHeight; - } - - // Now place the elements in the clipper. - int yPos = 0; - for (TQWidget *child2 = elms->first(); child2; child2=elms->next()) { - int h; - if ( strcmp(child2->name(),"seperator") != 0) { - h = child2->sizeHint().height(); - h += extra; - } - else { - h = child2->size().height(); - } - - moveChild(child2, 0,yPos); - - child2->resize(maxWidth,h); - yPos += h; - } - - // Finally call the resize procedure for the clipper to ensure that the - // new sizes is shown properly. - resizeContents(maxWidth, totalHeight); -} - - -void KMultiFormListBoxMultiVisible::addElement() -{ - addElement(0); -} - -void KMultiFormListBoxMultiVisible::addElement(KMultiFormListBoxEntry *after) -{ - KMultiFormListBoxEntry *elm = factory->create(viewport()); - insertElmIntoWidget(elm, after); -} - -void KMultiFormListBoxMultiVisible::append(KMultiFormListBoxEntry *elm) -{ - elm->reparent(viewport(), 0, TQPoint(0,0), false); - insertElmIntoWidget(elm, 0); -} - -void KMultiFormListBoxMultiVisible::delElement(TQWidget *elm) -{ - int index = elms->find(elm); - TQWidget *next = elms->at(index+1); - if (strcmp(next->name(),"seperator") != 0) { - elms->removeRef(next); - removeChild(next); - } - - elms->removeRef(elm); - removeChild(elm); - - updateClipperContent(); -} - -void KMultiFormListBoxMultiVisible::delAnElement() -{ - delElement(elms->at(0)); -} - -void KMultiFormListBoxMultiVisible::insertElmIntoWidget(KMultiFormListBoxEntry *elm, KMultiFormListBoxEntry *after) -{ - // Bind the index button if it exists. - if (elm->indexButton()) { - elm->indexButton()->setPixmap(TQBitmap(indexButtonWidth, indexButtonHeight, - indexButtonBits, true)); - connect(elm->indexButton(), TQT_SIGNAL(clicked()), elm, TQT_SLOT(acceptIndexButton())); - connect(elm, TQT_SIGNAL(gotoIndex(KMultiFormListBoxEntry *)), - this, TQT_SLOT(showIndexList(KMultiFormListBoxEntry *))); - } - - // Find the location to insert the new element. - int index = elms->count(); - if (after) { - index = elms->findRef(after); - } - - // Now show the new element. - elms->insert(index, elm); - elm->show(); - addChild(elm,0,0); // updateClipperContent will place the child correctly. - - TQWidget *sep = factory->separator(viewport()); - if (sep != 0) { - sep->setName("seperator"); - sep->show(); - addChild(sep,0,0); // updateClipperContent will place the child correctly. - elms->insert(index+1, sep); - } - - updateClipperContent(); - - showWidget(elm); // scroll to show the new widget. - - // install cut'n'paste functionallity - new CCP(this,elm); -} - - -//---------------------------------------------------------------------- -// This function shows the list of available Idx elements. -//---------------------------------------------------------------------- -void KMultiFormListBoxMultiVisible::showIndexList(KMultiFormListBoxEntry *elm) -{ - indexWindow *menu = new indexWindow(); - - // Insert the elements into the menu item. - for (TQWidget *child = elms->first(); child; child=elms->next()) { - if ( strcmp(child->name(), "seperator") != 0) { - TQString txt = ((KMultiFormListBoxEntry *) child)->idxString(); - menu->insertItem(txt); - } - } - - // Calculate the location of the window - TQPoint start; - int width; - elm->indexWindowPos(&start, &width); - - // Show the window. - int index = menu->exec(start,width); - - if (index != -1) { - for (TQWidget *child = elms->first(); child; child=elms->next()) { - if ( strcmp(child->name(), "seperator") != 0) { - - if (index == 0) { - showWidget((KMultiFormListBoxEntry *) child); - break; - } - index--; - } - } - } - delete menu; -} - -//---------------------------------------------------------------------- -// Scroll to the loaction of the given KMultiFormListBoxEntry element. -//---------------------------------------------------------------------- -void KMultiFormListBoxMultiVisible::showWidget(KMultiFormListBoxEntry *elm) -{ - setContentsPos(childX(elm), childY(elm)); -} - - -void KMultiFormListBoxMultiVisible::cut(KMultiFormListBoxEntry *elm) -{ - if (countElements(elms) == 1) { - KMessageBox::information(this, i18n("Due to a bug, it is not possible to remove the last element."), i18n("Internal Error") ); - return; - } - - TQDataStream stream(clipboard, IO_WriteOnly); - factory->toStream( TQT_TQOBJECT(elm), stream ); - delElement(elm); -} - -void KMultiFormListBoxMultiVisible::copy(KMultiFormListBoxEntry *elm) -{ - TQDataStream stream(clipboard, IO_WriteOnly); - factory->toStream(TQT_TQOBJECT(elm), stream); -} - -void KMultiFormListBoxMultiVisible::paste(KMultiFormListBoxEntry *oldElm) -{ - if (clipboard.size() == 0) { - KMessageBox::information(this, i18n("There is no element on the clipboard to paste in.")); - return; - } - - KMultiFormListBoxEntry *newElm = factory->create(viewport()); - TQDataStream stream( clipboard, IO_ReadOnly ); - factory->fromStream(stream, TQT_TQOBJECT(newElm)); - insertElmIntoWidget(newElm,oldElm); -} - - -int KMultiFormListBoxMultiVisible::countElements(WidgetList *elms) -{ - int count = 0; - - for (TQWidget *child = elms->first(); child; child=elms->next()) { - if (dynamic_cast(child)) - count++; - } - - return count; -} - - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h deleted file mode 100644 index 04a3f75..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-multivisible.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -// ------------------------------- Description ---------------------------- -// This is the KMultiFormListBox Widget. You do not need to inheret from this class, -// your interface to it will be through the methods `append` and `elements'. -// -// To make an instance of the widget, you need to inherit the classes -// `KMultiFormListBoxFactory' and `KMultiFormListBoxEntry'. -// ------------------------------------------------------------------------ -#ifndef __kmultiformlistboxmultivisble -#define __kmultiformlistboxmultivisble - -// -------------------------------- includes ------------------------------ -#include "kmultiformlistbox.h" -//------------------------------------------------------------------------- - -/** - @internal -*/ -class KMultiFormListBoxMultiVisible :public TQScrollView, KMultiFormListBoxShower { - -Q_OBJECT - - -friend class KMultiFormListBox; - -private: - /** - @param factory A factory used to generate the instances of KMultiFormListBoxEntry - class which is repeated in the KMultiFormListBox - @param parent A pointer to the parent widget - */ - KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *factory, TQWidget *parent = 0, const char *name = 0); - - /** - @return The elements in the KMultiFormListBox - */ - KMultiFormListBoxEntryList elements(); - void append(KMultiFormListBoxEntry *); - - TQWidget* qWidget() { return this; } - - -public slots: - - /** - This slot should be connected to a button which lets the user know that - he may get more elements in this KMultiFormListBox by pressing it. - The button should be labeled ``More Entries'' or something similar. - */ - void addElement(); // Adds an empty element to the KMultiFormListBox - - -protected slots: - - /** - When this slot is invoked then the Idx menu will be shown. - @param elm The KMultiFormListBoxEntry element where the Idx button was - pressed. This information is necessary to be able to calculate the - location where the drop down menu should be shown - */ - void showIndexList(KMultiFormListBoxEntry *elm); - -protected: - /** - Copies the element pointed to by which to the clipboard and removes it - from the interface. - This function is accessed from the class @ref CCP. - @param which A pointer to the element to cut. - */ - void cut(KMultiFormListBoxEntry *which); - - /** - Copies the element pointed to by which to the clipboard. - This function is accessed from the class @ref CCP. - @param which A pointer to the element to copied. - */ - void copy(KMultiFormListBoxEntry *which); - - /** - Paste the element from the clipboard to the KMultiFormListBox - This function is accessed from the class @ref CCP. - @param which A pointer to the KMultiFormListBoxEntry element which the - clipboard element should be inserted before,. - */ - void paste(KMultiFormListBoxEntry *which); - - /** - Inserts an empty KMultiFormListBoxEntry into the widget. - @param which A pointer to the element which the new empty widget - should be inserted before. - */ - - void addElement(KMultiFormListBoxEntry *); - - friend class CCP; - - virtual void resizeEvent(TQResizeEvent *); - void addElemBefore(KMultiFormListBoxEntry *newElm, TQWidget *existing); - void insertElmIntoWidget(KMultiFormListBoxEntry *elm, KMultiFormListBoxEntry *after); - void showWidget(KMultiFormListBoxEntry *elm); - void delElement(TQWidget *); - void delAnElement(); - void addElemBefore(KMultiFormListBoxEntry *newElm, KMultiFormListBoxEntry *existing); - void updateClipperContent(); - int countElements(WidgetList *); - - - -private: - // Instance variables - - KMultiFormListBoxFactory *factory; - WidgetList *elms; - TQPushButton *addBut; - TQByteArray clipboard; -}; - - -#endif /* kmultiformlistboxmultivisble */ - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h deleted file mode 100644 index 15f3af5..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-shower.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -#ifndef __kmultiformlistboxshower -#define __kmultiformlistboxshower - -// -------------------------------- includes ------------------------------ -//------------------------------------------------------------------------- -typedef TQPtrList KMultiFormListBoxEntryList ; - -/** - Abstract class defining the interface for widgets showing a number of @ref KMultiFormListBoxEntry. - - @internal -*/ -class KMultiFormListBoxShower { - -public: - virtual KMultiFormListBoxEntryList elements() = 0; - - /** Appends the given argument to the list */ - virtual void append(KMultiFormListBoxEntry *) = 0; - - /** Return the element as a TQWidget */ - virtual TQWidget* qWidget() = 0; - - /** Adds an empty element. */ - virtual void addElement() = 0; - - /** Deletes an element at the given index. */ - virtual void delElement(TQWidget *) = 0; - - /** Deletes any element from the list */ - virtual void delAnElement() = 0; -}; - - -#endif /* kmultiformlistboxshower */ - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp deleted file mode 100644 index 8d3ffe3..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -#ifdef TQT_ONLY - #include "compat.h" -#else - #include - #include - #include - #include "kmultiformlistbox-windowed.moc" -#endif - -#include "widgetwindow.h" -#include "windowlistboxitem.h" - -KMultiFormListBoxWindowed::KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent, - bool showUpDownButtons, bool showHelpButton, - TQString addButtonText,const char *name) - : TQWidget( parent, name ) -{ - _layout = new TQVBoxLayout(this); - - TQHBoxLayout *innerLayout = new TQHBoxLayout(); - _layout->addLayout(innerLayout); - - _listbox = new KListBox(this,"listbox"); - _listbox->setSelectionMode(TQListBox::Single); - innerLayout->addWidget(_listbox); - - TQVBoxLayout *buttons = new TQVBoxLayout(); - innerLayout->addLayout(buttons); - - TQPushButton *but = new TQPushButton(addButtonText, this,"Add Button"); - buttons->addWidget(but,0); - connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewElement())); - - but = new TQPushButton(i18n("Edit"), this,"Edit Button"); - buttons->addWidget(but,0); - connect(but,TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSelected())); - connect(_listbox, TQT_SIGNAL(doubleClicked(TQListBoxItem *)), this, TQT_SLOT(slotEditSelected(TQListBoxItem *))); - _buttonList.append(but); - - but = new TQPushButton(i18n("Delete"), this, "Delete Button"); - buttons->addWidget(but,0); - connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteEntry())); - _buttonList.append(but); - - but = new TQPushButton(i18n("Copy"), this, "Copy Button"); - buttons->addWidget(but,0); - connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopySelected())); - _buttonList.append(but); - - if (showUpDownButtons) { - but = new TQPushButton(i18n("Up"), this, "Up Button"); - buttons->addWidget(but, 0); - connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveItemUp())); - _buttonList.append(but); - - but = new TQPushButton(i18n("Down"), this, "Down Button"); - buttons->addWidget(but, 0); - connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveItemDown())); - _buttonList.append(but); - } - - if (showHelpButton) { - but = new KPushButton(KStdGuiItem::help(), this, "Help Button"); - buttons->addWidget(but, 0); - connect(but, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(showHelp())); - } - - buttons->addStretch(1); - _factory = factory; - slotUpdateButtonState(); - -} - -KMultiFormListBoxEntryList KMultiFormListBoxWindowed::elements() -{ - KMultiFormListBoxEntryList list; - for (unsigned int i=0; i < _listbox->count(); i++) { - WindowListboxItem *item = (WindowListboxItem *) _listbox->item(i); - list.append(item->entry()); - } - return list; -} - -void KMultiFormListBoxWindowed::delElement(TQWidget */*elm*/) -{ - // kdDebug() << "KMultiFormListBoxWindowed::delElement NOT YET IMPLEMENTED"<show(); - connect(widget, TQT_SIGNAL(finished()), this, TQT_SLOT(slotUpdateButtonState())); -} - -void KMultiFormListBoxWindowed::addElement() -{ - new WidgetWindow(_factory, _listbox); - slotUpdateButtonState(); -} - -void KMultiFormListBoxWindowed::slotEditSelected(TQListBoxItem *item) -{ - ((WindowListboxItem *) item)->displayWidget(); -} - -void KMultiFormListBoxWindowed::slotEditSelected() -{ - WindowListboxItem *item = selected(); - if (item) { - slotEditSelected(item); - } -} - -void KMultiFormListBoxWindowed::slotDeleteEntry() -{ - WindowListboxItem *item = selected(); - if (item) { - int answer = - KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").arg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); - if (answer == KMessageBox::Continue) { - delete item; - slotUpdateButtonState(); - } - } -} - -void KMultiFormListBoxWindowed::slotCopySelected() -{ - WindowListboxItem *item = selected(); - if (item) { - item->clone(); - } -} - -WindowListboxItem *KMultiFormListBoxWindowed::selected() -{ - int i = _listbox->currentItem(); - if (i == -1) { - return 0; - } else { - return (WindowListboxItem *) _listbox->item(i); - } -} - -void KMultiFormListBoxWindowed::slotMoveItemUp() -{ - WindowListboxItem *item = selected(); - if (item == 0) - return; - - int index = _listbox->index(item); - if (index != 0) { - _listbox->takeItem(item); - _listbox->insertItem(item, index-1); - _listbox->setCurrentItem(item); - } -} - -void KMultiFormListBoxWindowed::slotMoveItemDown() -{ - WindowListboxItem *item = selected(); - if (item == 0) - return; - - unsigned int index = _listbox->index(item); - if (index < _listbox->count()) { - _listbox->takeItem(item); - _listbox->insertItem(item, index+1); - _listbox->setCurrentItem(item); - } -} - -void KMultiFormListBoxWindowed::slotUpdateButtonState() -{ - bool on = (_listbox->count() != 0); - for (unsigned int i=0; i<_buttonList.count(); i++) { - _buttonList.at(i)->setEnabled(on); - } -} diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h deleted file mode 100644 index f86f6a4..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox-windowed.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -#ifndef __kmultiformlistboxwindowed -#define __kmultiformlistboxwindowed - -#ifdef TQT_ONLY - #include "compat.h" - #include -#else - #include -#endif - -#include "kmultiformlistboxfactory.h" -#include "kmultiformlistbox.h" -class WindowListboxItem; - - -/** - This class implements the windowed look for a @ref KMultiFormListBox - - @internal -*/ -class KMultiFormListBoxWindowed :public TQWidget, KMultiFormListBoxShower { - -Q_OBJECT - - -friend class KMultiFormListBox; - -private: - KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent, - bool showUpDownButtons, bool showHelpButton, TQString addButtonText, - const char *name); - - KMultiFormListBoxEntryList elements(); - const KMultiFormListBoxEntryList elements() const; - void append(KMultiFormListBoxEntry *); - WindowListboxItem *selected(); - TQWidget* qWidget() { return this; } - - TQVBoxLayout* _layout; - KMultiFormListBoxFactory* _factory; - TQPtrList _buttonList; - KListBox* _listbox; - virtual void delElement(TQWidget *); // Deletes the given element - virtual void delAnElement(); - void addElement(); - - -public slots: - void addNewElement(); - -signals: - void showHelp(); - -private slots: - void slotEditSelected(); - void slotEditSelected(TQListBoxItem *item); - void slotCopySelected(); - void slotMoveItemUp(); - void slotMoveItemDown(); - void slotDeleteEntry(); - void slotUpdateButtonState(); - -}; - - -#endif /* kmultiformlistboxwindowed */ - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp deleted file mode 100644 index 58b82da..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -#ifndef TQT_ONLY - #include "kmultiformlistbox.moc" -#endif - -#include "kmultiformlistbox-multivisible.h" -#include "kmultiformlistbox-windowed.h" - -KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp, TQWidget *parent, - bool showUpDownButtons, bool showHelpButton, TQString addButtonText, - const char *name ) : TQWidget( parent, name ) -{ - switch ( tp ) { - - case MultiVisible: - theWidget = new KMultiFormListBoxMultiVisible( factory, this, "KMultiFormListBox Widget" ); - break; - - case Windowed: - theWidget = new KMultiFormListBoxWindowed( factory, this, showUpDownButtons, - showHelpButton, addButtonText, "KMultiFormListBox Widget" ); - break; - } - - TQWidget *widget = theWidget->qWidget(); - - TQHBoxLayout *layout = new TQHBoxLayout( this ); - _factory = factory; - layout->addWidget( widget ); -} - -void KMultiFormListBox::append( KMultiFormListBoxEntry *element ) -{ - theWidget->append( element ); -} - -void KMultiFormListBox::addElement() -{ - theWidget->addElement(); -} - -KMultiFormListBoxEntryList KMultiFormListBox::elements() -{ - return theWidget->elements(); -} - -const KMultiFormListBoxEntryList KMultiFormListBox::elements() const -{ - return const_cast(this)->elements(); -} - -void KMultiFormListBox::slotChangeFace( KMultiFormListBoxType /*newFace*/ ) -{ - // TODO - // kdDebug() << "It's not possible yet to change the face on the fly." << endl - // << "Please let me (blackie@kde.org) know that you need it, and I'll work on it" << endl; -} - -void KMultiFormListBox::toStream( TQDataStream& stream ) const -{ - const KMultiFormListBoxEntryList elms = elements(); - stream << elms.count(); - for ( TQPtrListIterator it(elms); *it; ++it) - _factory->toStream( TQT_TQOBJECT(*it), stream ); -} - -void KMultiFormListBox::fromStream( TQDataStream& stream ) -{ - unsigned int fromCount, toCount; - stream >> fromCount; - - toCount = elements().count(); - - // adds/remove elements in the to list, to make it have the correct length. - for (unsigned int j=toCount; j< fromCount; ++j) { - addElement(); - } - for (unsigned int k=fromCount; k < toCount; ++k) { - theWidget->delAnElement(); - } - - KMultiFormListBoxEntryList elms = elements(); - for (TQPtrListIterator it(elms); *it; ++it) - _factory->fromStream( stream, TQT_TQOBJECT(*it) ); -} - - - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h b/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h deleted file mode 100644 index 89a6d0a..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistbox.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -#ifndef __kmultiformlistbox -#define __kmultiformlistbox - -#include "kmultiformlistboxfactory.h" -#include "kmultiformlistbox-shower.h" -#include "kmultiformlistboxentry.h" -#include -#include -#include - -#ifdef TQT_ONLY - #include "compat.h" -#else - #include -#endif - -class TQDataStream; - - -typedef TQPtrList KMultiFormListBoxEntryList ; -typedef TQPtrList WidgetList; -class KMultiFormListBoxMultiVisible; - -/** - The main class used to get an KMultiFormListBox widget. - - The KMultiFormListBox widget consist of a sub-widget which is repeated a - number of times, it is up to the end user to determine the number of times - the sub widget is repeated, and he may require an additional copy simply - by pressing a ``Add'' or ``More Entries'' button. The KMultiFormListBox - widget has two different faces (i.e. two different end user - interfaces). One (Windowed) will show a listbox from which the end user - can access each subwidget containing data by pressing the LMB on a name - for the element. The other face (MultiVisible) shows all the subwidgets in - one huge ``Listbox''. - - To use the KMultiFormListBox widget you must create a class which is inherited - from the @ref KMultiFormListBoxFactory class. This new class must override the - function `create'. This function must return a freshly made instance of - the class @ref KMultiFormListBoxEntry (or a subclass of this). The KMultiFormListBoxEntry - instance is the one inserted into the KMultiFormListBox widget (one instance for - each sub widget in the KMultiFormListBox widget). - - @author Jesper Kjær Pedersen - **/ -class KMultiFormListBox : public TQWidget { - -Q_OBJECT - - -public: - - enum KMultiFormListBoxType {MultiVisible, Windowed}; - - /** - @param factory A factory used to generate the instances of - KMultiFormListBoxEntry class which is repeated in the KMultiFormListBox - @param parent A pointer to the parent widget - **/ - KMultiFormListBox(KMultiFormListBoxFactory *factory, - KMultiFormListBoxType tp=Windowed, - TQWidget *parent = 0, bool showUpDownButtons = true, - bool showHelpButton = true, TQString addButtonText = i18n("Add"), - const char *name = 0); - - /** - @return The elements in the KMultiFormListBox. - **/ - KMultiFormListBoxEntryList elements(); - const KMultiFormListBoxEntryList elements() const; - - /** - TODO. - **/ - void append(KMultiFormListBoxEntry *); - - /** write data out to stream */ - void toStream( TQDataStream& stream ) const; - - /** reads data in from stream */ - void fromStream( TQDataStream& stream ); - -public slots: - - /** - Adds an empty element to the KMultiFormListBox. - - This slot is only required for the @ref MultiVisible face. It should - be connected to a button which lets the user know that he may get more - elements in this KMultiFormListBox by pressing it. The button should - be labeled ``More Entries'' or something similar. - **/ - void addElement(); // Adds an empty element to the KMultiFormListBox - - /** - Changes the face of the KMultiFormListBox. - @param face The new face of the KMultiFormListBox - **/ - void slotChangeFace(KMultiFormListBoxType newFace); - -private: - KMultiFormListBoxShower *theWidget; - KMultiFormListBoxFactory *_factory; - -}; - - -#endif /* kmultiformlistbox */ - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp deleted file mode 100644 index 5631078..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ - -#ifndef TQT_ONLY - #include "kmultiformlistboxentry.moc" -#endif - -#include "kmultiformlistboxentry.h" -//---------------------------------------------------------------------- -// This function is needed to signal which of the KMultiFormListBox entries -// the Idx button was invoked from. -//---------------------------------------------------------------------- -void KMultiFormListBoxEntry::acceptIndexButton() -{ - emit gotoIndex(this); -} - - -void KMultiFormListBoxEntry::indexWindowPos(TQPoint *start, int *width) -{ - // Calculate the position of the value widgets left-buttom border - TQPoint global_point = valueWidget()->mapToGlobal(TQPoint(0,0)); - start->setX(global_point.x()); - start->setY(global_point.y() + valueWidget()->height()); - - // Calculate the width of the list. - global_point = indexButton()->mapToGlobal(TQPoint(0,0)); - *width = global_point.x() + indexButton()->width() - start->x(); -} diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h deleted file mode 100644 index b3750bb..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxentry.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -#ifndef __kmultiformlistboxentry -#define __kmultiformlistboxentry - -#include -#include -#include - -/** - This widget must be the base class for an entry widget used in the @ref - KMultiFormListBox class. It is necessary for you to inherit this class to get any - information attached to the elements in the KMultiFormListBox. - - The KMultiFormListBox widget features a fast scrolling mechanism through the Idx - button. If you want to use this in you KMultiFormListBox, then you must do the - following: - @li Create a @ref TQPushButton as a sub-widget to your KMultiFormListBoxEntry. - @li Override the @ref indexButton method to return your TQPushButton - @li Override the @ref idxString to return a @ref TQString - with a textual representation of the content in this KMultiFormListBoxEntry. This - string will be used in the drop-down box which the user gets when he - presses the Idx button. - @li The drop down window must be aligned horizontal to some widget - (which should be next to the Idx button, to ensure a good looking GUI. The - position of the drop down widget may be specified in two ways: (1) - override the @ref valueWidget method to return a widget, to align with - (that is the upper right corner of the drop down window will be the - same as the lower right corner of this widget) or (2) override the @ref - indexWindowPos method to return a start point for the drop down window and - a width. - **/ -class KMultiFormListBoxEntry : public TQWidget -{ - Q_OBJECT - - -public: - KMultiFormListBoxEntry(TQWidget *parent, const char *name) : TQWidget(parent,name) {} - - virtual TQPushButton *indexButton() { return 0; } - virtual TQWidget *valueWidget() { return 0; } - - virtual void indexWindowPos(TQPoint *start, int *width); // both variables are return values. - - // This function must return a string representing the KMultiFormListBox. This is - // used when showing the fast-search menu available from the `Idx' button. - virtual TQString idxString() { return TQString::fromLatin1(""); } - -public slots: - void acceptIndexButton(); - -signals: - void gotoIndex(KMultiFormListBoxEntry *); - -}; - -#endif /* kmultiformlistboxentry */ - diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp deleted file mode 100644 index 08a800a..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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 "kmultiformlistboxfactory.h" -#include - -TQWidget *KMultiFormListBoxFactory::separator(TQWidget *parent) { - TQFrame* sep = new TQFrame( parent ); - sep->setFrameStyle( TQFrame::HLine | TQFrame::Sunken); - sep->setLineWidth(1); - return sep; -} diff --git a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h b/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h deleted file mode 100644 index dc0bcce..0000000 --- a/kregexpeditor/KMultiFormListBox/kmultiformlistboxfactory.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2002-2003 Jesper K. Pedersen - * - * 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. - **/ -// -------------------------------- includes ------------------------------ -#ifndef __kmultiformlistboxfactory -#define __kmultiformlistboxfactory -#include -#include "kwidgetstreamer.h" -class KMultiFormListBoxEntry; -//------------------------------------------------------------------------- - - -/** - Factory use to generate elements for the @ref KMultiFormListBox widget. - - To use an @ref KMultiFormListBox, one must inherit from the class KMultiFormListBoxFactory - and override the method @ref create. This method must return an empty - element for the KMultiFormListBox (that is an @ref KMultiFormListBoxEntry or a subclass of - it). - - If you dislike the default separator between each of the elements or - simply do not want a separator in the KMultiFormListBox, then you may override - the method @ref separator. -**/ -class KMultiFormListBoxFactory : public KWidgetStreamer -{ -public: - virtual ~KMultiFormListBoxFactory() {} - - /** - This method must be overridden in subclasses and must return an - ``empty'' instance of the @ref KMultiFormListBoxEntry class, or perhaps rather - a subclass of this class. This instance will be owned by the caller of - this function. - - @param parent A pointer to the parent of this KMultiFormListBoxEntry widget - returned. - @return A fresh @ref KMultiFormListBoxEntry to be used in an instance of the - @ref KMultiFormListBox class. - **/ - virtual KMultiFormListBoxEntry *create(TQWidget *parent) = 0; - - /** - This method is used to get a separator between the elements in an @ref - KMultiFormListBox. The widget returned from this method will be owned by the - caller. - - @param parent A pointer to the parent of the TQWidget returned. - @return A widget which must be used as a separator between the @ref - KMultiFormListBoxEntry elements in an @ref KMultiFormListBox. - **/ - virtual TQWidget *separator(TQWidget *parent); -}; - -#endif /* kmultiformlistbox */ - diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.cpp b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.cpp new file mode 100644 index 0000000..5c67526 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.cpp @@ -0,0 +1,305 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ + +#ifdef TQT_ONLY + #include "compat.h" + #include +#else + #include + #include "tdemultiformlistbox-multivisible.moc" +#endif + +#include "tdemultiformlistbox-multivisible.h" +#include "indexWindow.h" +#include "ccp.h" + +#include + +const int indexButtonWidth = 16; +const int indexButtonHeight = 12; +const uchar indexButtonBits[] = { + 0x00, 0x00, 0x00, 0x00, 0x0e, 0x02, 0x04, 0x02, 0x04, 0x02, 0xc4, 0x8a, + 0x24, 0x53, 0x14, 0x22, 0x14, 0x22, 0x24, 0x53, 0xce, 0x8a, 0x00, 0x00 +}; + + +KMultiFormListBoxMultiVisible::KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *fact, TQWidget *parent, const char *name) + : TQScrollView(parent, name) +{ + factory = fact; + + // Initialize the element list + elms = new WidgetList(); + + // Initialize the clipper. + enableClipper(true); + resizeContents(50,50); // This is required for proper functionality +} + + + +//---------------------------------------------------------------------- +// This function returns a list of the elements in the KMultiFormListBox widget. +//---------------------------------------------------------------------- +KMultiFormListBoxEntryList KMultiFormListBoxMultiVisible::elements() +{ + KMultiFormListBoxEntryList res; + for (TQWidget *child = elms->first(); child; child=elms->next()) { + if (strcmp(child->name(),"seperator") != 0) { + res.append((KMultiFormListBoxEntry *) child); + } + } + return res; +} + + +//---------------------------------------------------------------------- +// This function is called whenever the KMultiFormListBox widget is resized. It is +// necessary to ensure that the content of the clipper is resized. +//---------------------------------------------------------------------- +void KMultiFormListBoxMultiVisible::resizeEvent(TQResizeEvent *e) +{ + // The call of the super class ensures that the outer border is updated. + TQScrollView::resizeEvent(e); + + updateClipperContent(); +} + +void KMultiFormListBoxMultiVisible::updateClipperContent() +{ + // Extract the current size of the clipper + int ClipperWidth = clipper()->size().width(); + int ClipperHeight = clipper()->size().height(); + + // Initialize the calculation of the size of the new clipper. + int totalHeight = 0; + int maxWidth = ClipperWidth; + int count = 0; + + + // calculate the required size. + for (TQWidget *child = elms->first(); child; child=elms->next()) { + maxWidth = TQMAX(maxWidth, child->sizeHint().width()); + if (strcmp(child->name(), "seperator") != 0) { + totalHeight += child->sizeHint().height(); + count++; + } + else { + totalHeight += child->size().height(); + } + } + + // Calculate the extra height for the elements. + int extra = 0; + if (totalHeight < ClipperHeight && count != 0) { + extra = (ClipperHeight - totalHeight) / count; + totalHeight = ClipperHeight; + } + + // Now place the elements in the clipper. + int yPos = 0; + for (TQWidget *child2 = elms->first(); child2; child2=elms->next()) { + int h; + if ( strcmp(child2->name(),"seperator") != 0) { + h = child2->sizeHint().height(); + h += extra; + } + else { + h = child2->size().height(); + } + + moveChild(child2, 0,yPos); + + child2->resize(maxWidth,h); + yPos += h; + } + + // Finally call the resize procedure for the clipper to ensure that the + // new sizes is shown properly. + resizeContents(maxWidth, totalHeight); +} + + +void KMultiFormListBoxMultiVisible::addElement() +{ + addElement(0); +} + +void KMultiFormListBoxMultiVisible::addElement(KMultiFormListBoxEntry *after) +{ + KMultiFormListBoxEntry *elm = factory->create(viewport()); + insertElmIntoWidget(elm, after); +} + +void KMultiFormListBoxMultiVisible::append(KMultiFormListBoxEntry *elm) +{ + elm->reparent(viewport(), 0, TQPoint(0,0), false); + insertElmIntoWidget(elm, 0); +} + +void KMultiFormListBoxMultiVisible::delElement(TQWidget *elm) +{ + int index = elms->find(elm); + TQWidget *next = elms->at(index+1); + if (strcmp(next->name(),"seperator") != 0) { + elms->removeRef(next); + removeChild(next); + } + + elms->removeRef(elm); + removeChild(elm); + + updateClipperContent(); +} + +void KMultiFormListBoxMultiVisible::delAnElement() +{ + delElement(elms->at(0)); +} + +void KMultiFormListBoxMultiVisible::insertElmIntoWidget(KMultiFormListBoxEntry *elm, KMultiFormListBoxEntry *after) +{ + // Bind the index button if it exists. + if (elm->indexButton()) { + elm->indexButton()->setPixmap(TQBitmap(indexButtonWidth, indexButtonHeight, + indexButtonBits, true)); + connect(elm->indexButton(), TQT_SIGNAL(clicked()), elm, TQT_SLOT(acceptIndexButton())); + connect(elm, TQT_SIGNAL(gotoIndex(KMultiFormListBoxEntry *)), + this, TQT_SLOT(showIndexList(KMultiFormListBoxEntry *))); + } + + // Find the location to insert the new element. + int index = elms->count(); + if (after) { + index = elms->findRef(after); + } + + // Now show the new element. + elms->insert(index, elm); + elm->show(); + addChild(elm,0,0); // updateClipperContent will place the child correctly. + + TQWidget *sep = factory->separator(viewport()); + if (sep != 0) { + sep->setName("seperator"); + sep->show(); + addChild(sep,0,0); // updateClipperContent will place the child correctly. + elms->insert(index+1, sep); + } + + updateClipperContent(); + + showWidget(elm); // scroll to show the new widget. + + // install cut'n'paste functionallity + new CCP(this,elm); +} + + +//---------------------------------------------------------------------- +// This function shows the list of available Idx elements. +//---------------------------------------------------------------------- +void KMultiFormListBoxMultiVisible::showIndexList(KMultiFormListBoxEntry *elm) +{ + indexWindow *menu = new indexWindow(); + + // Insert the elements into the menu item. + for (TQWidget *child = elms->first(); child; child=elms->next()) { + if ( strcmp(child->name(), "seperator") != 0) { + TQString txt = ((KMultiFormListBoxEntry *) child)->idxString(); + menu->insertItem(txt); + } + } + + // Calculate the location of the window + TQPoint start; + int width; + elm->indexWindowPos(&start, &width); + + // Show the window. + int index = menu->exec(start,width); + + if (index != -1) { + for (TQWidget *child = elms->first(); child; child=elms->next()) { + if ( strcmp(child->name(), "seperator") != 0) { + + if (index == 0) { + showWidget((KMultiFormListBoxEntry *) child); + break; + } + index--; + } + } + } + delete menu; +} + +//---------------------------------------------------------------------- +// Scroll to the loaction of the given KMultiFormListBoxEntry element. +//---------------------------------------------------------------------- +void KMultiFormListBoxMultiVisible::showWidget(KMultiFormListBoxEntry *elm) +{ + setContentsPos(childX(elm), childY(elm)); +} + + +void KMultiFormListBoxMultiVisible::cut(KMultiFormListBoxEntry *elm) +{ + if (countElements(elms) == 1) { + KMessageBox::information(this, i18n("Due to a bug, it is not possible to remove the last element."), i18n("Internal Error") ); + return; + } + + TQDataStream stream(clipboard, IO_WriteOnly); + factory->toStream( TQT_TQOBJECT(elm), stream ); + delElement(elm); +} + +void KMultiFormListBoxMultiVisible::copy(KMultiFormListBoxEntry *elm) +{ + TQDataStream stream(clipboard, IO_WriteOnly); + factory->toStream(TQT_TQOBJECT(elm), stream); +} + +void KMultiFormListBoxMultiVisible::paste(KMultiFormListBoxEntry *oldElm) +{ + if (clipboard.size() == 0) { + KMessageBox::information(this, i18n("There is no element on the clipboard to paste in.")); + return; + } + + KMultiFormListBoxEntry *newElm = factory->create(viewport()); + TQDataStream stream( clipboard, IO_ReadOnly ); + factory->fromStream(stream, TQT_TQOBJECT(newElm)); + insertElmIntoWidget(newElm,oldElm); +} + + +int KMultiFormListBoxMultiVisible::countElements(WidgetList *elms) +{ + int count = 0; + + for (TQWidget *child = elms->first(); child; child=elms->next()) { + if (dynamic_cast(child)) + count++; + } + + return count; +} + + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.h b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.h new file mode 100644 index 0000000..5077496 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-multivisible.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +// ------------------------------- Description ---------------------------- +// This is the KMultiFormListBox Widget. You do not need to inheret from this class, +// your interface to it will be through the methods `append` and `elements'. +// +// To make an instance of the widget, you need to inherit the classes +// `KMultiFormListBoxFactory' and `KMultiFormListBoxEntry'. +// ------------------------------------------------------------------------ +#ifndef __tdemultiformlistboxmultivisble +#define __tdemultiformlistboxmultivisble + +// -------------------------------- includes ------------------------------ +#include "tdemultiformlistbox.h" +//------------------------------------------------------------------------- + +/** + @internal +*/ +class KMultiFormListBoxMultiVisible :public TQScrollView, KMultiFormListBoxShower { + +Q_OBJECT + + +friend class KMultiFormListBox; + +private: + /** + @param factory A factory used to generate the instances of KMultiFormListBoxEntry + class which is repeated in the KMultiFormListBox + @param parent A pointer to the parent widget + */ + KMultiFormListBoxMultiVisible(KMultiFormListBoxFactory *factory, TQWidget *parent = 0, const char *name = 0); + + /** + @return The elements in the KMultiFormListBox + */ + KMultiFormListBoxEntryList elements(); + void append(KMultiFormListBoxEntry *); + + TQWidget* qWidget() { return this; } + + +public slots: + + /** + This slot should be connected to a button which lets the user know that + he may get more elements in this KMultiFormListBox by pressing it. + The button should be labeled ``More Entries'' or something similar. + */ + void addElement(); // Adds an empty element to the KMultiFormListBox + + +protected slots: + + /** + When this slot is invoked then the Idx menu will be shown. + @param elm The KMultiFormListBoxEntry element where the Idx button was + pressed. This information is necessary to be able to calculate the + location where the drop down menu should be shown + */ + void showIndexList(KMultiFormListBoxEntry *elm); + +protected: + /** + Copies the element pointed to by which to the clipboard and removes it + from the interface. + This function is accessed from the class @ref CCP. + @param which A pointer to the element to cut. + */ + void cut(KMultiFormListBoxEntry *which); + + /** + Copies the element pointed to by which to the clipboard. + This function is accessed from the class @ref CCP. + @param which A pointer to the element to copied. + */ + void copy(KMultiFormListBoxEntry *which); + + /** + Paste the element from the clipboard to the KMultiFormListBox + This function is accessed from the class @ref CCP. + @param which A pointer to the KMultiFormListBoxEntry element which the + clipboard element should be inserted before,. + */ + void paste(KMultiFormListBoxEntry *which); + + /** + Inserts an empty KMultiFormListBoxEntry into the widget. + @param which A pointer to the element which the new empty widget + should be inserted before. + */ + + void addElement(KMultiFormListBoxEntry *); + + friend class CCP; + + virtual void resizeEvent(TQResizeEvent *); + void addElemBefore(KMultiFormListBoxEntry *newElm, TQWidget *existing); + void insertElmIntoWidget(KMultiFormListBoxEntry *elm, KMultiFormListBoxEntry *after); + void showWidget(KMultiFormListBoxEntry *elm); + void delElement(TQWidget *); + void delAnElement(); + void addElemBefore(KMultiFormListBoxEntry *newElm, KMultiFormListBoxEntry *existing); + void updateClipperContent(); + int countElements(WidgetList *); + + + +private: + // Instance variables + + KMultiFormListBoxFactory *factory; + WidgetList *elms; + TQPushButton *addBut; + TQByteArray clipboard; +}; + + +#endif /* tdemultiformlistboxmultivisble */ + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-shower.h b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-shower.h new file mode 100644 index 0000000..03cec37 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-shower.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +#ifndef __tdemultiformlistboxshower +#define __tdemultiformlistboxshower + +// -------------------------------- includes ------------------------------ +//------------------------------------------------------------------------- +typedef TQPtrList KMultiFormListBoxEntryList ; + +/** + Abstract class defining the interface for widgets showing a number of @ref KMultiFormListBoxEntry. + + @internal +*/ +class KMultiFormListBoxShower { + +public: + virtual KMultiFormListBoxEntryList elements() = 0; + + /** Appends the given argument to the list */ + virtual void append(KMultiFormListBoxEntry *) = 0; + + /** Return the element as a TQWidget */ + virtual TQWidget* qWidget() = 0; + + /** Adds an empty element. */ + virtual void addElement() = 0; + + /** Deletes an element at the given index. */ + virtual void delElement(TQWidget *) = 0; + + /** Deletes any element from the list */ + virtual void delAnElement() = 0; +}; + + +#endif /* tdemultiformlistboxshower */ + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.cpp b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.cpp new file mode 100644 index 0000000..35627d6 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.cpp @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +#ifdef TQT_ONLY + #include "compat.h" +#else + #include + #include + #include + #include "tdemultiformlistbox-windowed.moc" +#endif + +#include "widgetwindow.h" +#include "windowlistboxitem.h" + +KMultiFormListBoxWindowed::KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent, + bool showUpDownButtons, bool showHelpButton, + TQString addButtonText,const char *name) + : TQWidget( parent, name ) +{ + _layout = new TQVBoxLayout(this); + + TQHBoxLayout *innerLayout = new TQHBoxLayout(); + _layout->addLayout(innerLayout); + + _listbox = new KListBox(this,"listbox"); + _listbox->setSelectionMode(TQListBox::Single); + innerLayout->addWidget(_listbox); + + TQVBoxLayout *buttons = new TQVBoxLayout(); + innerLayout->addLayout(buttons); + + TQPushButton *but = new TQPushButton(addButtonText, this,"Add Button"); + buttons->addWidget(but,0); + connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewElement())); + + but = new TQPushButton(i18n("Edit"), this,"Edit Button"); + buttons->addWidget(but,0); + connect(but,TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSelected())); + connect(_listbox, TQT_SIGNAL(doubleClicked(TQListBoxItem *)), this, TQT_SLOT(slotEditSelected(TQListBoxItem *))); + _buttonList.append(but); + + but = new TQPushButton(i18n("Delete"), this, "Delete Button"); + buttons->addWidget(but,0); + connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteEntry())); + _buttonList.append(but); + + but = new TQPushButton(i18n("Copy"), this, "Copy Button"); + buttons->addWidget(but,0); + connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopySelected())); + _buttonList.append(but); + + if (showUpDownButtons) { + but = new TQPushButton(i18n("Up"), this, "Up Button"); + buttons->addWidget(but, 0); + connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveItemUp())); + _buttonList.append(but); + + but = new TQPushButton(i18n("Down"), this, "Down Button"); + buttons->addWidget(but, 0); + connect(but, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveItemDown())); + _buttonList.append(but); + } + + if (showHelpButton) { + but = new KPushButton(KStdGuiItem::help(), this, "Help Button"); + buttons->addWidget(but, 0); + connect(but, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(showHelp())); + } + + buttons->addStretch(1); + _factory = factory; + slotUpdateButtonState(); + +} + +KMultiFormListBoxEntryList KMultiFormListBoxWindowed::elements() +{ + KMultiFormListBoxEntryList list; + for (unsigned int i=0; i < _listbox->count(); i++) { + WindowListboxItem *item = (WindowListboxItem *) _listbox->item(i); + list.append(item->entry()); + } + return list; +} + +void KMultiFormListBoxWindowed::delElement(TQWidget */*elm*/) +{ + // kdDebug() << "KMultiFormListBoxWindowed::delElement NOT YET IMPLEMENTED"<show(); + connect(widget, TQT_SIGNAL(finished()), this, TQT_SLOT(slotUpdateButtonState())); +} + +void KMultiFormListBoxWindowed::addElement() +{ + new WidgetWindow(_factory, _listbox); + slotUpdateButtonState(); +} + +void KMultiFormListBoxWindowed::slotEditSelected(TQListBoxItem *item) +{ + ((WindowListboxItem *) item)->displayWidget(); +} + +void KMultiFormListBoxWindowed::slotEditSelected() +{ + WindowListboxItem *item = selected(); + if (item) { + slotEditSelected(item); + } +} + +void KMultiFormListBoxWindowed::slotDeleteEntry() +{ + WindowListboxItem *item = selected(); + if (item) { + int answer = + KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").arg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); + if (answer == KMessageBox::Continue) { + delete item; + slotUpdateButtonState(); + } + } +} + +void KMultiFormListBoxWindowed::slotCopySelected() +{ + WindowListboxItem *item = selected(); + if (item) { + item->clone(); + } +} + +WindowListboxItem *KMultiFormListBoxWindowed::selected() +{ + int i = _listbox->currentItem(); + if (i == -1) { + return 0; + } else { + return (WindowListboxItem *) _listbox->item(i); + } +} + +void KMultiFormListBoxWindowed::slotMoveItemUp() +{ + WindowListboxItem *item = selected(); + if (item == 0) + return; + + int index = _listbox->index(item); + if (index != 0) { + _listbox->takeItem(item); + _listbox->insertItem(item, index-1); + _listbox->setCurrentItem(item); + } +} + +void KMultiFormListBoxWindowed::slotMoveItemDown() +{ + WindowListboxItem *item = selected(); + if (item == 0) + return; + + unsigned int index = _listbox->index(item); + if (index < _listbox->count()) { + _listbox->takeItem(item); + _listbox->insertItem(item, index+1); + _listbox->setCurrentItem(item); + } +} + +void KMultiFormListBoxWindowed::slotUpdateButtonState() +{ + bool on = (_listbox->count() != 0); + for (unsigned int i=0; i<_buttonList.count(); i++) { + _buttonList.at(i)->setEnabled(on); + } +} diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.h b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.h new file mode 100644 index 0000000..b2c0484 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox-windowed.h @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +#ifndef __tdemultiformlistboxwindowed +#define __tdemultiformlistboxwindowed + +#ifdef TQT_ONLY + #include "compat.h" + #include +#else + #include +#endif + +#include "tdemultiformlistboxfactory.h" +#include "tdemultiformlistbox.h" +class WindowListboxItem; + + +/** + This class implements the windowed look for a @ref KMultiFormListBox + + @internal +*/ +class KMultiFormListBoxWindowed :public TQWidget, KMultiFormListBoxShower { + +Q_OBJECT + + +friend class KMultiFormListBox; + +private: + KMultiFormListBoxWindowed(KMultiFormListBoxFactory *factory, TQWidget *parent, + bool showUpDownButtons, bool showHelpButton, TQString addButtonText, + const char *name); + + KMultiFormListBoxEntryList elements(); + const KMultiFormListBoxEntryList elements() const; + void append(KMultiFormListBoxEntry *); + WindowListboxItem *selected(); + TQWidget* qWidget() { return this; } + + TQVBoxLayout* _layout; + KMultiFormListBoxFactory* _factory; + TQPtrList _buttonList; + KListBox* _listbox; + virtual void delElement(TQWidget *); // Deletes the given element + virtual void delAnElement(); + void addElement(); + + +public slots: + void addNewElement(); + +signals: + void showHelp(); + +private slots: + void slotEditSelected(); + void slotEditSelected(TQListBoxItem *item); + void slotCopySelected(); + void slotMoveItemUp(); + void slotMoveItemDown(); + void slotDeleteEntry(); + void slotUpdateButtonState(); + +}; + + +#endif /* tdemultiformlistboxwindowed */ + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox.cpp b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox.cpp new file mode 100644 index 0000000..33eda27 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox.cpp @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +#ifndef TQT_ONLY + #include "tdemultiformlistbox.moc" +#endif + +#include "tdemultiformlistbox-multivisible.h" +#include "tdemultiformlistbox-windowed.h" + +KMultiFormListBox::KMultiFormListBox( KMultiFormListBoxFactory *factory, KMultiFormListBoxType tp, TQWidget *parent, + bool showUpDownButtons, bool showHelpButton, TQString addButtonText, + const char *name ) : TQWidget( parent, name ) +{ + switch ( tp ) { + + case MultiVisible: + theWidget = new KMultiFormListBoxMultiVisible( factory, this, "KMultiFormListBox Widget" ); + break; + + case Windowed: + theWidget = new KMultiFormListBoxWindowed( factory, this, showUpDownButtons, + showHelpButton, addButtonText, "KMultiFormListBox Widget" ); + break; + } + + TQWidget *widget = theWidget->qWidget(); + + TQHBoxLayout *layout = new TQHBoxLayout( this ); + _factory = factory; + layout->addWidget( widget ); +} + +void KMultiFormListBox::append( KMultiFormListBoxEntry *element ) +{ + theWidget->append( element ); +} + +void KMultiFormListBox::addElement() +{ + theWidget->addElement(); +} + +KMultiFormListBoxEntryList KMultiFormListBox::elements() +{ + return theWidget->elements(); +} + +const KMultiFormListBoxEntryList KMultiFormListBox::elements() const +{ + return const_cast(this)->elements(); +} + +void KMultiFormListBox::slotChangeFace( KMultiFormListBoxType /*newFace*/ ) +{ + // TODO + // kdDebug() << "It's not possible yet to change the face on the fly." << endl + // << "Please let me (blackie@kde.org) know that you need it, and I'll work on it" << endl; +} + +void KMultiFormListBox::toStream( TQDataStream& stream ) const +{ + const KMultiFormListBoxEntryList elms = elements(); + stream << elms.count(); + for ( TQPtrListIterator it(elms); *it; ++it) + _factory->toStream( TQT_TQOBJECT(*it), stream ); +} + +void KMultiFormListBox::fromStream( TQDataStream& stream ) +{ + unsigned int fromCount, toCount; + stream >> fromCount; + + toCount = elements().count(); + + // adds/remove elements in the to list, to make it have the correct length. + for (unsigned int j=toCount; j< fromCount; ++j) { + addElement(); + } + for (unsigned int k=fromCount; k < toCount; ++k) { + theWidget->delAnElement(); + } + + KMultiFormListBoxEntryList elms = elements(); + for (TQPtrListIterator it(elms); *it; ++it) + _factory->fromStream( stream, TQT_TQOBJECT(*it) ); +} + + + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistbox.h b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox.h new file mode 100644 index 0000000..1151581 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistbox.h @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +#ifndef __tdemultiformlistbox +#define __tdemultiformlistbox + +#include "tdemultiformlistboxfactory.h" +#include "tdemultiformlistbox-shower.h" +#include "tdemultiformlistboxentry.h" +#include +#include +#include + +#ifdef TQT_ONLY + #include "compat.h" +#else + #include +#endif + +class TQDataStream; + + +typedef TQPtrList KMultiFormListBoxEntryList ; +typedef TQPtrList WidgetList; +class KMultiFormListBoxMultiVisible; + +/** + The main class used to get an KMultiFormListBox widget. + + The KMultiFormListBox widget consist of a sub-widget which is repeated a + number of times, it is up to the end user to determine the number of times + the sub widget is repeated, and he may require an additional copy simply + by pressing a ``Add'' or ``More Entries'' button. The KMultiFormListBox + widget has two different faces (i.e. two different end user + interfaces). One (Windowed) will show a listbox from which the end user + can access each subwidget containing data by pressing the LMB on a name + for the element. The other face (MultiVisible) shows all the subwidgets in + one huge ``Listbox''. + + To use the KMultiFormListBox widget you must create a class which is inherited + from the @ref KMultiFormListBoxFactory class. This new class must override the + function `create'. This function must return a freshly made instance of + the class @ref KMultiFormListBoxEntry (or a subclass of this). The KMultiFormListBoxEntry + instance is the one inserted into the KMultiFormListBox widget (one instance for + each sub widget in the KMultiFormListBox widget). + + @author Jesper Kjær Pedersen + **/ +class KMultiFormListBox : public TQWidget { + +Q_OBJECT + + +public: + + enum KMultiFormListBoxType {MultiVisible, Windowed}; + + /** + @param factory A factory used to generate the instances of + KMultiFormListBoxEntry class which is repeated in the KMultiFormListBox + @param parent A pointer to the parent widget + **/ + KMultiFormListBox(KMultiFormListBoxFactory *factory, + KMultiFormListBoxType tp=Windowed, + TQWidget *parent = 0, bool showUpDownButtons = true, + bool showHelpButton = true, TQString addButtonText = i18n("Add"), + const char *name = 0); + + /** + @return The elements in the KMultiFormListBox. + **/ + KMultiFormListBoxEntryList elements(); + const KMultiFormListBoxEntryList elements() const; + + /** + TODO. + **/ + void append(KMultiFormListBoxEntry *); + + /** write data out to stream */ + void toStream( TQDataStream& stream ) const; + + /** reads data in from stream */ + void fromStream( TQDataStream& stream ); + +public slots: + + /** + Adds an empty element to the KMultiFormListBox. + + This slot is only required for the @ref MultiVisible face. It should + be connected to a button which lets the user know that he may get more + elements in this KMultiFormListBox by pressing it. The button should + be labeled ``More Entries'' or something similar. + **/ + void addElement(); // Adds an empty element to the KMultiFormListBox + + /** + Changes the face of the KMultiFormListBox. + @param face The new face of the KMultiFormListBox + **/ + void slotChangeFace(KMultiFormListBoxType newFace); + +private: + KMultiFormListBoxShower *theWidget; + KMultiFormListBoxFactory *_factory; + +}; + + +#endif /* tdemultiformlistbox */ + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.cpp b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.cpp new file mode 100644 index 0000000..ee3e5c5 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.cpp @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ + +#ifndef TQT_ONLY + #include "tdemultiformlistboxentry.moc" +#endif + +#include "tdemultiformlistboxentry.h" +//---------------------------------------------------------------------- +// This function is needed to signal which of the KMultiFormListBox entries +// the Idx button was invoked from. +//---------------------------------------------------------------------- +void KMultiFormListBoxEntry::acceptIndexButton() +{ + emit gotoIndex(this); +} + + +void KMultiFormListBoxEntry::indexWindowPos(TQPoint *start, int *width) +{ + // Calculate the position of the value widgets left-buttom border + TQPoint global_point = valueWidget()->mapToGlobal(TQPoint(0,0)); + start->setX(global_point.x()); + start->setY(global_point.y() + valueWidget()->height()); + + // Calculate the width of the list. + global_point = indexButton()->mapToGlobal(TQPoint(0,0)); + *width = global_point.x() + indexButton()->width() - start->x(); +} diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.h b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.h new file mode 100644 index 0000000..957f3ab --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxentry.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +#ifndef __tdemultiformlistboxentry +#define __tdemultiformlistboxentry + +#include +#include +#include + +/** + This widget must be the base class for an entry widget used in the @ref + KMultiFormListBox class. It is necessary for you to inherit this class to get any + information attached to the elements in the KMultiFormListBox. + + The KMultiFormListBox widget features a fast scrolling mechanism through the Idx + button. If you want to use this in you KMultiFormListBox, then you must do the + following: + @li Create a @ref TQPushButton as a sub-widget to your KMultiFormListBoxEntry. + @li Override the @ref indexButton method to return your TQPushButton + @li Override the @ref idxString to return a @ref TQString + with a textual representation of the content in this KMultiFormListBoxEntry. This + string will be used in the drop-down box which the user gets when he + presses the Idx button. + @li The drop down window must be aligned horizontal to some widget + (which should be next to the Idx button, to ensure a good looking GUI. The + position of the drop down widget may be specified in two ways: (1) + override the @ref valueWidget method to return a widget, to align with + (that is the upper right corner of the drop down window will be the + same as the lower right corner of this widget) or (2) override the @ref + indexWindowPos method to return a start point for the drop down window and + a width. + **/ +class KMultiFormListBoxEntry : public TQWidget +{ + Q_OBJECT + + +public: + KMultiFormListBoxEntry(TQWidget *parent, const char *name) : TQWidget(parent,name) {} + + virtual TQPushButton *indexButton() { return 0; } + virtual TQWidget *valueWidget() { return 0; } + + virtual void indexWindowPos(TQPoint *start, int *width); // both variables are return values. + + // This function must return a string representing the KMultiFormListBox. This is + // used when showing the fast-search menu available from the `Idx' button. + virtual TQString idxString() { return TQString::fromLatin1(""); } + +public slots: + void acceptIndexButton(); + +signals: + void gotoIndex(KMultiFormListBoxEntry *); + +}; + +#endif /* tdemultiformlistboxentry */ + diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.cpp b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.cpp new file mode 100644 index 0000000..d4414cf --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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 "tdemultiformlistboxfactory.h" +#include + +TQWidget *KMultiFormListBoxFactory::separator(TQWidget *parent) { + TQFrame* sep = new TQFrame( parent ); + sep->setFrameStyle( TQFrame::HLine | TQFrame::Sunken); + sep->setLineWidth(1); + return sep; +} diff --git a/kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.h b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.h new file mode 100644 index 0000000..314c0e0 --- /dev/null +++ b/kregexpeditor/KMultiFormListBox/tdemultiformlistboxfactory.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2003 Jesper K. Pedersen + * + * 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. + **/ +// -------------------------------- includes ------------------------------ +#ifndef __tdemultiformlistboxfactory +#define __tdemultiformlistboxfactory +#include +#include "kwidgetstreamer.h" +class KMultiFormListBoxEntry; +//------------------------------------------------------------------------- + + +/** + Factory use to generate elements for the @ref KMultiFormListBox widget. + + To use an @ref KMultiFormListBox, one must inherit from the class KMultiFormListBoxFactory + and override the method @ref create. This method must return an empty + element for the KMultiFormListBox (that is an @ref KMultiFormListBoxEntry or a subclass of + it). + + If you dislike the default separator between each of the elements or + simply do not want a separator in the KMultiFormListBox, then you may override + the method @ref separator. +**/ +class KMultiFormListBoxFactory : public KWidgetStreamer +{ +public: + virtual ~KMultiFormListBoxFactory() {} + + /** + This method must be overridden in subclasses and must return an + ``empty'' instance of the @ref KMultiFormListBoxEntry class, or perhaps rather + a subclass of this class. This instance will be owned by the caller of + this function. + + @param parent A pointer to the parent of this KMultiFormListBoxEntry widget + returned. + @return A fresh @ref KMultiFormListBoxEntry to be used in an instance of the + @ref KMultiFormListBox class. + **/ + virtual KMultiFormListBoxEntry *create(TQWidget *parent) = 0; + + /** + This method is used to get a separator between the elements in an @ref + KMultiFormListBox. The widget returned from this method will be owned by the + caller. + + @param parent A pointer to the parent of the TQWidget returned. + @return A widget which must be used as a separator between the @ref + KMultiFormListBoxEntry elements in an @ref KMultiFormListBox. + **/ + virtual TQWidget *separator(TQWidget *parent); +}; + +#endif /* tdemultiformlistbox */ + diff --git a/kregexpeditor/KMultiFormListBox/widgetwindow.h b/kregexpeditor/KMultiFormListBox/widgetwindow.h index eea6500..2312653 100644 --- a/kregexpeditor/KMultiFormListBox/widgetwindow.h +++ b/kregexpeditor/KMultiFormListBox/widgetwindow.h @@ -26,7 +26,7 @@ #include #endif -#include "kmultiformlistbox-windowed.h" +#include "tdemultiformlistbox-windowed.h" /** @internal diff --git a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp index 04ee2a6..721257c 100644 --- a/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp +++ b/kregexpeditor/KWidgetStreamer/kwidgetstreamer.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ #include "kwidgetstreamer.h" -#include "kmultiformlistbox.h" +#include "tdemultiformlistbox.h" #include #include diff --git a/kregexpeditor/Makefile.am b/kregexpeditor/Makefile.am index 916ef42..22460b6 100644 --- a/kregexpeditor/Makefile.am +++ b/kregexpeditor/Makefile.am @@ -28,7 +28,7 @@ libkregexpeditorcommon_la_SOURCES = \ emacsregexpconverter.cpp regexphighlighter.cpp util.cpp libkregexpeditorcommon_la_LDFLAGS = $(all_libraries) -version-info 1:0:0 -no-undefined -libkregexpeditorcommon_la_LIBADD = KMultiFormListBox/libkmultiformlistbox.la \ +libkregexpeditorcommon_la_LIBADD = KMultiFormListBox/libtdemultiformlistbox.la \ KWidgetStreamer/libkwidgetstreamer.la $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) METASOURCES = AUTO @@ -46,7 +46,7 @@ libkregexpeditorgui_la_LIBADD = libkregexpeditorcommon.la bin_PROGRAMS = kregexpeditor kregexpeditor_SOURCES = main.cpp -kregexpeditor_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kregexpeditor_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kregexpeditor_LDADD = libkregexpeditorcommon.la $(LIB_KIO) kregexpeditor_INCLUDES = $(all_includes) diff --git a/kregexpeditor/characterswidget.h b/kregexpeditor/characterswidget.h index 8100f0a..1450d97 100644 --- a/kregexpeditor/characterswidget.h +++ b/kregexpeditor/characterswidget.h @@ -24,7 +24,7 @@ #include #endif -#include +#include #include "regexpwidget.h" #include diff --git a/kregexpeditor/qt-only/qt-only.pro b/kregexpeditor/qt-only/qt-only.pro index 9af8b97..536c98b 100644 --- a/kregexpeditor/qt-only/qt-only.pro +++ b/kregexpeditor/qt-only/qt-only.pro @@ -31,12 +31,12 @@ HEADERS += altnregexp.h \ gen_qregexpparser.hh \ indexWindow.h \ infopage.h \ - kmultiformlistbox-multivisible.h \ - kmultiformlistbox-shower.h \ - kmultiformlistbox-windowed.h \ - kmultiformlistbox.h \ - kmultiformlistboxentry.h \ - kmultiformlistboxfactory.h \ + tdemultiformlistbox-multivisible.h \ + tdemultiformlistbox-shower.h \ + tdemultiformlistbox-windowed.h \ + tdemultiformlistbox.h \ + tdemultiformlistboxentry.h \ + tdemultiformlistboxfactory.h \ kregexpeditorgui.h \ kregexpeditorprivate.h \ kwidgetstreamer.h \ @@ -96,11 +96,11 @@ SOURCES += altnregexp.cpp \ gen_qregexplexer.cpp \ indexWindow.cpp \ infopage.cpp \ - kmultiformlistbox-multivisible.cpp \ - kmultiformlistbox-windowed.cpp \ - kmultiformlistbox.cpp \ - kmultiformlistboxentry.cpp \ - kmultiformlistboxfactory.cpp \ + tdemultiformlistbox-multivisible.cpp \ + tdemultiformlistbox-windowed.cpp \ + tdemultiformlistbox.cpp \ + tdemultiformlistboxentry.cpp \ + tdemultiformlistboxfactory.cpp \ kregexpeditorgui.cpp \ kregexpeditorprivate.cpp \ kwidgetstreamer.cpp \ -- cgit v1.2.3