~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to plan/libs/ui/kptdocumentseditor.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "kptitemviewsettup.h"
31
31
#include "kptdebug.h"
32
32
 
 
33
#include <KoIcon.h>
 
34
 
33
35
#include <QMenu>
34
36
#include <QList>
35
37
#include <QVBoxLayout>
36
38
 
37
39
 
38
40
#include <kaction.h>
39
 
#include <kicon.h>
40
41
#include <kglobal.h>
41
42
#include <klocale.h>
42
43
#include <kactioncollection.h>
102
103
}
103
104
 
104
105
//-----------------------------------
105
 
DocumentsEditor::DocumentsEditor( KoDocument *part, QWidget *parent )
106
 
    : ViewBase( part, parent )
 
106
DocumentsEditor::DocumentsEditor(KoPart *part, KoDocument *doc, QWidget *parent)
 
107
    : ViewBase(part, doc, parent)
107
108
{
108
109
    setupGui();
109
110
    
114
115
    
115
116
    m_view->setEditTriggers( m_view->editTriggers() | QAbstractItemView::EditKeyPressed );
116
117
 
117
 
    connect( model(), SIGNAL( executeCommand( KUndo2Command* ) ), part, SLOT( addCommand( KUndo2Command* ) ) );
 
118
    connect( model(), SIGNAL( executeCommand( KUndo2Command* ) ), doc, SLOT( addCommand( KUndo2Command* ) ) );
118
119
 
119
120
    connect( m_view, SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ), this, SLOT( slotCurrentChanged( const QModelIndex & ) ) );
120
121
 
213
214
void DocumentsEditor::setupGui()
214
215
{
215
216
    QString name = "documentseditor_edit_list";
216
 
    actionEditDocument  = new KAction(KIcon( "document-properties" ), i18n("Edit..."), this);
 
217
    actionEditDocument  = new KAction(koIcon("document-properties"), i18n("Edit..."), this);
217
218
    actionCollection()->addAction("edit_documents", actionEditDocument );
218
219
//    actionEditDocument->setShortcut( KShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) );
219
220
    connect( actionEditDocument, SIGNAL( triggered( bool ) ), SLOT( slotEditDocument() ) );
220
221
    addAction( name, actionEditDocument );
221
 
    
222
 
    actionViewDocument  = new KAction(KIcon( "document-preview" ), i18nc("@action View a document", "View..."), this);
 
222
 
 
223
    actionViewDocument  = new KAction(koIcon("document-preview"), i18nc("@action View a document", "View..."), this);
223
224
    actionCollection()->addAction("view_documents", actionViewDocument );
224
225
//    actionViewDocument->setShortcut( KShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_I ) );
225
226
    connect( actionViewDocument, SIGNAL( triggered( bool ) ), SLOT( slotViewDocument() ) );
226
227
    addAction( name, actionViewDocument );
227
228
 
228
229
    
229
 
/*    actionDeleteSelection  = new KAction(KIcon( "edit-delete" ), i18n("Delete"), this);
 
230
/*    actionDeleteSelection  = new KAction(koIcon("edit-delete"), i18n("Delete"), this);
230
231
    actionCollection()->addAction("delete_selection", actionDeleteSelection );
231
232
    actionDeleteSelection->setShortcut( KShortcut( Qt::Key_Delete ) );
232
233
    connect( actionDeleteSelection, SIGNAL( triggered( bool ) ), SLOT( slotDeleteSelection() ) );
239
240
void DocumentsEditor::slotOptions()
240
241
{
241
242
    kDebug(planDbg());
242
 
    ItemViewSettupDialog dlg( m_view/*->masterView()*/ );
 
243
    ItemViewSettupDialog dlg( this, m_view/*->masterView()*/ );
243
244
    dlg.exec();
244
245
}
245
246