Exemple #1
0
void TaskManager::createActions()
{
    this->insertAct = new QAction(tr("&Insert"),this);
    //this->insertAct->setShortcut(QKeySequence::New);
    this->setStatusTip(tr("Добавляет новую строку в конец списка."));
    connect(insertAct, SIGNAL(triggered()), this, SLOT(slotInsertRow()));

    this->deleteAct = new QAction(tr("&Delete"),this);
    //this->deleteAct->setShortcut(QKeySequence::Delete);
    this->setStatusTip(tr("Удаляет выбранную строку."));
    connect(deleteAct, SIGNAL(triggered()), this, SLOT(slotDeleteRow()));
}
Exemple #2
0
ClsQHarborImpl::ClsQHarborImpl(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl):
    QDialog(parent) {

    setupUi(this); 
    setAcceptDrops(true);

    tableWidget->setColumnCount ( 8);


//--    tableWidget->setHorizontalHeaderItem( COL_TYPE,        new QTableWidgetItem("Type" ));
//--    tableWidget->setHorizontalHeaderItem( COL_NAME,        new QTableWidgetItem("Name" ));
//--    tableWidget->setHorizontalHeaderItem( COL_ID,          new QTableWidgetItem("ID" ));
//--    tableWidget->setHorizontalHeaderItem( COL_CHILD,       new QTableWidgetItem("Child" ));
//--    tableWidget->setHorizontalHeaderItem( COL_PARAM_LABEL, new QTableWidgetItem("Parameter" ));
//--    tableWidget->setHorizontalHeaderItem( COL_MIN,         new QTableWidgetItem("Min"));
//--    tableWidget->setHorizontalHeaderItem( COL_MAX,         new QTableWidgetItem("Max"));
//--    tableWidget->setHorizontalHeaderItem( COL_VALUE,       new QTableWidgetItem("Value"));

    addHeaderItem( COL_TYPE,        "Type",      false);
    addHeaderItem( COL_NAME,        "Name",      false);
    addHeaderItem( COL_ID,          "ID",        false);
    addHeaderItem( COL_CHILD,       "Child",     false);
    addHeaderItem( COL_PARAM_LABEL, "Parameter", true);
    addHeaderItem( COL_MIN,         "Min",       false);
    addHeaderItem( COL_MAX,         "Max",       false);
    addHeaderItem( COL_VALUE,       "Value",     true);

    tableWidget->hideColumn(COL_PARAM_NAME);
    tableWidget->setAcceptDrops(true);
    tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
    tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);

    bSimulationRunning = false;
    clsItem = NULL;
    mapParams.clear();


    connect(pbDeleteRow, SIGNAL(clicked()), SLOT(slotDeleteRow()));
    connect(pbSaveConfig, SIGNAL(clicked()), SLOT(slotSaveConfig()));
    connect(pbLoadConfig, SIGNAL(clicked()), SLOT(slotLoadConfig()));

    connect(pbSaveParamSet, SIGNAL(clicked()), SLOT(slotSaveParamSet()));
    connect(pbLoadParamSet, SIGNAL(clicked()), SLOT(slotLoadParamSet()));

    connect(pbRefresh, SIGNAL(clicked()), SLOT(slotRefresh()));
    connect(tableWidget, SIGNAL(cellDoubleClicked(int, int)), SLOT(slotCellDoubleClicked(int, int)));
}
Exemple #3
0
ClsQHarborImpl::ClsQHarborImpl(QWidget* parent, const char* name, bool modal, WFlags fl):
    ClsQHarbor(parent, name,modal, fl)  {
    setAcceptDrops(TRUE);
    QHeader *th = qtableEntries->horizontalHeader();
    th->setLabel( COL_TYPE, "Type" );
    th->setLabel( COL_NAME, "Name" );
    th->setLabel( COL_ID, "ID" );
    th->setLabel( COL_CHILD, "Child" );
    th->setLabel( COL_PARAM_LABEL, "Parameter" );
    th->setLabel( COL_MIN, "Min");
    th->setLabel( COL_MAX, "Max");
    th->setLabel( COL_VALUE, "Value");
    qtableEntries->hideColumn(COL_PARAM_NAME);

    bSimulationRunning = false;
    clsItem = NULL;
    mapParams.clear();

    void ();
    void ();
    void ();

    connect(pbDeleteRow, SIGNAL(clicked()), SLOT(slotDeleteRow()));
    connect(pbSaveConfig, SIGNAL(clicked()), SLOT(slotSaveConfig()));
    connect(pbLoadConfig, SIGNAL(clicked()), SLOT(slotLoadConfig()));

    connect(pbSaveParamSet, SIGNAL(clicked()), SLOT(slotSaveParamSet()));
    connect(pbLoadParamSet, SIGNAL(clicked()), SLOT(slotLoadParamSet()));


    connect(pbRefresh, SIGNAL(clicked()), SLOT(slotRefresh()));

    connect(qtableEntries, SIGNAL(doubleClicked(int, int, int, const QPoint &)), SLOT(slotCellDoubleClicked(int, int, int, const QPoint &)));



}