~ubuntu-branches/ubuntu/oneiric/kig/oneiric

« back to all changes in this revision

Viewing changes to modes/normal.h

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2011-07-10 11:57:38 UTC
  • Revision ID: james.westby@ubuntu.com-20110710115738-gdjnn1kctr49lmy9
Tags: upstream-4.6.90+repack
ImportĀ upstreamĀ versionĀ 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C)  2002  Dominique Devriese <devriese@kde.org>
 
2
 
 
3
// This program is free software; you can redistribute it and/or
 
4
// modify it under the terms of the GNU General Public License
 
5
// as published by the Free Software Foundation; either version 2
 
6
// of the License, or (at your option) any later version.
 
7
 
 
8
// This program 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
 
11
// GNU General Public License for more details.
 
12
 
 
13
// You should have received a copy of the GNU General Public License
 
14
// along with this program; if not, write to the Free Software
 
15
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
16
// 02110-1301, USA.
 
17
 
 
18
#ifndef KIG_MODES_NORMAL_H
 
19
#define KIG_MODES_NORMAL_H
 
20
 
 
21
#include "base_mode.h"
 
22
 
 
23
#include <qpoint.h>
 
24
#include <set>
 
25
 
 
26
class NormalMode
 
27
  : public BaseMode
 
28
{
 
29
public:
 
30
  NormalMode( KigPart& );
 
31
  ~NormalMode();
 
32
protected:
 
33
  void dragRect( const QPoint& p, KigWidget& w );
 
34
  void dragObject( const std::vector<ObjectHolder*>& os, const QPoint& pointClickedOn,
 
35
                   KigWidget& w, bool ctrlOrShiftDown );
 
36
  void leftClickedObject( ObjectHolder* o, const QPoint& p,
 
37
                          KigWidget& w, bool ctrlOrShiftDown );
 
38
  void midClicked( const QPoint& p, KigWidget& w );
 
39
  void rightClicked( const std::vector<ObjectHolder*>& os, const QPoint& p, KigWidget& w );
 
40
  void mouseMoved( const std::vector<ObjectHolder*>& os, const QPoint& p, KigWidget& w,
 
41
                   bool shiftpressed );
 
42
  void selectAll();
 
43
  void deselectAll();
 
44
  void invertSelection();
 
45
 
 
46
protected:
 
47
  /**
 
48
   * Objcects were added..
 
49
   */
 
50
  void redrawScreen( KigWidget* );
 
51
 
 
52
  void enableActions();
 
53
 
 
54
  void deleteObjects();
 
55
  void showHidden();
 
56
  void newMacro();
 
57
  void editTypes();
 
58
  void browseHistory();
 
59
 
 
60
public:
 
61
  void selectObject( ObjectHolder* o );
 
62
  void selectObjects( const std::vector<ObjectHolder*>& os );
 
63
  void unselectObject( ObjectHolder* o );
 
64
  void clearSelection();
 
65
 
 
66
//   KigObjectsPopup* popup( const Objects& os );
 
67
//   KigDocumentPopup* popup( KigDocument* );
 
68
protected:
 
69
  /**
 
70
   * selected objects...
 
71
   */
 
72
  std::set<ObjectHolder*> sos;
 
73
};
 
74
 
 
75
#endif