~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kleopatra/view/keylistcontroller.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
class QAction;
45
45
class QPoint;
46
46
class QItemSelectionModel;
 
47
class KActionCollection;
47
48
 
48
49
namespace Kleo {
49
50
 
65
66
        void setHierarchicalModel( AbstractKeyListModel * model );
66
67
        AbstractKeyListModel * hierarchicalModel() const;
67
68
 
 
69
        void setParentWidget( QWidget * parent );
 
70
        QWidget * parentWidget() const;
 
71
 
 
72
        QAbstractItemView * currentView() const;
 
73
 
68
74
        void setTabWidget( TabWidget * tabs );
69
75
        TabWidget * tabWidget() const;
70
76
 
71
77
        void registerCommand( Command * cmd );
72
78
 
 
79
        void createActions( KActionCollection * collection );
 
80
 
73
81
        template <typename T_Command>
74
82
        void registerActionForCommand( QAction * action ) {
75
 
            this->registerAction( action, T_Command::restrictions() /*, &KeyListController::create<T_Command>*/ );
 
83
            this->registerAction( action, T_Command::restrictions(), &KeyListController::template create<T_Command> );
76
84
        }
77
85
 
78
86
        void enableDisableActions( const QItemSelectionModel * sm ) const;
81
89
        bool shutdownWarningRequired() const;
82
90
 
83
91
    private:
84
 
        void registerAction( QAction * action, Command::Restrictions restrictions , Command * (KeyListController::*create)()=0 );
 
92
        void registerAction( QAction * action, Command::Restrictions restrictions , Command * (*create)( QAbstractItemView*, KeyListController* ) );
 
93
 
 
94
        template <typename T_Command>
 
95
        static Command * create( QAbstractItemView * v, KeyListController * c ) { return new T_Command( v, c ); }
85
96
 
86
97
    public Q_SLOTS:
87
98
        void addView( QAbstractItemView * view );
88
99
        void removeView( QAbstractItemView * view );
 
100
        void setCurrentView( QAbstractItemView * view );
89
101
 
90
102
        void cancelCommands();
91
103
        void updateConfig();