home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / KoPartSelectAction.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-30  |  1.9 KB  |  58 lines

  1. /* This file is part of the KDE libraries
  2.     Copyright (C) 2001 David Faure <faure@kde.org>
  3.  
  4.     This library is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU Library General Public
  6.     License version 2 as published by the Free Software Foundation.
  7.  
  8.     This library is distributed in the hope that it will be useful,
  9.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.     Library General Public License for more details.
  12.  
  13.     You should have received a copy of the GNU Library General Public License
  14.     along with this library; see the file COPYING.LIB.  If not, write to
  15.     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16.  * Boston, MA 02110-1301, USA.
  17. */
  18.  
  19. #ifndef koPartSelectAction_h
  20. #define koPartSelectAction_h
  21.  
  22. #include <kaction.h>
  23. #include <KoQueryTrader.h>
  24.  
  25. /**
  26.  * An action for inserting an embedded object.
  27.  * In a toolbar it presents itself as a button that opens the part-select dialog,
  28.  * but in a popupmenu it presents itself as a submenu with all available parts.
  29.  */
  30. class KOFFICEUI_EXPORT KoPartSelectAction : public KActionMenu
  31. {
  32.     Q_OBJECT
  33.  
  34. public:
  35.     KoPartSelectAction( const QString& text, QObject* parent = 0, const char* name = 0 );
  36.     KoPartSelectAction( const QString& text, const QString& icon,
  37.                         QObject* parent = 0, const char* name = 0 );
  38.     KoPartSelectAction( const QString& text, const QString& icon,
  39.                         QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
  40.  
  41.     KoDocumentEntry documentEntry() const { return m_documentEntry; }
  42.  
  43.     //virtual void plug(QWidget* widget, int index);
  44.  
  45. protected:
  46.     void init();
  47.  
  48. protected slots:
  49.     virtual void slotActivated();
  50.     void slotActionActivated();
  51.  
  52. private:
  53.     QValueList<KoDocumentEntry> m_lstEntries;
  54.     KoDocumentEntry m_documentEntry;
  55. };
  56.  
  57. #endif
  58.