~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to libs/main/KoView.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "KoDocument.h"
28
28
#include "KoMainWindow.h"
29
29
#include "KoViewAdaptor.h"
30
 
#include "KoDockFactory.h"
 
30
#include "KoDockFactoryBase.h"
31
31
 
32
32
#include <kactioncollection.h>
33
33
#include <kglobalsettings.h>
148
148
 
149
149
    KStatusBar * sb = statusBar();
150
150
    if (sb) { // No statusbar in e.g. konqueror
151
 
        //coll->setHighlightingEnabled( true );
152
 
#ifdef __GNUC__
153
 
#warning portKDE4
154
 
#endif
155
 
#if 0
156
 
        connect(coll, SIGNAL(actionStatusText(const QString &)),
157
 
                this, SLOT(slotActionStatusText(const QString &)));
158
 
        connect(coll, SIGNAL(clearStatusText()),
159
 
                this, SLOT(slotClearStatusText()));
160
 
#endif
161
 
 
162
151
        connect(d->document, SIGNAL(statusBarMessage(const QString&)),
163
152
                this, SLOT(slotActionStatusText(const QString&)));
164
153
        connect(d->document, SIGNAL(clearStatusBarMessage()),
171
160
 
172
161
    // add all plugins.
173
162
    foreach(const QString & docker, KoDockRegistry::instance()->keys()) {
174
 
        KoDockFactory *factory = KoDockRegistry::instance()->value(docker);
175
 
        createDockWidget(factory);
 
163
        KoDockFactoryBase *factory = KoDockRegistry::instance()->value(docker);
 
164
        if (shell())
 
165
            shell()->createDockWidget(factory);
176
166
    }
177
167
 
178
168
    actionCollection()->addAssociatedWidget(this);
448
438
    shell->show();
449
439
}
450
440
 
451
 
KoDockerManager * KoView::dockerManager() const
452
 
{
453
 
    KoMainWindow *mw = shell();
454
 
    return mw ? mw->dockerManager() : 0;
455
 
}
456
 
 
457
 
void KoView::setDockerManager(KoDockerManager *dm)
458
 
{
459
 
    KoMainWindow *mw = shell();
460
 
 
461
 
    if(mw)
462
 
        mw->setDockerManager(dm);
463
 
}
464
 
 
465
441
KoMainWindow * KoView::shell() const
466
442
{
467
443
    return dynamic_cast<KoMainWindow *>(window());
492
468
        sb->clearMessage();
493
469
}
494
470
 
495
 
// DCOPObject *KoView::dcopObject()
496
 
// {
497
 
//     if ( !d->m_dcopObject )
498
 
//         d->m_dcopObject = new KoViewIface( this );
499
 
//     return d->m_dcopObject;
500
 
// }
501
 
 
502
 
QDockWidget *KoView::createDockWidget(KoDockFactory* factory)
503
 
{
504
 
    return shell() ? shell()->createDockWidget(factory) : 0;
505
 
}
506
 
 
507
 
void KoView::removeDockWidget(QDockWidget *dock)
508
 
{
509
 
    if (shell())
510
 
        shell()->removeDockWidget(dock);
511
 
}
512
 
 
513
 
void KoView::restoreDockWidget(QDockWidget *dock)
514
 
{
515
 
    if (shell())
516
 
        shell()->restoreDockWidget(dock);
517
 
}
518
 
 
519
471
QToolBar* KoView::viewBar()
520
472
{
521
473
    if (!d->viewBar) {
545
497
    return answer;
546
498
}
547
499
 
548
 
#include "KoView_p.moc"
549
 
#include "KoView.moc"
 
500
#include <KoView_p.moc>
 
501
#include <KoView.moc>