Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/forms/kexiformpart.cpp
Show All 20 Lines | |||||
21 | 21 | | |||
22 | #include "kexiformpart.h" | 22 | #include "kexiformpart.h" | ||
23 | #include <KexiIcon.h> | 23 | #include <KexiIcon.h> | ||
24 | #include <KexiView.h> | 24 | #include <KexiView.h> | ||
25 | #include <KexiWindow.h> | 25 | #include <KexiWindow.h> | ||
26 | #include <KexiMainWindowIface.h> | 26 | #include <KexiMainWindowIface.h> | ||
27 | #include <kexiproject.h> | 27 | #include <kexiproject.h> | ||
28 | #include <kexipartitem.h> | 28 | #include <kexipartitem.h> | ||
29 | #include <widget/KexiDataSourceComboBox.h> | 29 | #include <KexiPropertyPaneWidget.h> | ||
30 | #include <KexiDataSourceComboBox.h> | ||||
30 | #include <kexiutils/utils.h> | 31 | #include <kexiutils/utils.h> | ||
31 | #include <kexi_global.h> | 32 | #include <kexi_global.h> | ||
32 | #include <formeditor/form.h> | 33 | #include <formeditor/form.h> | ||
33 | #include <formeditor/formIO.h> | 34 | #include <formeditor/formIO.h> | ||
34 | #include <formeditor/WidgetTreeWidget.h> | 35 | #include <formeditor/WidgetTreeWidget.h> | ||
35 | #include "widgets/kexidbform.h" | 36 | #include "widgets/kexidbform.h" | ||
36 | #include "kexiformscrollview.h" | 37 | #include "kexiformscrollview.h" | ||
37 | #include "kexiformmanager.h" | 38 | #include "kexiformmanager.h" | ||
38 | #include "kexidatasourcepage.h" | 39 | #include "kexidatasourcepage.h" | ||
39 | 40 | | |||
40 | #include <KDbConnection> | 41 | #include <KDbConnection> | ||
41 | 42 | | |||
42 | #include <KProperty> | 43 | #include <KProperty> | ||
43 | 44 | | |||
44 | #include <KActionMenu> | 45 | #include <KActionMenu> | ||
45 | 46 | | |||
46 | #include <QVBoxLayout> | 47 | #include <QVBoxLayout> | ||
47 | #include <QDomDocument> | 48 | #include <QDomDocument> | ||
48 | #include <QTabWidget> | | |||
49 | #include <QAction> | 49 | #include <QAction> | ||
50 | #include <QDebug> | 50 | #include <QDebug> | ||
51 | 51 | | |||
52 | //! @todo #define KEXI_SHOW_SPLITTER_WIDGET | 52 | //! @todo #define KEXI_SHOW_SPLITTER_WIDGET | ||
53 | 53 | | |||
54 | //! @internal | 54 | //! @internal | ||
55 | class Q_DECL_HIDDEN KexiFormPart::Private | 55 | class Q_DECL_HIDDEN KexiFormPart::Private | ||
56 | { | 56 | { | ||
▲ Show 20 Lines • Show All 272 Lines • ▼ Show 20 Line(s) | 328 | { | |||
329 | return d->dataSourcePage; | 329 | return d->dataSourcePage; | ||
330 | } | 330 | } | ||
331 | 331 | | |||
332 | KFormDesigner::WidgetTreeWidget* KexiFormPart::widgetTreePage() const | 332 | KFormDesigner::WidgetTreeWidget* KexiFormPart::widgetTreePage() const | ||
333 | { | 333 | { | ||
334 | return d->widgetTree; | 334 | return d->widgetTree; | ||
335 | } | 335 | } | ||
336 | 336 | | |||
337 | void KexiFormPart::setupCustomPropertyPanelTabs(QTabWidget *tab) | 337 | void KexiFormPart::setupPropertyPane(KexiPropertyPaneWidget *pane) | ||
338 | { | 338 | { | ||
339 | if (!d->dataSourcePage) { | 339 | if (!d->dataSourcePage) { | ||
340 | d->dataSourcePage = new KexiDataSourcePage(0); | 340 | d->dataSourcePage = new KexiDataSourcePage(0); | ||
341 | d->dataSourcePage->setObjectName("dataSourcePage"); | 341 | d->dataSourcePage->setObjectName("dataSourcePage"); | ||
342 | connect(d->dataSourcePage, | 342 | connect(d->dataSourcePage, | ||
343 | SIGNAL(jumpToObjectRequested(QString,QString)), | 343 | SIGNAL(jumpToObjectRequested(QString,QString)), | ||
344 | KexiMainWindowIface::global()->thisWidget(), | 344 | KexiMainWindowIface::global()->thisWidget(), | ||
345 | SLOT(highlightObject(QString,QString))); | 345 | SLOT(highlightObject(QString,QString))); | ||
Show All 11 Lines | 355 | connect(d->dataSourcePage, | |||
357 | KexiFormManager::self(), | 357 | KexiFormManager::self(), | ||
358 | SLOT(insertAutoFields(QString,QString,QStringList))); | 358 | SLOT(insertAutoFields(QString,QString,QStringList))); | ||
359 | #endif | 359 | #endif | ||
360 | } | 360 | } | ||
361 | 361 | | |||
362 | KexiProject *prj = KexiMainWindowIface::global()->project(); | 362 | KexiProject *prj = KexiMainWindowIface::global()->project(); | ||
363 | d->dataSourcePage->setProject(prj); | 363 | d->dataSourcePage->setProject(prj); | ||
364 | 364 | | |||
365 | tab->addTab(d->dataSourcePage, koIcon("server-database"), QString()); | 365 | pane->addSection(d->dataSourcePage, xi18n("Data source")); | ||
366 | tab->setTabToolTip(tab->indexOf(d->dataSourcePage), xi18n("Data Source")); | | |||
367 | 366 | | |||
368 | if (!d->widgetTreeWidget) { | 367 | if (!d->widgetTreeWidget) { | ||
369 | d->widgetTreeWidget = new QWidget; | 368 | d->widgetTreeWidget = new QWidget; | ||
370 | QVBoxLayout *lyr = new QVBoxLayout(d->widgetTreeWidget); | 369 | QVBoxLayout *lyr = new QVBoxLayout(d->widgetTreeWidget); | ||
371 | lyr->setContentsMargins(2, 2, 2, 2); | 370 | lyr->setContentsMargins(0, 0, 0, 0); | ||
372 | d->widgetTree = new KFormDesigner::WidgetTreeWidget; | 371 | d->widgetTree = new KFormDesigner::WidgetTreeWidget; | ||
373 | d->widgetTree->setObjectName("KexiFormPart:WidgetTreeWidget"); | 372 | d->widgetTree->setObjectName("KexiFormPart:WidgetTreeWidget"); | ||
374 | lyr->addWidget(d->widgetTree); | 373 | lyr->addWidget(d->widgetTree); | ||
375 | } | 374 | } | ||
376 | tab->addTab(d->widgetTreeWidget, KexiIcon("widgets"), QString()); | 375 | //! @todo pane->addSection(d->widgetTreeWidget, xi18n("Widgets")); | ||
377 | tab->setTabToolTip(tab->indexOf(d->widgetTreeWidget), xi18n("Widgets")); | | |||
378 | } | 376 | } | ||
379 | 377 | | |||
380 | //---------------- | 378 | //---------------- | ||
381 | 379 | | |||
382 | class Q_DECL_HIDDEN KexiFormPartTempData::Private | 380 | class Q_DECL_HIDDEN KexiFormPartTempData::Private | ||
383 | { | 381 | { | ||
384 | public: | 382 | public: | ||
385 | Private(KexiFormPartTempData *temp) | 383 | Private(KexiFormPartTempData *temp) | ||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |