예제 #1
0
Documents::Documents(QWidget *pParent) :
  QWidget(pParent)
{
  setupUi(this);
  
  _source = Uninitialized;
  _sourceid = -1;


  _images->addColumn(tr("Image Name"),  _itemColumn,   Qt::AlignLeft, true, "image_name" );
  _images->addColumn(tr("Description"), -1,            Qt::AlignLeft, true, "image_descrip" );
  _images->addColumn(tr("Purpose"),     _itemColumn*2, Qt::AlignLeft, true, "image_purpose" );

  _files->addColumn(tr("Title"),        _itemColumn, Qt::AlignLeft,true, "url_title");
  _files->addColumn(tr("URL"),          -1, Qt::AlignLeft,true, "url_url");

  connect(_deleteFile, SIGNAL(clicked()), this, SLOT(sDeleteFile()));
  connect(_editFile, SIGNAL(clicked()), this, SLOT(sEditFile()));
  connect(_newFile, SIGNAL(clicked()), this, SLOT(sNewFile()));
  connect(_viewFile, SIGNAL(clicked()), this, SLOT(sViewFile()));
  connect(_openFile, SIGNAL(clicked()), this, SLOT(sOpenFile()));
  
  connect(_openImage, SIGNAL(clicked()), this, SLOT(sOpenImage()));
  connect(_newImage, SIGNAL(clicked()), this, SLOT(sNewImage()));
  connect(_editImage, SIGNAL(clicked()), this, SLOT(sEditImage()));
  connect(_viewImage, SIGNAL(clicked()), this, SLOT(sViewImage()));
  connect(_printImage, SIGNAL(clicked()), this, SLOT(sPrintImage()));
  connect(_deleteImage, SIGNAL(clicked()), this, SLOT(sDeleteImage()));
  
  connect(_imagesButton, SIGNAL(toggled(bool)), this, SLOT(sImagesToggled(bool)));
  connect(_filesButton, SIGNAL(toggled(bool)), this, SLOT(sFilesToggled(bool)));
}
예제 #2
0
booItem::booItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_runTime, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateInvRunTime()));
  connect(_runTimePer, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateInvRunTime()));
  connect(_stdopn, SIGNAL(newID(int)), this, SLOT(sHandleStdopn(int)));
  connect(_fixedFont, SIGNAL(toggled(bool)), this, SLOT(sHandleFont(bool)));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_invProdUOMRatio, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateInvRunTime()));
  connect(_wrkcnt, SIGNAL(newID(int)), this, SLOT(sPopulateLocations()));
  connect(_newImage, SIGNAL(clicked()), this, SLOT(sNewImage()));
  connect(_editImage, SIGNAL(clicked()), this, SLOT(sEditImage()));
  connect(_deleteImage, SIGNAL(clicked()), this, SLOT(sDeleteImage()));

  _booitemid = -1;
  _item->setReadOnly(TRUE);

  _dates->setStartNull(tr("Always"), omfgThis->startOfTime(), TRUE);
  _dates->setStartCaption(tr("Effective"));
  _dates->setEndNull(tr("Never"), omfgThis->endOfTime(), TRUE);
  _dates->setEndCaption(tr("Expires"));

  _prodUOM->setType(XComboBox::UOMs);

  _wrkcnt->populate( "SELECT wrkcnt_id, wrkcnt_code "
		     "FROM wrkcnt "
		     "ORDER BY wrkcnt_code" );

  _stdopn->populate( "SELECT -1, TEXT('None') AS stdopn_number "
		     "UNION "
		     "SELECT stdopn_id, stdopn_number "
		     "FROM stdopn "
		     "ORDER BY stdopn_number" );

  _setupReport->insertItem(tr("Direct Labor"));
  _setupReport->insertItem(tr("Overhead"));
  _setupReport->insertItem(tr("None"));
  _setupReport->setCurrentItem(-1);

  _runReport->insertItem(tr("Direct Labor"));
  _runReport->insertItem(tr("Overhead"));
  _runReport->insertItem(tr("None"));
  _runReport->setCurrentItem(-1);

  _booimage->addColumn(tr("Image Name"),  _itemColumn, Qt::AlignLeft );
  _booimage->addColumn(tr("Description"), -1,          Qt::AlignLeft );
  _booimage->addColumn(tr("Purpose"),     _itemColumn, Qt::AlignLeft );

  
  _fixedFont->setChecked(_preferences->boolean("UsedFixedWidthFonts"));

  // hide the Allow Pull Through option as it doesn't perform
  // any function at this time.
  _pullThrough->hide();
}
예제 #3
0
Documents::Documents(QWidget *pParent) :
  QWidget(pParent)
{
  setupUi(this);
  
  _source = Uninitialized;
  _sourceid = -1;

  _doc->addColumn(tr("Type"),  _itemColumn,  Qt::AlignLeft, true, "target_type" );
  _doc->addColumn(tr("Number"), _itemColumn, Qt::AlignLeft, true, "target_number" );
  _doc->addColumn(tr("Name"), -1,  Qt::AlignLeft, true, "name" );
  _doc->addColumn(tr("Description"),  -1, Qt::AlignLeft, true, "description");
  _doc->addColumn(tr("Relationship"),  _itemColumn, Qt::AlignLeft,true, "purpose");
  
  connect(_attachDoc, SIGNAL(clicked()), this, SLOT(sAttachDoc()));
  connect(_editDoc, SIGNAL(clicked()), this, SLOT(sEditDoc()));
  connect(_viewDoc, SIGNAL(clicked()), this, SLOT(sViewDoc()));
  connect(_detachDoc, SIGNAL(clicked()), this, SLOT(sDetachDoc()));
  connect(_doc, SIGNAL(valid(bool)), _editDoc, SLOT(setEnabled(bool)));
  connect(_doc, SIGNAL(valid(bool)), _viewDoc, SLOT(setEnabled(bool)));
  connect(_doc, SIGNAL(valid(bool)), this, SLOT(handleSelection()));
  handleSelection();

  if (_x_privileges)
  {
    QMenu * newDocMenu = new QMenu;

    QAction* imgAct = new QAction(tr("Image"), this);
    imgAct->setEnabled(_x_privileges->check("MaintainImages"));
    connect(imgAct, SIGNAL(triggered()), this, SLOT(sNewImage()));
    newDocMenu->addAction(imgAct);

    QAction* incdtAct = new QAction(tr("Incident"), this);
    incdtAct->setEnabled(_x_privileges->check("AddIncidents"));
    connect(incdtAct, SIGNAL(triggered()), this, SLOT(sNewIncdt()));
    newDocMenu->addAction(incdtAct);

    QAction* todoAct = new QAction(tr("To Do"), this);
    todoAct->setEnabled(_x_privileges->check("MaintainPersonalTodoList") ||
                        _x_privileges->check("MaintainOtherTodoLists"));
    connect(todoAct, SIGNAL(triggered()), this, SLOT(sNewToDo()));
    newDocMenu->addAction(todoAct);

    QAction* oppAct = new QAction(tr("Opportunity"), this);
    oppAct->setEnabled(_x_privileges->check("MaintainOpportunities"));
    connect(oppAct, SIGNAL(triggered()), this, SLOT(sNewOpp()));
    newDocMenu->addAction(oppAct);

    QAction* projAct = new QAction(tr("Project"), this);
    projAct->setEnabled(_x_privileges->check("MaintainProjects"));
    connect(projAct, SIGNAL(triggered()), this, SLOT(sNewProj()));
    newDocMenu->addAction(projAct);

    _newDoc->setMenu(newDocMenu);
  }
}
예제 #4
0
booItem::booItem(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
    : XDialog(parent, name, modal, fl)
{
  setupUi(this);

  connect(_runTime, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateInvRunTime()));
  connect(_runTimePer, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateInvRunTime()));
  connect(_stdopn, SIGNAL(newID(int)), this, SLOT(sHandleStdopn(int)));
  connect(_fixedFont, SIGNAL(toggled(bool)), this, SLOT(sHandleFont(bool)));
  connect(_save, SIGNAL(clicked()), this, SLOT(sSave()));
  connect(_invProdUOMRatio, SIGNAL(textChanged(const QString&)), this, SLOT(sCalculateInvRunTime()));
  connect(_wrkcnt, SIGNAL(newID(int)), this, SLOT(sPopulateLocations()));
  connect(_newImage, SIGNAL(clicked()), this, SLOT(sNewImage()));
  connect(_editImage, SIGNAL(clicked()), this, SLOT(sEditImage()));
  connect(_deleteImage, SIGNAL(clicked()), this, SLOT(sDeleteImage()));

  _booitemid = -1;
  _item->setReadOnly(TRUE);

  _dates->setStartNull(tr("Always"), omfgThis->startOfTime(), TRUE);
  _dates->setStartCaption(tr("Effective"));
  _dates->setEndNull(tr("Never"), omfgThis->endOfTime(), TRUE);
  _dates->setEndCaption(tr("Expires"));

  _prodUOM->setType(XComboBox::UOMs);

  _wrkcnt->populate( "SELECT wrkcnt_id, wrkcnt_code "
                     "FROM wrkcnt JOIN site() ON (warehous_id=wrkcnt_warehous_id) "
                     "ORDER BY wrkcnt_code" );

  _stdopn->populate( "SELECT -1, TEXT('None') AS stdopn_number "
                     "UNION "
                     "SELECT stdopn_id, stdopn_number "
                     "FROM stdopn LEFT OUTER JOIN wrkcnt ON (wrkcnt_id=stdopn_wrkcnt_id)"
                     "            LEFT OUTER JOIN site() ON (warehous_id=wrkcnt_warehous_id) "
                     "WHERE ( (stdopn_wrkcnt_id=-1)"
                     "   OR   (warehous_id IS NOT NULL) ) "
                     "ORDER BY stdopn_number" );

  _setupReport->insertItem(tr("Direct Labor"));
  _setupReport->insertItem(tr("Overhead"));
  _setupReport->insertItem(tr("None"));
  _setupReport->setCurrentIndex(-1);

  _runReport->insertItem(tr("Direct Labor"));
  _runReport->insertItem(tr("Overhead"));
  _runReport->insertItem(tr("None"));
  _runReport->setCurrentIndex(-1);

  _booimage->addColumn(tr("Image Name"),  _itemColumn, Qt::AlignLeft, true, "image_name");
  _booimage->addColumn(tr("Description"), -1,          Qt::AlignLeft, true, "descrip");
  _booimage->addColumn(tr("Purpose"),     _itemColumn, Qt::AlignLeft, true, "purpose");

  _runTimePer->setValidator(omfgThis->qtyVal());
  _invProdUOMRatio->setValidator(omfgThis->ratioVal());
  _invRunTime->setPrecision(omfgThis->runTimeVal());
  _invPerMinute->setPrecision(omfgThis->runTimeVal());
  _setupTime->setValidator(omfgThis->runTimeVal());
  _runTime->setValidator(omfgThis->runTimeVal());
  
  sHandleFont(_fixedFont->isChecked());

  // hide the Allow Pull Through option as it doesn't perform
  // any function at this time.
  _pullThrough->hide();
  adjustSize();
}