kedittoolbar.h Source File (kdeui Library)

| # kdeui Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kedittoolbar.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 2000 Kurt Granroth <granroth@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017 */
    00018 #ifndef _KEDITTOOLBAR_H
    00019 #define _KEDITTOOLBAR_H
    00020
    00021 #include <qwidget.h>
    00022 #include <kxmlguiclient.h>
    00023 #include <kdialogbase.h>
    00024
    00025 class KActionCollection;
    00026 class QComboBox;
    00027 class QPushButton;
    00028 class KListView;
    00029 class QListViewItem;
    00030
    00031 class KEditToolbarWidget;
    00032 class KEditToolbarPrivate;
    00033 class KEditToolbarWidgetPrivate;
    00034
    00102 class KEditToolbar : public KDialogBase
    00103 {
    00104     Q_OBJECT
    00105 public:
    00136   KEditToolbar(KActionCollection *collection,
    00137                const QString& xmlfile = QString::null, bool global = true,
    00138                            QWidget* parent = 0, const char* name = 0);
    00139
    00159   KEditToolbar(KXMLGUIFactory* factory, QWidget* parent = 0, const char* name = 0);
    00160
    00162   ~KEditToolbar();
    00163
    00164 protected slots:
    00168   virtual void slotOk();
    00172   virtual void slotApply();
    00173
    00177   void acceptOK(bool b);
    00178
    00179 signals:
    00185   void newToolbarConfig();
    00186
    00187 private:
    00188   void init();
    00189   KEditToolbarWidget *m_widget;
    00190 protected:
    00191   virtual void virtual_hook( int id, void* data );
    00192 private:
    00193   KEditToolbarPrivate *d;
    00194 };
    00195
    00216 class KEditToolbarWidget : public QWidget, virtual public KXMLGUIClient
    00217 {
    00218   Q_OBJECT
    00219 public:
    00249   KEditToolbarWidget(KActionCollection *collection,
    00250                      const QString& file = QString::null,
    00251                      bool global = true, QWidget *parent = 0L);
    00252
    00273   KEditToolbarWidget(KXMLGUIFactory* factory, QWidget *parent = 0L);
    00274
    00280   virtual ~KEditToolbarWidget();
    00281
    00285   virtual KActionCollection *actionCollection() const;
    00286
    00295   bool save();
    00296
    00297 signals:
    00301   void enableOk(bool);
    00302
    00303 protected slots:
    00304   void slotToolbarSelected(const QString& text);
    00305
    00306   void slotInactiveSelected(QListViewItem *item);
    00307   void slotActiveSelected(QListViewItem *item);
    00308
    00309   void slotInsertButton();
    00310   void slotRemoveButton();
    00311   void slotUpButton();
    00312   void slotDownButton();
    00313
    00314 protected:
    00315   void setupLayout();
    00316
    00317   void loadToolbarCombo();
    00318   void loadActionList(QDomElement& elem);
    00319   void updateLocal(QDomElement& elem);
    00320
    00321 private:
    00322   KListView *m_inactiveList;
    00323   KListView *m_activeList;
    00324   QComboBox *m_toolbarCombo;
    00325
    00326   QPushButton *m_upAction;
    00327   QPushButton *m_removeAction;
    00328   QPushButton *m_insertAction;
    00329   QPushButton *m_downAction;
    00330
    00331 protected:
    00332   virtual void virtual_hook( int id, void* data );
    00333 private:
    00334   KEditToolbarWidgetPrivate *d;
    00335 };
    00336
    00337 #endif // _KEDITTOOLBAR_H

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:56:48 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001