Example #1
0
scriptEditor::scriptEditor(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_import, SIGNAL(clicked()), this, SLOT(sImport()));
  connect(_export, SIGNAL(clicked()), this, SLOT(sExport()));
}
Example #2
0
void XTableView::sShowMenu(const QPoint &pntThis)
{
  QModelIndex item = indexAt(pntThis);
  if (item.isValid())
  {
    _menu->clear();
    emit populateMenu(_menu, item);

    bool disableExport = FALSE;
    if(_x_preferences)
      disableExport = (_x_preferences->value("DisableExportContents")=="t");
    if(!disableExport)
      _menu->addAction(tr("Export Contents..."),  this, SLOT(sExport()));

    if(! _menu->isEmpty())
      _menu->popup(mapToGlobal(pntThis));
  }
}
Example #3
0
exportData::exportData(QWidget *parent, const char *name, Qt::WFlags fl)
  : XWidget(parent, name, fl)
{
  setupUi(this);

  _paramedit = new ParameterEdit(this);
  QGridLayout *lyt = qobject_cast<QGridLayout*>(layout());
  if (lyt)
    lyt->addWidget(_paramedit, 4, 0, 1, -1);

  connect(_otherXML,    SIGNAL(toggled(bool)), this, SLOT(sHandleButtons()));
  connect(_deleteQuerySet,SIGNAL(clicked()),   this, SLOT(sDeleteQuerySet()));
  connect(_editQuerySet,SIGNAL(clicked()),     this, SLOT(sEditQuerySet()));
  connect(_export,      SIGNAL(clicked()),     this, SLOT(sExport()));
  connect(_exportList,  SIGNAL(newId(int)),    this, SLOT(sHandleButtons()));
  connect(_newQuerySet, SIGNAL(clicked()),     this, SLOT(sNewQuerySet()));
  connect(_qrySetList,  SIGNAL(newId(int)),    this, SLOT(sHandleButtons()));
  connect(_xtupleXML,   SIGNAL(toggled(bool)), this, SLOT(sHandleButtons()));

  _exportList->addColumn(tr("Name"),             -1, Qt::AlignLeft, true, "xsltmap_name");
  _exportList->addColumn(tr("Document Type"),    -1, Qt::AlignLeft, true, "xsltmap_doctype");
  _exportList->addColumn(tr("System Identifier"),-1, Qt::AlignLeft, false,"xsltmap_system");
  _exportList->addColumn(tr("Export XSLT File"), -1, Qt::AlignLeft, false,"xsltmap_export");

  _qrySetList->addColumn(tr("Name"),        -1, Qt::AlignLeft, true, "qryhead_name");
  _qrySetList->addColumn(tr("Description"), -1, Qt::AlignLeft, true, "qryhead_descrip");

  _exportList->populate("SELECT xsltmap_id, xsltmap_name, xsltmap_doctype,"
                        "       xsltmap_system, xsltmap_export"
                        "  FROM xsltmap"
                        " WHERE (LENGTH(xsltmap_export) > 0)"
                        " ORDER BY xsltmap_name;");
  sFillList();
  sHandleButtons();

  _queryset = new QuerySet(0, Qt::Dialog);
  if (_queryset)
  {
    _queryset->setWindowModality(Qt::WindowModal);
    connect(_queryset, SIGNAL(saved(int)), this, SLOT(sFillList()));
  }
}