예제 #1
0
void Data::OsgNode::showLabel( bool visible, bool labelsForResidence )
{
	setValue( INDEX_LABEL, visible );
	auto residence = getResidence();
	if ( residence ) {
		residence->showLabels( visible && labelsForResidence );
	}
}
예제 #2
0
bool KlustersView::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: updatedDimensions((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 1: singleColorUpdated((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 2: clusterRemovedFromView((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 3: clusterAddedToView((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 4: newClusterAddedToView((QValueList<int>&)*((QValueList<int>*)static_QUType_ptr.get(_o+1)),(int)static_QUType_int.get(_o+2),(bool)static_QUType_bool.get(_o+3)); break;
    case 5: newClusterAddedToView((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 6: spikesRemovedFromClusters((QValueList<int>&)*((QValueList<int>*)static_QUType_ptr.get(_o+1)),(bool)static_QUType_bool.get(_o+2)); break;
    case 7: modeToSet((BaseFrame::Mode)(*((BaseFrame::Mode*)static_QUType_ptr.get(_o+1)))); break;
    case 8: spikesAddedToCluster((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 9: updateContents(); break;
    case 10: emptySelection(); break;
    case 11: modifiedClusters((QValueList<int>&)*((QValueList<int>*)static_QUType_ptr.get(_o+1)),(bool)static_QUType_bool.get(_o+2),(bool)static_QUType_bool.get(_o+3)); break;
    case 12: modifiedClustersUndo((QValueList<int>&)*((QValueList<int>*)static_QUType_ptr.get(_o+1)),(bool)static_QUType_bool.get(_o+2)); break;
    case 13: updatedTimeFrame((long)(*((long*)static_QUType_ptr.get(_o+1))),(long)(*((long*)static_QUType_ptr.get(_o+2)))); break;
    case 14: sampleMode(); break;
    case 15: timeFrameMode(); break;
    case 16: meanPresentation(); break;
    case 17: allWaveformsPresentation(); break;
    case 18: overLayPresentation(); break;
    case 19: sideBySidePresentation(); break;
    case 20: increaseAmplitude(); break;
    case 21: decreaseAmplitude(); break;
    case 22: updateDisplayNbSpikes((long)(*((long*)static_QUType_ptr.get(_o+1)))); break;
    case 23: increaseAmplitudeofCorrelograms(); break;
    case 24: decreaseAmplitudeofCorrelograms(); break;
    case 25: noScale(); break;
    case 26: maxScale(); break;
    case 27: shoulderScale(); break;
    case 28: updatedBinSizeAndTimeFrame((int)static_QUType_int.get(_o+1),(int)static_QUType_int.get(_o+2)); break;
    case 29: setShoulderLine((bool)static_QUType_bool.get(_o+1)); break;
    case 30: updateDrawing(); break;
    case 31: changeGain((int)static_QUType_int.get(_o+1)); break;
    case 32: changeTimeInterval((int)static_QUType_int.get(_o+1),(bool)static_QUType_bool.get(_o+2)); break;
    case 33: changeChannelPositions((QValueList<int>&)*((QValueList<int>*)static_QUType_ptr.get(_o+1))); break;
    case 34: computeProbabilities(); break;
    case 35: changeBackgroundColor((QColor)(*((QColor*)static_QUType_ptr.get(_o+1)))); break;
    case 36: clustersRenumbered((bool)static_QUType_bool.get(_o+1)); break;
    case 37: updateClusters((QString)static_QUType_QString.get(_o+1),(QValueList<int>&)*((QValueList<int>*)static_QUType_ptr.get(_o+2)),(ItemColors*)static_QUType_ptr.get(_o+3),(bool)static_QUType_bool.get(_o+4)); break;
    case 38: increaseAllAmplitude(); break;
    case 39: decreaseAllAmplitude(); break;
    case 40: showLabels((bool)static_QUType_bool.get(_o+1)); break;
    case 41: nextCluster(); break;
    case 42: previousCluster(); break;
    default:
	return KDockArea::qt_emit(_id,_o);
    }
    return TRUE;
}
void manager::genMove() {
    std::cout << "genMove()" << std::endl;

    if (game_.nowWinner()==Player::None()) {
        clearLabels();

        Player current_ = game_.CurrentPlayer();
        generated[game_.GenMove().GetLocation()] ++;
        showLabels();
    }
    else {
        std::cout << "Game has already finished." << std::endl;
    }
}
예제 #4
0
void ActivityWidget::slotAccountActivityStatus(AccountState *ast, int statusCode)
{
    if( !(ast && ast->account()) ) {
        return;
    }
    if( statusCode == 999 ) {
        _accountsWithoutActivities.insert(ast->account()->displayName());
    } else {
        _accountsWithoutActivities.remove(ast->account()->displayName());
    }

    int accountCount = AccountManager::instance()->accounts().count();
    emit hideAcitivityTab(_accountsWithoutActivities.count() == accountCount);

    showLabels();
}
예제 #5
0
ActivityWidget::ActivityWidget(QWidget *parent) :
    QWidget(parent),
    _ui(new Ui::ActivityWidget),
    _notificationRequestsRunning(0)
{
    _ui->setupUi(this);

    // Adjust copyToClipboard() when making changes here!
#if defined(Q_OS_MAC)
    _ui->_activityList->setMinimumWidth(400);
#endif

    _model = new ActivityListModel(this);
    ActivityItemDelegate *delegate = new ActivityItemDelegate;
    delegate->setParent(this);
    _ui->_activityList->setItemDelegate(delegate);
    _ui->_activityList->setAlternatingRowColors(true);
    _ui->_activityList->setModel(_model);

    _ui->_notifyLabel->hide();
    _ui->_notifyScroll->hide();

    // Create a widget container for the notifications. The ui file defines
    // a scroll area that get a widget with a layout as children
    QWidget *w = new QWidget(this);
    _notificationsLayout = new QVBoxLayout(this);
    w->setLayout(_notificationsLayout);
    _ui->_notifyScroll->setWidget(w);

    showLabels();

    connect(_model, SIGNAL(activityJobStatusCode(AccountState*,int)),
            this, SLOT(slotAccountActivityStatus(AccountState*,int)));

    _copyBtn = _ui->_dialogButtonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
    _copyBtn->setToolTip( tr("Copy the activity list to the clipboard."));
    connect(_copyBtn, SIGNAL(clicked()), SIGNAL(copyToClipboard()));

    connect(_model, SIGNAL(rowsInserted(QModelIndex,int,int)), SIGNAL(rowsInserted()));

    connect( _ui->_activityList, SIGNAL(activated(QModelIndex)), this,
             SLOT(slotOpenFile(QModelIndex)));

    connect( &_removeTimer, SIGNAL(timeout()), this, SLOT(slotCheckToCleanWidgets()) );
    _removeTimer.setInterval(1000);
}
void manager::searchMove() {
    std::cout << "searchMove()" << std::endl;

    if (game_.nowWinner()==Player::None()) {
        clearLabels();

        Player current_ = game_.CurrentPlayer();
        for (size_t i=0; i<20; i++) {
            (std::cout << ".").flush();
            generated[game_.GenMove().GetLocation()] ++;
        }
        std::cout << std::endl;
        showLabels();
    }
    else {
        std::cout << "Game has already finished." << std::endl;
    }
}
예제 #7
0
void PointPicker::Update()
{
	auto& tshowLabels = mShow.GetPointLabels();
	std::vector<wxString> showLabels(tshowLabels.begin(), tshowLabels.end());
	if (mCachedLabels != showLabels)
	{
		mCachedLabels = showLabels;
		mList->Clear();
		mList->Set(mCachedLabels.size(), &mCachedLabels[0]);
	}
	auto showSelectionList = mShow.GetSelectionList();
	if (mCachedSelection != showSelectionList)
	{
		mList->DeselectAll();
		mCachedSelection = showSelectionList;
		for (auto n = mCachedSelection.begin(); n != mCachedSelection.end(); ++n)
		{
			mList->SetSelection(*n);
		}
	}
}
예제 #8
0
void MainWindow::createActions() {
  printAct = new QAction(QIcon(":/images/print.png"), tr("&Print..."), this);
  //   printAct->setShortcut(QKeySequence::Print);
  printAct->setStatusTip(tr("Print the document"));
  connect(printAct, SIGNAL(triggered()), this, SLOT(printFile()));
  
  // Added by AiO to Open a new file
  openAct = new QAction(tr("&Open"), this);
  openAct->setShortcut(Qt::Key_O | Qt::CTRL);
  openAct->setStatusTip(tr("Open a new file"));
  connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
  
  saveAsAct = new QAction(tr("Save &As..."), this);
  //   saveAsAct->setShortcut(QKeySequence::SaveAs);
  saveAsAct->setStatusTip(tr("Save the document under a new name"));
  connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));

  exitAct = new QAction(tr("E&xit"), this);
  exitAct->setShortcut(Qt::Key_Escape);
  exitAct->setStatusTip(tr("Exit the application"));
  connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));

  normalAct = new QAction(QIcon(":/images/normalView.png"), tr("Normal view"), this);
  normalAct->setCheckable(true);
  normalAct->setChecked(true);
  normalAct->setShortcut(Qt::Key_N);
  normalAct->setStatusTip(tr("Normal view"));
  connect(normalAct, SIGNAL(triggered()), this, SLOT(normal()));

  polarAct = new QAction(QIcon(":/images/polar.png"), tr("Polar fish eye"), this);
  polarAct->setCheckable(true);
  polarAct->setShortcut(Qt::Key_P | Qt::CTRL);
  polarAct->setStatusTip(tr("Polar fish eye"));
  connect(polarAct, SIGNAL(triggered()), this, SLOT(polar()));

  polarFixedAct = new QAction(QIcon(":/images/fixedPolar.png"), tr("Fixed radius polar fish eye"), this);
  polarFixedAct->setCheckable(true);
  polarFixedAct->setShortcut(Qt::Key_P);
  polarFixedAct->setStatusTip(tr("Fixed radius polar fish eye"));
  connect(polarFixedAct, SIGNAL(triggered()), this, SLOT(polarFixed()));

  cartAct = new QAction(QIcon(":/images/cartesian.png"), tr("Cartesian fish eye"), this);
  cartAct->setCheckable(true);
  cartAct->setShortcut(Qt::Key_C | Qt::CTRL);
  cartAct->setStatusTip(tr("Cartesian fish eye"));
  connect(cartAct, SIGNAL(triggered()), this, SLOT(cart()));

  cartFixedAct = new QAction(QIcon(":/images/fixedCartesian.png"), tr("Fixed radius cartesian fish eye"), this);
  cartFixedAct->setCheckable(true);
  cartFixedAct->setShortcut(Qt::Key_C);
  cartFixedAct->setStatusTip(tr("Fixed radius cartesian fish eye"));
  connect(cartFixedAct, SIGNAL(triggered()), this, SLOT(cartFixed()));

  showLabelsAct = new QAction(QIcon(":/images/labelEdges.png"), tr("Display edge labels"), this);
  showLabelsAct->setCheckable(true);
  showLabelsAct->setStatusTip(tr("Display edge labels"));
  connect(showLabelsAct, SIGNAL(triggered()), this, SLOT(showLabels()));
  //   connect(showLabelsAct, SIGNAL(toggled(bool)), this, SLOT(toggleShowLabels(bool)));

  zoomInAct = new QAction(QIcon(":/images/zoomIn.png"), tr("Zoom in"), this);
  zoomInAct->setShortcut(Qt::Key_Plus);
  zoomInAct->setStatusTip(tr("Zoom in"));
  connect(zoomInAct, SIGNAL(triggered()), this, SLOT(zoomIn()));

  zoomOutAct = new QAction(QIcon(":/images/zoomOut.png"), tr("Zoom out"), this);
  zoomOutAct->setShortcut(Qt::Key_Minus);
  zoomOutAct->setStatusTip(tr("Zoom out"));
  connect(zoomOutAct, SIGNAL(triggered()), this, SLOT(zoomOut()));

  zoomNormalAct = new QAction(QIcon(":/images/zoomNormal.png"), tr("Zoom normal"), this);
  zoomNormalAct->setShortcut(Qt::Key_0);
  zoomNormalAct->setStatusTip(tr("Zoom normal (100%)"));
  connect(zoomNormalAct, SIGNAL(triggered()), this, SLOT(zoomNormal()));

  fitAllAct = new QAction(QIcon(":/images/fitAll.png"), tr("Fit all graph"), this);
  fitAllAct->setShortcut(Qt::Key_M);
  fitAllAct->setStatusTip(tr("Fit all graph"));
  connect(fitAllAct, SIGNAL(triggered()), this, SLOT(fitAll()));

  positOriginAct = new QAction(QIcon(":/images/positOrigin.png"), tr("Position on origin"), this);
  positOriginAct->setShortcut(Qt::Key_O);
  positOriginAct->setStatusTip(tr("Position on origin"));
  connect(positOriginAct, SIGNAL(triggered()), this, SLOT(positOrigin()));

  easyPanAct = new QAction(tr("Easy graph panning"), this);
  easyPanAct->setCheckable(true);
  easyPanAct->setStatusTip(tr("Easy graph panning"));
  connect(easyPanAct, SIGNAL(triggered()), this, SLOT(easyPan()));

  helpAct = new QAction(tr("Help"), this);
  helpAct->setShortcut(Qt::Key_F1);
  helpAct->setStatusTip(tr("Display help"));
  connect(helpAct, SIGNAL(triggered()), this /*qApp*/, SLOT(help()));

  aboutAct = new QAction(tr("&About..."), this);
  aboutAct->setStatusTip(tr("Show the About box"));
  connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
  
  //Added by AiO  new action for search window
  searchAct = new QAction(tr("&Search"), this);
  searchAct->setShortcut(Qt::Key_F5);
  searchAct->setStatusTip(tr("Search F5"));
  connect(searchAct, SIGNAL(triggered()), this, SLOT(showSearch()));

}