当前位置: 首页>>代码示例>>C++>>正文


C++ sView函数代码示例

本文整理汇总了C++中sView函数的典型用法代码示例。如果您正苦于以下问题:C++ sView函数的具体用法?C++ sView怎么用?C++ sView使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sView函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SLOT

void honorifics::sPopulateMenu( QMenu *pMenu)
{
  QAction *menuItem;

  menuItem = pMenu->addAction(tr("Edit..."), this, SLOT(sEdit()));
  if (!_privileges->check("MaintainTitles"))
    menuItem->setEnabled(false);

  pMenu->addAction(tr("View..."), this, SLOT(sView()));

  menuItem = pMenu->addAction(tr("Delete"), this, SLOT(sDelete()));
  if (!_privileges->check("MaintainTitles"))
    menuItem->setEnabled(false);
}
开发者ID:dwatson78,项目名称:qt-client,代码行数:14,代码来源:honorifics.cpp

示例2: XWidget

searchForEmp::searchForEmp(QWidget* parent, const char* name, Qt::WFlags fl)
    : XWidget(parent, name, fl)
{
  setupUi(this);

  connect(_edit,         SIGNAL(clicked()),     this, SLOT(sEdit()));
  connect(_emp, SIGNAL(populateMenu(QMenu *, QTreeWidgetItem *, int)), this, SLOT(sPopulateMenu(QMenu *, QTreeWidgetItem *)));
  connect(_new,          SIGNAL(clicked()),     this, SLOT(sNew()));
  connect(_print,        SIGNAL(clicked()),     this, SLOT(sPrint()));
  connect(_searchCode,   SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_searchDept,   SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_searchMgr,    SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_searchNumber, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_searchName, SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_searchShift,  SIGNAL(toggled(bool)), this, SLOT(sFillList()));
  connect(_search,       SIGNAL(editingFinished()),   this, SLOT(sFillList()));
  connect(_showInactive, SIGNAL(clicked()),     this, SLOT(sFillList()));
  connect(_view,         SIGNAL(clicked()),     this, SLOT(sView()));
  connect(_warehouse,    SIGNAL(updated()),     this, SLOT(sFillList()));

  _emp->addColumn(tr("Site"),   _whsColumn,  Qt::AlignLeft, true, "warehous_code");
  _emp->addColumn(tr("Code"),   _itemColumn, Qt::AlignLeft, true, "emp_code");
  _emp->addColumn(tr("Number"),          -1, Qt::AlignLeft, true, "emp_number");
  _emp->addColumn(tr("First"),  _itemColumn, Qt::AlignLeft, true, "cntct_first_name");
  _emp->addColumn(tr("Last"),   _itemColumn, Qt::AlignLeft, true, "cntct_last_name");
  _emp->addColumn(tr("Manager"),_itemColumn, Qt::AlignLeft, true, "mgr_code");
  _emp->addColumn(tr("Dept."),  _itemColumn, Qt::AlignLeft, true, "dept_number");
  _emp->addColumn(tr("Shift"),  _itemColumn, Qt::AlignLeft, true, "shift_number");

  if (_privileges->check("MaintainEmployees"))
  {
    _new->setEnabled(true);
    connect(_emp, SIGNAL(valid(bool)),       _edit, SLOT(setEnabled(bool)));
    connect(_emp, SIGNAL(itemSelected(int)), _edit, SLOT(animateClick()));
  }
  else
    connect(_emp, SIGNAL(itemSelected(int)), _view, SLOT(animateClick()));

  connect(omfgThis, SIGNAL(itemsUpdated(int, bool)), SLOT(sFillList()));

  if (_preferences->boolean("XCheckBox/forgetful"))
  {
    _searchCode->setChecked(true);
    _searchDept->setChecked(true);
    _searchMgr->setChecked(true);
    _searchNumber->setChecked(true);
    _searchShift->setChecked(true);
  }
}
开发者ID:Dinesh-Ramakrishnan,项目名称:qt-client,代码行数:49,代码来源:searchForEmp.cpp

示例3: connect

void currencies::sPopulateMenu(QMenu* pMenu)
{
  QAction *menuItem;
  
  menuItem = pMenu->addAction(tr("View..."));
  connect(menuItem, SIGNAL(triggered()), this, SLOT(sView()));
  
  menuItem = pMenu->addAction(tr("Edit..."));
  connect(menuItem, SIGNAL(triggered()), this, SLOT(sEdit()));
  menuItem->setEnabled(_privileges->check("MaintainCurrencies"));
  
  menuItem = pMenu->addAction(tr("Delete..."));
  connect(menuItem, SIGNAL(triggered()), this, SLOT(sDelete()));
  menuItem->setEnabled(_privileges->check("MaintainCurrencies"));
}
开发者ID:Dinesh-Ramakrishnan,项目名称:qt-client,代码行数:15,代码来源:currencies.cpp

示例4: SLOT

void salesReps::sPopulateMenu( QMenu * menu )
{
  QAction *menuItem;

  menuItem = menu->addAction(tr("Edit Sales Rep..."), this, SLOT(sEdit()));
  if (!_privileges->check("MaintainSalesReps"))
    menuItem->setEnabled(FALSE);

  menuItem = menu->addAction(tr("View Sales Rep..."), this, SLOT(sView()));
  if ((!_privileges->check("MaintainSalesReps")) && (!_privileges->check("ViewSalesReps")))
    menuItem->setEnabled(FALSE);

  menuItem = menu->addAction(tr("Delete Sales Rep..."), this, SLOT(sDelete()));
  if (!_privileges->check("MaintainSalesReps"))
    menuItem->setEnabled(FALSE);
}
开发者ID:Dinesh-Ramakrishnan,项目名称:qt-client,代码行数:16,代码来源:salesReps.cpp

示例5: SLOT

void listRecurringInvoices::sPopulateMenu(QMenu *pMenu, QTreeWidgetItem* pItem, int)
{
  QAction *menuItem;
  XTreeWidgetItem *item = dynamic_cast<XTreeWidgetItem *>(pItem);
  if(0 == item)
    return;

  if(!item->rawValue("invchead_posted").toBool())
  {
    menuItem = pMenu->addAction(tr("Edit..."), this, SLOT(sEdit()));
    menuItem->setEnabled(_privileges->check("MaintainMiscInvoices"));
  }

  menuItem = pMenu->addAction(tr("View..."), this, SLOT(sView()));
  menuItem->setEnabled(_privileges->check("MaintainMiscInvoices") ||
                       _privileges->check("ViewMiscInvoices"));
}
开发者ID:szuke,项目名称:qt-client,代码行数:17,代码来源:listRecurringInvoices.cpp

示例6: SLOT

void cashReceiptsEditList::sPopulateMenu(QMenu *pMenu)
{
    QAction *menuItem;

    menuItem = pMenu->addAction(tr("Edit..."), this, SLOT(sEdit()));
    menuItem->setEnabled(_privileges->check("MaintainCashReceipts"));

    menuItem = pMenu->addAction(tr("View..."), this, SLOT(sView()));

    menuItem = pMenu->addAction(tr("Delete..."), this, SLOT(sDelete()));
    menuItem->setEnabled(_privileges->check("MaintainCashReceipts"));

    pMenu->addSeparator();

    menuItem = pMenu->addAction(tr("Post..."), this, SLOT(sPost()));
    menuItem->setEnabled(_privileges->check("PostCashReceipts"));
}
开发者ID:shackbarth,项目名称:qt-client,代码行数:17,代码来源:cashReceiptsEditList.cpp

示例7: list

void incidentWorkbench::sOpen()
{
  bool editPriv =
      (omfgThis->username() == list()->currentItem()->rawValue("incdt_owner_username") && _privileges->check("MaintainPersonalIncidents")) ||
      (omfgThis->username() == list()->currentItem()->rawValue("incdt_assigned_username") && _privileges->check("MaintainPersonalIncidents")) ||
      (_privileges->check("MaintainAllIncidents"));

  bool viewPriv =
      (omfgThis->username() == list()->currentItem()->rawValue("incdt_owner_username") && _privileges->check("ViewPersonalIncidents")) ||
      (omfgThis->username() == list()->currentItem()->rawValue("incdt_username") && _privileges->check("ViewPersonalIncidents")) ||
      (_privileges->check("ViewAllIncidents"));

  if (editPriv)
    sEdit();
  else if (viewPriv)
    sView();
}
开发者ID:bixwilson,项目名称:qt-client,代码行数:17,代码来源:incidentWorkbench.cpp


注:本文中的sView函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。