int nmssmEWSB(void) { int err; int del= getdelfilesstat_(); err=EWSBLesH("inp.dat"); if(err) return -1; err= runTools("nmhdecay","spectr.dat"); if(del) system("rm -f inp.dat spectr.dat omega.dat decay.dat out.dat"); return err; }
int nmssmSUGRA(double m0,double mhf, double a0,double tb, double sgn, double Lambda, double aLambda, double aKappa) { int err; int del=getdelfilesstat_(); err=sugraLesH("inpsp.dat", m0,mhf,a0,tb, sgn,Lambda, aLambda, aKappa); if(err) return -1; err=runTools("nmspec","spectrsp.dat"); assignValW("Au",findValW("At")); assignValW("Ad",findValW("Ab")); if(del) system("rm -f inpsp.dat spectrsp.dat omegasp.dat decaysp.dat outsp.dat"); return err; }
void MainWindow::mousePressEvent(QMouseEvent *event) { int nelem = applist.count(); int cols = nelem / ROWS + 1; if (event->button() == Qt::LeftButton) { int x = event->pos().x(); int y = event->pos().y(); if (x >= MARGIN * 2 + cols * 64 - 8 && x <= MARGIN * 2 + cols * 64 + 4 && y >= 4 && y <= 15) { hide(); stats_->hide(); } else if (x >= 0 && x < 64 && y >= 4 && y <= 15) runTools(); dragPosition_ = event->globalPos() - frameGeometry().topLeft(); event->accept(); active_index_ = -1; } else if (event->button() == Qt::RightButton) { active_index_ = applications_get_index(event->pos()); edit_index_ = active_index_; if (active_index_ == -1) { qrun_->setDisabled(true); edit_index_ = applications_get_position(event->pos()); if (edit_index_ == -1) qedit_->setDisabled(true); else qedit_->setDisabled(false); qdelete_->setDisabled(true); } else { qrun_->setDisabled(false); qedit_->setDisabled(false); if (applications_check_default(applist[active_index_].name_.toLocal8Bit().constData())) qdelete_->setDisabled(true); else qdelete_->setDisabled(false); } } }
void MainWindow::createLocalActions() { QAction *runtools = new QAction(tr("&Tools"), this); connect(runtools, SIGNAL(triggered()), this, SLOT(runTools())); addAction(runtools); QAction *qminimize = new QAction(tr("&Minimize"), this); connect(qminimize, SIGNAL(triggered()), this, SLOT(hide())); connect(qminimize, SIGNAL(triggered()), stats_, SLOT(hide())); addAction(qminimize); QAction *separator1 = new QAction(this); separator1->setSeparator(true); addAction(separator1); qrun_ = new QAction(tr("&Run"), this); connect(qrun_, SIGNAL(triggered()), this, SLOT(run())); addAction(qrun_); qedit_ = new QAction(tr("&Edit"), this); connect(qedit_, SIGNAL(triggered()), this, SLOT(edit())); addAction(qedit_); qdelete_ = new QAction(tr("&Delete"), this); connect(qdelete_, SIGNAL(triggered()), this, SLOT(remove())); addAction(qdelete_); qhelp_ = new QAction(tr("&Help"), this); connect(qhelp_, SIGNAL(triggered()), this, SLOT(help())); addAction(qhelp_); QAction *separator2 = new QAction(this); separator2->setSeparator(true); addAction(separator2); QAction *qquit = new QAction(tr("&Quit"), this); // qa->setShortcut(tr("Ctrl+Q")); connect(qquit, SIGNAL(triggered()), qApp, SLOT(quit())); addAction(qquit); }