~ubuntu-branches/ubuntu/saucy/koffice/saucy

« back to all changes in this revision

Viewing changes to libs/koreport/wrtembed/KoReportDesigner.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-12-06 15:30:09 UTC
  • mfrom: (0.13.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101206153009-yf0dqbp9l7fzwxi8
Tags: 1:2.2.91-0ubuntu1
New upstream RC release

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
 
184
184
KoReportDesigner::~KoReportDesigner()
185
185
{
 
186
    delete d->zoom;
186
187
    delete d;
 
188
    delete m_sectionData;
187
189
}
188
190
 
189
191
///The loading Code
274
276
        }
275
277
    }
276
278
    this->slotPageButton_Pressed();
277
 
    emit(reportDataChanged());
 
279
    emit reportDataChanged();
278
280
    setModified(false);
279
281
}
280
282
 
369
371
        m_kordata = kodata;
370
372
        slotPageButton_Pressed();
371
373
        setModified(true);
372
 
        emit(reportDataChanged());
 
374
        emit reportDataChanged();
373
375
    }
374
376
}
375
377
 
571
573
    m_modified = mod;
572
574
 
573
575
    if (m_modified) {
574
 
        emit(dirty());
 
576
        emit dirty();
575
577
    }
576
578
}
577
579
 
862
864
                item = new KoReportDesignerItemLine(v->designer(), v->scene(), pos);
863
865
            }
864
866
            else {
865
 
                KoReportPluginManager &pluginManager =  KoReportPluginManager::self();
866
 
                KoReportPluginInterface *plug = pluginManager.plugin(m_sectionData->insertItem);
 
867
                KoReportPluginManager* pluginManager = KoReportPluginManager::self();
 
868
                KoReportPluginInterface *plug = pluginManager->plugin(m_sectionData->insertItem);
867
869
                if (plug) {
868
870
                    QObject *obj = plug->createDesignerInstance(v->designer(), v->scene(), pos);
869
871
                    if (obj) {
896
898
 
897
899
void KoReportDesigner::changeSet(KoProperty::Set *s)
898
900
{
899
 
    //Set the checked state of the report proerties button
 
901
    //Set the checked state of the report properties button
900
902
    if (s == m_set)
901
903
        d->pageButton->setCheckState(Qt::Checked);
902
904
    else
903
905
        d->pageButton->setCheckState(Qt::Unchecked);
904
906
 
905
907
    m_itmset = s;
906
 
    emit(propertySetChanged());
 
908
    emit propertySetChanged();
907
909
}
908
910
 
909
911
//
1166
1168
    return unique;
1167
1169
}
1168
1170
 
1169
 
QList<QAction*> KoReportDesigner::actions()
 
1171
QList<QAction*> KoReportDesigner::actions(QObject* parent)
1170
1172
{
1171
 
    KoReportPluginManager &manager = KoReportPluginManager::self();
 
1173
    KoReportPluginManager* manager = KoReportPluginManager::self();
1172
1174
    QAction *act;
1173
1175
    QList<QAction*> actList;
1174
1176
 
1175
 
    actList = manager.actions();
 
1177
    actList = manager->actions();
1176
1178
    
1177
 
    act = new QAction(KIcon("line"), i18n("Line"), 0);
 
1179
    act = new QAction(KIcon("line"), i18n("Line"), parent);
1178
1180
    act->setObjectName("report:line");
1179
1181
    act->setData(9);
1180
1182
    actList << act;
1189
1191
    foreach(QAction *a, actList) {
1190
1192
        ++i;
1191
1193
        if(a->data().toInt() >= 10) {
1192
 
            QAction *sep = new QAction("separator", 0);
 
1194
            QAction *sep = new QAction("separator", parent);
1193
1195
            sep->setSeparator(true);
1194
1196
            actList.insert(i-1, sep);
1195
1197
            break;