KstDataManagerI::KstDataManagerI(KstDoc *in_doc, QWidget* parent, const char* name, bool modal, WFlags fl) : KstDataManager(parent, name, modal, fl) { doc = in_doc; _yesPixmap = QPixmap(locate("data", "kst/pics/yes.png")); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(Purge, SIGNAL(clicked()), doc, SLOT(purge())); connect(DataView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(edit_I())); connect(DataView, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(currentChanged(QListViewItem *))); connect(DataView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(currentChanged(QListViewItem *))); connect(NewCurve, SIGNAL(clicked()), KstCurveDialogI::globalInstance(), SLOT(show())); connect(NewHs, SIGNAL(clicked()), KstHsDialogI::globalInstance(), SLOT(show())); connect(NewEq, SIGNAL(clicked()), KstEqDialogI::globalInstance(), SLOT(show())); connect(NewPlugin, SIGNAL(clicked()), KstPluginDialogI::globalInstance(), SLOT(show())); connect(NewEvent, SIGNAL(clicked()), KstEventMonitorI::globalInstance(), SLOT(show())); connect(NewPSD, SIGNAL(clicked()), KstPsdDialogI::globalInstance(), SLOT(show())); connect(NewVector, SIGNAL(clicked()), KstVectorDialogI::globalInstance(), SLOT(show())); connect(NewImage, SIGNAL(clicked()), KstImageDialogI::globalInstance(), SLOT(show())); connect(NewMatrix, SIGNAL(clicked()), KstMatrixDialogI::globalInstance(), SLOT(show())); connect(NewCSD, SIGNAL(clicked()), KstCsdDialogI::globalInstance(), SLOT(show())); connect(DataView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), this, SLOT(contextMenu(QListViewItem*, const QPoint&, int))); }
KstDataManagerI::KstDataManagerI(KstDoc *in_doc, QWidget* parent, const char* name, bool modal, WFlags fl) : KstDataManager(parent, name, modal, fl) { doc = in_doc; connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(Purge, SIGNAL(clicked()), doc, SLOT(purge())); connect(DataView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(edit_I())); connect(DataView, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(currentChanged(QListViewItem *))); connect(NewCurve, SIGNAL(clicked()), KstCurveDialogI::globalInstance(), SLOT(show_New())); connect(NewHs, SIGNAL(clicked()), KstHsDialogI::globalInstance(), SLOT(show_New())); connect(NewEq, SIGNAL(clicked()), KstEqDialogI::globalInstance(), SLOT(show_New())); connect(NewPlugin, SIGNAL(clicked()), KstPluginDialogI::globalInstance(), SLOT(show_New())); connect(NewPSD, SIGNAL(clicked()), KstPsdDialogI::globalInstance(), SLOT(show_New())); connect(NewVector, SIGNAL(clicked()), KstVectorDialogI::globalInstance(), SLOT(show_New())); connect(DataView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), this, SLOT(contextMenu(QListViewItem*, const QPoint&, int))); }
KstPsdDialogI::KstPsdDialogI(QWidget* parent, const char* name, bool modal, WFlags fl) : KstPsdDialog(parent, name, modal, fl) { connect(Select, SIGNAL(activated(int)), this, SLOT(update(int))); connect(New, SIGNAL(clicked()), this, SLOT(new_I())); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(_vector, SIGNAL(newVectorCreated()), this, SIGNAL(modified())); }
KstPluginDialogI::KstPluginDialogI(QWidget* parent, const char* name, bool modal, WFlags fl) : KstPluginDialog(parent, name, modal, fl) { connect(Select, SIGNAL(activated(int)), this, SLOT(updatePlugin(int))); connect(New, SIGNAL(clicked()), this, SLOT(new_I())); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(PluginCombo, SIGNAL(activated(int)), this, SLOT(pluginChanged(int))); connect(_pluginManager, SIGNAL(clicked()), this, SLOT(showPluginManager())); QGridLayout *grid = new QGridLayout(_pluginFrame, 1, 1); grid->addWidget(_frameWidget = new QWidget(_pluginFrame, "Frame Widget"), 0, 0); }
KstCurveDialogI::KstCurveDialogI(QWidget* parent, const char* name, bool modal, WFlags fl) : KstCurveDialog(parent, name, modal, fl) { connect(Select, SIGNAL(activated(int)), this, SLOT(update(int))); connect(New, SIGNAL(clicked()), this, SLOT(new_I())); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(_xVector, SIGNAL(newVectorCreated()), this, SIGNAL(modified())); connect(_yVector, SIGNAL(newVectorCreated()), this, SIGNAL(modified())); connect(_xError, SIGNAL(newVectorCreated()), this, SIGNAL(modified())); connect(_yError, SIGNAL(newVectorCreated()), this, SIGNAL(modified())); _xError->provideNoneVector(true); _yError->provideNoneVector(true); }
KstVectorDialogI::KstVectorDialogI(QWidget* parent, const char* name, bool modal, WFlags fl) : KstVectorDialog(parent, name, modal, fl) { connect(Select, SIGNAL(activated(int)), this, SLOT(update(int))); connect(New, SIGNAL(clicked()), this, SLOT(new_I())); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); FileName->setMode(KFile::File | KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly); _fieldCompletion = Field->completionObject(); Field->setAutoDeleteCompletionObject( true ); // connect(Field,SIGNAL(returnPressed(const QString&)), // _fieldCompletion,SLOT(addItem(const QString&)); }
KstDataManagerI::KstDataManagerI(KstDoc *in_doc, QWidget* parent, const char* name, bool modal, WFlags fl) : KstDataManager(parent, name, modal, fl) { doc = in_doc; _yesPixmap = QPixmap(locate("data", "kst/pics/yes.png")); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(New, SIGNAL(clicked()), this, SLOT(new_I())); connect(Purge, SIGNAL(clicked()), doc, SLOT(purge())); connect(DataView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(edit_I())); connect(DataView, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(currentChanged(QListViewItem *))); connect(DataView, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); connect(DataView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), this, SLOT(contextMenu(QListViewItem*, const QPoint&, int))); }
KstDataManagerI::KstDataManagerI(KstDoc *in_doc, QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); doc = in_doc; _yesPixmap = QPixmap(KStandardDirs::locate("data", "kst/pics/yes.png")); connect(Close, SIGNAL(clicked()), this, SLOT(reject())); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(Purge, SIGNAL(clicked()), doc, SLOT(purge())); connect(DataView, SIGNAL(doubleClicked(Q3ListViewItem *)), this, SLOT(edit_I())); connect(DataView, SIGNAL(currentChanged(Q3ListViewItem *)), this, SLOT(currentChanged(Q3ListViewItem *))); connect(DataView, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); connect(DataView, SIGNAL(contextMenuRequested(Q3ListViewItem*, const QPoint&, int)), this, SLOT(contextMenu(Q3ListViewItem*, const QPoint&, int))); _searchWidget = new K3ListViewSearchLineWidget(DataView, SearchBox); Q3ValueList<int> cols; cols.append(0); _searchWidget->createSearchLine(DataView); _searchWidget->searchLine()->setSearchColumns(cols); // Q3MainWindow *main = static_cast<Q3MainWindow*>(parent); // main->setUsesTextLabel(true); // // _primitive = new Q3ToolBar(i18n("Primitive Objects"), main, this); // _primitive->setFrameStyle(Q3Frame::NoFrame); // _primitive->setOrientation(Qt::Vertical); // _primitive->setBackgroundMode(Qt::PaletteBase); // // _data = new Q3ToolBar(i18n("Data Objects"), main, this); // _data->setFrameStyle(Q3Frame::NoFrame); // _data->setOrientation(Qt::Vertical); // _data->setBackgroundMode(Qt::PaletteBase); // // _fits = new Q3ToolBar(i18n("Fit Objects"), main, this); // _fits->setFrameStyle(Q3Frame::NoFrame); // _fits->setOrientation(Qt::Vertical); // _fits->setBackgroundMode(Qt::PaletteBase); // // _filters = new Q3ToolBar(i18n("Filter Objects"), main, this); // _filters->setFrameStyle(Q3Frame::NoFrame); // _filters->setOrientation(Qt::Vertical); // _filters->setBackgroundMode(Qt::PaletteBase); // // ToolBox->setUpdatesEnabled(false); // // _primitive->setUpdatesEnabled(false); // _primitive->clear(); // // _data->setUpdatesEnabled(false); // _data->clear(); // // _fits->setUpdatesEnabled(false); // _fits->clear(); // // _filters->setUpdatesEnabled(false); // _filters->clear(); // // //Create canonical actions... // // createObjectAction(i18n("Scalar"), _primitive, KstScalarDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Vector"), _primitive, KstVectorDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Matrix"), _primitive, KstMatrixDialogI::globalInstance(), SLOT(show())); // // createObjectAction(i18n("String"), _primitive, KstStringDialogI::globalInstance(), SLOT(show())); // // createObjectAction(i18n("Curve"), _data, KstCurveDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Equation"), _data, KstEqDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Histogram"), _data, KstHsDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Power Spectrum"), _data, KstPsdDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Event Monitor"), _data, KstEventMonitorI::globalInstance(), SLOT(show())); // createObjectAction(i18n("Image"), _data, KstImageDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("CSD"), _data, KstCsdDialogI::globalInstance(), SLOT(show())); // // //Create plugin actions... // setupPluginActions(); // // //TODO sort the actions in each box alphabetically? // // QWidget *priw = new QWidget(_primitive); // priw->setBackgroundMode(Qt::PaletteBase); // _primitive->setStretchableWidget(priw); // // QWidget *datw = new QWidget(_data); // datw->setBackgroundMode(Qt::PaletteBase); // _data->setStretchableWidget(datw); // // QWidget *fitw = new QWidget(_fits); // fitw->setBackgroundMode(Qt::PaletteBase); // _fits->setStretchableWidget(fitw); // // QWidget *filw = new QWidget(_filters); // filw->setBackgroundMode(Qt::PaletteBase); // _filters->setStretchableWidget(filw); // // ToolBox->setUpdatesEnabled(true); // // _primitive->setUpdatesEnabled(true); // _data->setUpdatesEnabled(true); // _fits->setUpdatesEnabled(true); // _filters->setUpdatesEnabled(true); // // ToolBox->addItem(_primitive, i18n("Primitive Objects")); // ToolBox->addItem(_data, i18n("Data Objects")); // ToolBox->addItem(_fits, i18n("Fit Objects")); // ToolBox->addItem(_filters, i18n("Filter Objects")); }
KstDataManagerI::KstDataManagerI(KstDoc *in_doc, QWidget* parent, const char* name, bool modal, WFlags fl) : KstDataManager(parent, name, modal, fl) { doc = in_doc; _yesPixmap = QPixmap(locate("data", "kst/pics/yes.png")); connect(Edit, SIGNAL(clicked()), this, SLOT(edit_I())); connect(Delete, SIGNAL(clicked()), this, SLOT(delete_I())); connect(Purge, SIGNAL(clicked()), doc, SLOT(purge())); connect(DataView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(edit_I())); connect(DataView, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(currentChanged(QListViewItem *))); connect(DataView, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); connect(DataView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), this, SLOT(contextMenu(QListViewItem*, const QPoint&, int))); _searchWidget = new KListViewSearchLineWidget(DataView, SearchBox); QValueList<int> cols; cols.append(0); _searchWidget->createSearchLine(DataView); _searchWidget->searchLine()->setSearchColumns(cols); QMainWindow *main = static_cast<QMainWindow*>(parent); main->setUsesTextLabel(true); _primitive = new QToolBar(i18n("Create Primitive"), main, this); _primitive->setFrameStyle(QFrame::NoFrame); _primitive->setOrientation(Qt::Vertical); _primitive->setBackgroundMode(PaletteBase); _data = new QToolBar(i18n("Create Data Object"), main, this); _data->setFrameStyle(QFrame::NoFrame); _data->setOrientation(Qt::Vertical); _data->setBackgroundMode(PaletteBase); _plugins = new QToolBar(i18n("Create Plugin"), main, this); _plugins->setFrameStyle(QFrame::NoFrame); _plugins->setOrientation(Qt::Vertical); _plugins->setBackgroundMode(PaletteBase); _fits = new QToolBar(i18n("Create Fit"), main, this); _fits->setFrameStyle(QFrame::NoFrame); _fits->setOrientation(Qt::Vertical); _fits->setBackgroundMode(PaletteBase); _filters = new QToolBar(i18n("Create Filter"), main, this); _filters->setFrameStyle(QFrame::NoFrame); _filters->setOrientation(Qt::Vertical); _filters->setBackgroundMode(PaletteBase); ToolBox->setUpdatesEnabled(false); _primitive->setUpdatesEnabled(false); _primitive->clear(); _data->setUpdatesEnabled(false); _data->clear(); _plugins->setUpdatesEnabled(false); _plugins->clear(); _fits->setUpdatesEnabled(false); _fits->clear(); _filters->setUpdatesEnabled(false); _filters->clear(); //Create canonical actions... // createObjectAction(i18n("Scalar"), _primitive, KstScalarDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Vector"), _primitive, KstVectorDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Matrix"), _primitive, KstMatrixDialogI::globalInstance(), SLOT(show())); // createObjectAction(i18n("String"), _primitive, KstStringDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Curve"), _data, KstCurveDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Equation"), _data, KstEqDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Histogram"), _data, KstHsDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Spectrum"), _data, KstPsdDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Event Monitor"), _data, KstEventMonitorI::globalInstance(), SLOT(show())); createObjectAction(i18n("Image"), _data, KstImageDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Spectrogram"), _data, KstCsdDialogI::globalInstance(), SLOT(show())); createObjectAction(i18n("Vector View"), _data, KstVvDialogI::globalInstance(), SLOT(show())); //Create plugin actions... setupPluginActions(); //TODO sort the actions in each box alphabetically? QWidget *priw = new QWidget(_primitive); priw->setBackgroundMode(PaletteBase); _primitive->setStretchableWidget(priw); QWidget *datw = new QWidget(_data); datw->setBackgroundMode(PaletteBase); _data->setStretchableWidget(datw); QWidget *pluginw = new QWidget(_plugins); pluginw->setBackgroundMode(PaletteBase); _plugins->setStretchableWidget(pluginw); QWidget *fitw = new QWidget(_fits); fitw->setBackgroundMode(PaletteBase); _fits->setStretchableWidget(fitw); QWidget *filw = new QWidget(_filters); filw->setBackgroundMode(PaletteBase); _filters->setStretchableWidget(filw); ToolBox->setUpdatesEnabled(true); _primitive->setUpdatesEnabled(true); _data->setUpdatesEnabled(true); _plugins->setUpdatesEnabled(true); _fits->setUpdatesEnabled(true); _filters->setUpdatesEnabled(true); ToolBox->addItem(_primitive, i18n("Create Primitive")); ToolBox->addItem(_data, i18n("Create Data Object")); ToolBox->addItem(_plugins, i18n("Create Plugin")); ToolBox->addItem(_fits, i18n("Create Fit")); ToolBox->addItem(_filters, i18n("Create Filter")); }