• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kig

base_mode.h

Go to the documentation of this file.
00001 // Copyright (C)  2002  Dominique Devriese <devriese@kde.org>
00002 
00003 // This program is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU General Public License
00005 // as published by the Free Software Foundation; either version 2
00006 // of the License, or (at your option) any later version.
00007 
00008 // This program 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
00011 // GNU General Public License for more details.
00012 
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016 // 02110-1301, USA.
00017 
00018 #ifndef KIG_MODE_BASE_MODE_H
00019 #define KIG_MODE_BASE_MODE_H
00020 
00021 #include "mode.h"
00022 
00023 #include <qpoint.h>
00024 #include <vector>
00025 
00026 class KigWidget;
00027 class ObjectHolder;
00028 
00033 class BaseMode
00034   : public KigMode
00035 {
00036   QPoint mplc;
00037   std::vector<ObjectHolder*> moco;
00038 
00039   void leftClicked( QMouseEvent* e, KigWidget* v );
00040   void leftMouseMoved( QMouseEvent*, KigWidget* );
00041   void leftReleased( QMouseEvent* e, KigWidget* v );
00042   void midClicked( QMouseEvent* e, KigWidget* v );
00043   void midReleased( QMouseEvent* e, KigWidget* v );
00044   void rightClicked( QMouseEvent*, KigWidget* );
00045   void mouseMoved( QMouseEvent* e, KigWidget* v );
00046 
00047 protected:
00048   void enableActions();
00049 
00050   std::vector<ObjectHolder*> oco();
00051   QPoint pointLocation();
00052 protected:
00053 
00054   virtual void dragRect( const QPoint& p, KigWidget& w );
00055   virtual void dragObject( const std::vector<ObjectHolder*>& os, const QPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown );
00056   virtual void leftClickedObject( ObjectHolder* o, const QPoint& p,
00057                                   KigWidget& w, bool ctrlOrShiftDown ) = 0;
00058   virtual void midClicked( const QPoint& p, KigWidget& w ) = 0;
00059   virtual void rightClicked( const std::vector<ObjectHolder*>& oco, const QPoint& p, KigWidget& w ) = 0;
00060   virtual void mouseMoved( const std::vector<ObjectHolder*>& os, const QPoint& p, KigWidget& w, bool shiftpressed ) = 0;
00061 
00062 protected:
00063   BaseMode( KigPart& );
00064   ~BaseMode();
00065 };
00066 
00067 #endif

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal