Пример #1
0
FlagsList::FlagsList(QWidget* parent, Qt::WFlags fl)
		: QDialog(parent, fl), Ui::flagsDialog()
{
	setupUi(this);
	connect(checkAllButton, SIGNAL(pressed()), this, SLOT(checkAll()));
	connect(uncheckAllButton, SIGNAL(pressed()), this, SLOT(uncheckAll()));
}
Пример #2
0
    virtual void visit(AstEnumItemRef* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkAll(nodep);
	if (nodep->packagep()) {
	    nodep->packagep()->user1Inc();
	}
    }
Пример #3
0
    virtual void visit(AstTypedef* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkAll(nodep);
	// Don't let packages with only public variables disappear
	// Normal modules may disappear, e.g. if they are parameterized then removed
	if (nodep->attrPublic() && m_modp && m_modp->castPackage()) m_modp->user1Inc();
    }
Пример #4
0
    virtual void visit(AstVarScope* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkAll(nodep);
	if (mightElim(nodep->varp())) {
	    m_vscsp.push_back(nodep);
	}
    }
Пример #5
0
void
Auvsi_Recognize::runComputation( void )
{


	//cv::imshow("ShapePre", _shape );
	//cv::imshow("LetterPre", _letter );


	

	//cvWaitKey(0);
	
	
	// GOOD code:

	extractShape<float>();
	extractLetter<float>();
	


	_shape = centerBinary(_shape);
	_letter = centerBinary(_letter);
	
	cv::imshow("ShapePre", _shape );
	cv::imshow("LetterPre", _letter );
	
	checkAll();
	
	//cv::imshow( "Shape", centerBinary( _shape ) );
	//cv::imshow( "Letter", centerBinary( _letter ) );
}
Пример #6
0
void ParamCompareDialog::initConnections()
{
    connect(ui->cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
    connect(ui->loadButton, SIGNAL(clicked()), this, SLOT(loadParameterFile()));
    connect(ui->continueButton, SIGNAL(clicked()), this, SLOT(saveNewParameters()));
    connect(ui->checkAllBox, SIGNAL(clicked()), this, SLOT(checkAll()));
}
Пример #7
0
/**
 * Altern between the checked and unchecked state of the tri-state checkbox "Check all".
 */
void sourcesWindow::checkClicked()
{
	if (ui->checkBox->checkState() == Qt::Unchecked)
	{ ui->checkBox->setCheckState(Qt::Unchecked); }
	else
	{ ui->checkBox->setCheckState(Qt::Checked); }
	checkAll(ui->checkBox->checkState());
}
Пример #8
0
    virtual void visit(AstVar* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkAll(nodep);
	if (nodep->isSigPublic() && m_modp && m_modp->castPackage()) m_modp->user1Inc();
	if (mightElim(nodep)) {
	    m_varEtcsp.push_back(nodep);
	}
    }
Пример #9
0
    virtual void visit(AstNodeAssign* nodep, AstNUser*) {
	// See if simple assignments to variables may be eliminated because that variable is never used.
	// Similar code in V3Life
	m_sideEffect = false;
	nodep->rhsp()->iterateAndNext(*this);
	checkAll(nodep);
	// Has to be direct assignment without any EXTRACTing.
	AstVarRef* varrefp = nodep->lhsp()->castVarRef();
	if (varrefp && !m_sideEffect
	    && varrefp->varScopep()) {	// For simplicity, we only remove post-scoping
	    m_assignMap.insert(make_pair(varrefp->varScopep(), nodep));
	    checkAll(varrefp);  // Must track reference to dtype()
	} else {  // Track like any other statement
	    nodep->lhsp()->iterateAndNext(*this);
	}
	checkAll(nodep);
    }
Пример #10
0
void eeLoadModel(uint8_t id)
{
  if (id<MAX_MODELS) {

#if defined(SDCARD)
    closeLogs();
#endif

    if (pulsesStarted()) {
      pausePulses();
    }

    pauseMixerCalculations();

    uint32_t size = loadModel(id);

#if defined(SIMU)
    if (sizeof(uint16_t) + sizeof(g_model) > EEPROM_ZONE_SIZE)
      TRACE("Model data size can't exceed %d bytes (%d bytes)", int(EEPROM_ZONE_SIZE-sizeof(uint16_t)), (int)sizeof(g_model));
    if (size > 0 && size != sizeof(g_model))
      TRACE("Model data read=%d bytes vs %d bytes\n", size, (int)sizeof(ModelData));
#endif

    if (size < EEPROM_BUFFER_SIZE) { // if not loaded a fair amount
      modelDefault(id) ;
      eeCheck(true);
    }

    AUDIO_FLUSH();
    flightReset();
    logicalSwitchesReset();

    if (pulsesStarted()) {
      checkAll();
      resumePulses();
    }

    customFunctionsReset();

    restoreTimers();

    resumeMixerCalculations();
    // TODO pulses should be started after mixer calculations ...

#if defined(FRSKY)
    frskySendAlarms();
#endif

#if defined(SDCARD)
    referenceModelAudioFiles();
#endif

    LOAD_MODEL_BITMAP();
    SEND_FAILSAFE_1S();
    PLAY_MODEL_NAME();
  }
}
Пример #11
0
void LSysTray::start(){
  if(isRunning || stopping){ return; } //already running
  isRunning = LSession::handle()->registerVisualTray(this->winId());
  qDebug() << "Visual Tray Started:" << this->type() << isRunning;
  if(isRunning){ 
    //upTimer->start();
    QTimer::singleShot(0,this, SLOT(checkAll()) ); 
  }
}
Пример #12
0
KGetLinkView::KGetLinkView(QWidget *parent)
    : KDialog(parent), m_linkImporter(0)
{
    setCaption(i18n("Import Links"));

    // proxy model to filter links
    m_proxyModel = new KGetSortFilterProxyModel();
    m_proxyModel->setDynamicSortFilter(true);
    m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);

    QWidget *widget = new QWidget(this);
    ui.setupUi(widget);

    // set the Icons
    ui.importLinks->setIcon(KIcon("document-import"));
    ui.showAll->setIcon(KIcon("view-list-icons"));
    ui.showArchives->setIcon(KIcon("package-x-generic"));
    ui.showAudio->setIcon(KIcon("audio-x-generic"));
    ui.showImages->setIcon(KIcon("image-x-generic"));
    ui.showVideos->setIcon(KIcon("video-x-generic"));

    // set the ids for the filterButtonGroup
    ui.filterButtonGroup->setId(ui.showAll, KGetSortFilterProxyModel::NoFilter);
    ui.filterButtonGroup->setId(ui.showArchives, KGetSortFilterProxyModel::CompressedFiles);
    ui.filterButtonGroup->setId(ui.showAudio, KGetSortFilterProxyModel::AudioFiles);
    ui.filterButtonGroup->setId(ui.showImages, KGetSortFilterProxyModel::ImageFiles);
    ui.filterButtonGroup->setId(ui.showVideos, KGetSortFilterProxyModel::VideoFiles);

    ui.treeView->setModel(m_proxyModel);
    ui.progressBar->hide();

    connect(ui.treeView, SIGNAL(doubleClicked(const QModelIndex &)),
            this, SLOT(uncheckItem(const QModelIndex &)));
    connect(ui.textFilter, SIGNAL(textChanged(QString)), SLOT(setTextFilter(QString)));
    connect(ui.filterMode, SIGNAL(currentIndexChanged(int)), m_proxyModel, SLOT(setFilterMode(int)));
    connect(ui.filterButtonGroup, SIGNAL(buttonClicked(int)), m_proxyModel, SLOT(setFilterType(int)));
    connect(ui.filterButtonGroup, SIGNAL(buttonClicked(int)), SLOT(updateSelectionButtons()));
    connect(ui.urlRequester, SIGNAL(textChanged(const QString &)), SLOT(updateImportButtonStatus(const QString &)));
    connect(ui.selectAll, SIGNAL(clicked()), this, SLOT(checkAll()));
    connect(ui.deselectAll, SIGNAL(clicked()), this, SLOT(uncheckAll()));
    connect(ui.checkSelected, SIGNAL(clicked()), this, SLOT(slotCheckSelected()));
    connect(ui.invertSelection, SIGNAL(clicked()), this, SLOT(slotInvertSelection()));
    connect(this, SIGNAL(okClicked()), this, SLOT(slotStartLeech()));
    connect(ui.showWebContent, SIGNAL(stateChanged(int)), m_proxyModel, SLOT(setShowWebContent(int)));
    connect(ui.importLinks, SIGNAL(clicked()), this, SLOT(slotStartImport()));
    connect(ui.treeView->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
            SLOT(selectionChanged()));

    setMainWidget(widget);
    setButtonText(KDialog::Ok, i18nc("Download the items which have been selected","&Download Checked"));
    setButtonIcon(KDialog::Ok, KIcon("kget"));

    checkClipboard();
}
Пример #13
0
void LSysTray::UpdateTrayWindow(WId win){
  if(!isRunning || stopping || checking){ return; }
  for(int i=0; i<trayIcons.length(); i++){
    if(trayIcons[i]->appID()==win){
      qDebug() << "System Tray: Update Window " << win;
      trayIcons[i]->update(); 
      return; //finished now
    }
  }
  //Could not find tray in the list, run the checkall routine to make sure we are not missing any
  qDebug() << "System Tray: Missing Window - check all";
  QTimer::singleShot(0,this, SLOT(checkAll()) );
}
Пример #14
0
LSysTray::LSysTray(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){
  frame = new QFrame(this);
  frame->setContentsMargins(0,0,0,0);
  frame->setStyleSheet("QFrame{ background: transparent; border: 1px solid transparent; border-radius: 3px; }");
  LI = new QBoxLayout( this->layout()->direction());
    frame->setLayout(LI);
    LI->setAlignment(Qt::AlignCenter);
    LI->setSpacing(1);
    LI->setContentsMargins(0,0,0,0);
  this->layout()->addWidget(frame);
  this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
  //TrayID=0;
  upTimer = new QTimer(this);
    upTimer->setInterval(300000); //maximum time between refreshes is 5 minutes
    connect(upTimer, SIGNAL(timeout()), this, SLOT(checkAll()) );
  isRunning = false; stopping = false; checking = false;
  QTimer::singleShot(100, this, SLOT(start()) );
	
  connect(LSession::handle(), SIGNAL(TrayListChanged()), this, SLOT(checkAll()) );
  connect(LSession::handle(), SIGNAL(TrayIconChanged(WId)), this, SLOT(UpdateTrayWindow(WId)) );
  connect(LSession::handle(), SIGNAL(VisualTrayAvailable()), this, SLOT(start()) );
}
Пример #15
0
    virtual void visit(AstNodeVarRef* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkAll(nodep);
	if (nodep->varScopep()) {
	    nodep->varScopep()->user1Inc();
	    nodep->varScopep()->varp()->user1Inc();
	}
	if (nodep->varp()) {
	    nodep->varp()->user1Inc();
	}
	if (nodep->packagep()) {
	    nodep->packagep()->user1Inc();
	}
    }
Пример #16
0
void Unit::iniciarUnidad(PlayerType tj, PlayerColor cr, PlayerTeam eq, int maxVitalidad, int vitalidad, int maxEnergy, int energy){
    const int barWidth = 20;

//    QPainterPath path;
////    path.lineTo(10,0);
//    path.addEllipse(QRectF(-10, -10, 20, 20));
//    setShape(path);
//    includeBars = false;

    checkCounter = 0;

    setBorderWidth(2);
    setPlayerType(tj);
    setUnitColor(cr);
    setEquipo(eq);

    QRectF rectMA = MovilAgent::boundingRect();
    prepareGeometryChange();
    setMaxHealth(maxVitalidad);
    setHealth(vitalidad);
    setHealthBarPos(rectMA.topLeft() + QPointF(rectMA.width()/2 - barWidth/2, - 20));
    setHealthBarWidth(barWidth);
    setHealthBarHeight(4);
    setVisibleHealthBar(true);

    setMaxEnergy(maxEnergy);
    setEnergy(energy);
    setEnergyBarPos(rectMA.topLeft() + QPointF(rectMA.width()/2 - barWidth/2, - 10));
    setEnergyBarWidth(barWidth);
    setEnergyBarHeitght(4);
    setVisibleEnergyBar(true);

    setAcceptHoverEvents(true);

    PlayerColor pc;
    for(int i = 0; i < 8; i++){
        pc = (PlayerColor)i;
        if(pc == getUnitColor()){
            diplomacias[pc] = Alied;
        }else{
            diplomacias[pc] = Enemy;
        }
    }
    MovingActuator *actMov = dynamic_cast<MovingActuator*>(getActuator("movement"));

    connect(actMov, SIGNAL(positionChanged(QPointF)), SLOT(checkAll(QPointF)));
//    connect(actMov, SIGNAL(llegoADestinoFinal(QPointF)), SLOT(lastCheckPointReached(QPointF)));
}
Пример #17
0
MainWindow::MainWindow(QWidget *parent) :
   QMainWindow(parent),
   disableRefreshFilters(false),
   ui(new Ui::MainWindow),
   currentFile(0)
{
   this->ui->setupUi(this);

   connect(this->ui->actOpen, SIGNAL(activated()), this, SLOT(openDir()));
   connect(this->ui->butFilterAll, SIGNAL(clicked()), this, SLOT(checkAll()));
   connect(this->ui->butRefresh, SIGNAL(clicked()), this, SLOT(reloadAll()));

   this->currentDir.setSorting(QDir::Name);
   this->ui->tblLog->setWordWrap(false);
   this->ui->tblLog->setModel(&this->model);
   this->ui->tblLog->setItemDelegate(new TableLogItemDelegate(this));

   this->ui->tblLog->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
   this->ui->tblLog->horizontalHeader()->resizeSection(0, 140);
   this->ui->tblLog->horizontalHeader()->resizeSection(1, 50);
   this->ui->tblLog->horizontalHeader()->resizeSection(2, 140);
   this->ui->tblLog->horizontalHeader()->resizeSection(3, 50);
   this->ui->tblLog->horizontalHeader()->resizeSection(4, 180);
   this->ui->tblLog->horizontalHeader()->resizeSection(5, 1200);
   this->ui->tblLog->verticalHeader()->setResizeMode(QHeaderView::Fixed);
   this->ui->tblLog->verticalHeader()->setDefaultSectionSize(17);
   this->ui->tblLog->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);

   this->severities = new TooglableList(this);
   this->modules = new TooglableList(this);
   this->threads = new TooglableList(this);
   connect(this->severities, SIGNAL(stateChanged()), this, SLOT(filtersChange()));
   connect(this->modules, SIGNAL(stateChanged()), this, SLOT(filtersChange()));
   connect(this->threads, SIGNAL(stateChanged()), this, SLOT(filtersChange()));

   this->ui->laySeverity->addWidget(this->severities);
   this->ui->layModule->addWidget(this->modules);
   this->ui->layThread->addWidget(this->threads);

   this->lblStatus = new QLabel(this->ui->statusBar);
   this->ui->statusBar->addWidget(this->lblStatus);

   connect(this->ui->butPause, SIGNAL(toggled(bool)), this, SLOT(setWatchingPause(bool)));
   this->setWatchingPause(false);
}
Пример #18
0
void SubmitEditorWidget::fileListCustomContextMenuRequested(const QPoint & pos)
{
    // Execute menu offering to check/uncheck all
    QMenu menu;
    //: Check all for submit
    QAction *checkAllAction = menu.addAction(tr("Select All"));
    //: Uncheck all for submit
    QAction *uncheckAllAction = menu.addAction(tr("Unselect All"));
    QAction *action = menu.exec(d->m_ui.fileView->mapToGlobal(pos));
    if (action == checkAllAction) {
        checkAll();
        return;
    }
    if (action == uncheckAllAction) {
        uncheckAll();
        return;
    }
}
Пример #19
0
int main()
{
	addLog("===========================================================");
	addLog("NWChecker started");
	string curdir=getCurrentDir();
	loadResults();
	if (parseConfig())
		return 1;
	checkAll();
	SetCurrentDirectory(curdir.c_str());
	generateHTML();
	saveResults();
	if(silentMode) {
		int i;
		cin>>i;
	}
	return 0;
}
Пример #20
0
int dfs(int cur, int pathNum){
    int r=cur/m;
    int c=cur-r*m;
    if(r-2>=0 && !checkRow(r-2))
        return 0 ;
    if(r>=n-2 || cur==n*m){
        if(checkAll()){
            minx = pathNum;
            return 1;
        }
        if(cur==n*m) return 0;

    }
    if(dfs(cur+1, pathNum)) return 1;
    cover(r, c);
    path[pathNum] = cur+1;
    if(dfs(cur+1, pathNum+1)) return 1;
    cover(r, c);
    return 0;
}
Пример #21
0
//--- Apply --------------------------------------------------------------------
// create apply
void MainWindow::createApply()
{
    applyLog = new QTextEdit(ui->applyPage);
    applyLog->setCursorWidth(0);
    applyLog->setTextInteractionFlags(Qt::TextSelectableByMouse);
    applyLog->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);

    ui->scrollArea->setWidget(applyLog);
    ui->scrollArea->setWidgetResizable(true);

#ifdef Q_WS_MAEMO_5
    QAbstractKineticScroller *scroller;
    scroller = applyLog->property("kineticScroller").value<QAbstractKineticScroller*>();
    scroller->setMode(QAbstractKineticScroller::PushMode);
    scroller->setOvershootPolicy(QAbstractKineticScroller::OvershootAlwaysOff);
    scroller->setEnabled(true);
#endif

    connect(ui->applyCheckBtn, SIGNAL(clicked()), this, SLOT(checkAll()));
    connect(ui->applyPatchBtn, SIGNAL(clicked()), this, SLOT(patchNolo()));
    connect(ui->applyReturnBtn, SIGNAL(clicked()), this, SLOT(closeApply()));
}
MaemoProFilesUpdateDialog::MaemoProFilesUpdateDialog(const QList<MaemoDeployableListModel *> &models,
    QWidget *parent)
    : QDialog(parent),
    m_models(models),
    ui(new Ui::MaemoProFilesUpdateDialog)
{
    ui->setupUi(this);
    ui->tableWidget->setRowCount(models.count());
    ui->tableWidget->setHorizontalHeaderItem(0,
        new QTableWidgetItem(tr("Updateable Project Files")));
    for (int row = 0; row < models.count(); ++row) {
        QTableWidgetItem *const item
            = new QTableWidgetItem(QDir::toNativeSeparators(models.at(row)->proFilePath()));
        item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
        item->setCheckState(Qt::Unchecked);
        ui->tableWidget->setItem(row, 0, item);
    }
    ui->tableWidget->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
    ui->tableWidget->resizeRowsToContents();
    connect(ui->checkAllButton, SIGNAL(clicked()), this, SLOT(checkAll()));
    connect(ui->uncheckAllButton, SIGNAL(clicked()), this, SLOT(uncheckAll()));
}
Пример #23
0
    // VISITORS
    virtual void visit(AstNodeModule* nodep, AstNUser*) {
	m_modp = nodep;
	nodep->iterateChildren(*this);
	checkAll(nodep);
	m_modp = NULL;
    }
Пример #24
0
    //-----
    virtual void visit(AstNode* nodep, AstNUser*) {
	if (nodep->isOutputter()) m_sideEffect=true;
	nodep->iterateChildren(*this);
	checkAll(nodep);
    }
Пример #25
0
TEST_F(XMAS_TYPICAL, NUSMV) {
  checkAll("nusmv forward", nusmv_forward_checker);
  checkAll("nusmv backward", nusmv_backward_checker);
}
Пример #26
0
void InputFilter::checkAll()
{ checkAll(IOFilter_defaultCheckTime); }
Пример #27
0
void QgsSymbolLegendNode::checkAllItems()
{
  checkAll( true );
}
Пример #28
0
    virtual void visit(AstNodeDType* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkDType(nodep);
	checkAll(nodep);
    }
Пример #29
0
void QgsSymbolLegendNode::uncheckAllItems()
{
  checkAll( false );
}
Пример #30
0
    virtual void visit(AstCell* nodep, AstNUser*) {
	nodep->iterateChildren(*this);
	checkAll(nodep);
	nodep->modp()->user1Inc();
    }