Пример #1
0
void CWhiteBoardView::mousePressEvent(QMouseEvent *e)
{
    if(e->button() == Qt::LeftButton)
    {
        emit sigClicked();
    }
    QGraphicsView::mousePressEvent(e);
}
Пример #2
0
void
StatusbarButton::pointerButtonUpEvent(const PointerEvent& pointerEvent)
{
    if (_click)
    {
        sigClicked();
        _click = false;
        update();
    }
}
Пример #3
0
void CTriStateButton::slotClicked()
///////////////////////////////////
{
  if (++m_state >= 3)
    m_state = 0;

  QToolButton::setText(str[m_state]);
  QToolButton::setIcon(pix[m_state]);

  emit sigClicked();
}
Пример #4
0
PresetWidget::PresetWidget(QWidget *parent) : QWidget(parent), ui(new Ui::PresetWidget)
{
    ui->setupUi(this);
    PresetButton *button;

    for(int i = 0; i < 10; i++) {
        button = _getPresetButtonAt(i);
        connect(button, SIGNAL(sigClicked(QString)), this, SLOT(_slotPresetButtonClicked(QString)));
        connect(this, SIGNAL(sigFolderChanged(QString)), button, SLOT(slotPresetSelected(QString)));
    }
}
Пример #5
0
void PresetButton::_slotClicked(bool checked)
{
    if(!checked) {
        this->setChecked(false);
        return;
    }

    if(!this->text().isEmpty()) {
        emit sigClicked(this->presetPath);
    }
}
Пример #6
0
ListUsers::ListUsers( QWidget* parent):
	ListNodes(  parent, "users")
{
	m_ctrl_sf = new CtrlSortFilter( this,
			&ms_SortType1, &ms_SortAscending1,
			&ms_SortType2, &ms_SortAscending2,
			&ms_FilterType, &ms_FilterInclude, &ms_FilterMatch, &ms_FilterString);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNONE);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TPRIORITY);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNAME);
	m_ctrl_sf->addSortType(   CtrlSortFilter::THOSTNAME);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNUMJOBS);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNUMRUNNINGTASKS);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMEREGISTERED);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMEACTIVITY);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TNONE);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TNAME);
	m_ctrl_sf->addFilterType( CtrlSortFilter::THOSTNAME);
	initSortFilterCtrl();


	// Add left panel buttons:
	ButtonPanel * bp;

	bp = addButtonPanel("LOG","users_log","Show user log.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actRequestLog()));

	bp = addButtonPanel("PRI","users_priority","Set user priority.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actPriority()));

	bp = addButtonPanel("FOR","users_errors_forgive_time","Set user errors forgive time.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actErrorsForgiveTime()));

	bp = addButtonPanel("LIFE","users_jobs_life_time","Set jobs life time.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actJobsLifeTime()));

	bp = addButtonPanel("ORD","users_solve_ordered","Solve jobs by order.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actSolveJobsByOrder()));

	bp = addButtonPanel("PAR","users_solve_parallel","Solve jobs parallel.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actSolveJobsParallel()));


	m_parentWindow->setWindowTitle("Users");

	init();

	if( false == af::Environment::VISOR()) setAllowSelection( false);

	connect( (ModelNodes*)m_model, SIGNAL( nodeAdded( ItemNode *, const QModelIndex &)),
			                 this,   SLOT( userAdded( ItemNode *, const QModelIndex &)));
}
Пример #7
0
void
DirectionalButton::pointerButtonUpEvent(const PointerEvent& event)
{
    ILOG_TRACE_W(ILX_DIRBUTTON);
    sigReleased();
    if (_buttonFlag & PressedDown)
    {
        if (__dbThread->_target == this)
            __dbThread->cancel();

        _buttonFlag = (ButtonFlags) (_buttonFlag & ~PressedDown);
        if (_icon)
            _icon->setState(DefaultState);
        PlatformManager::instance().playSoundEffect("Click");
        toggleChecked();
        sigClicked();
    }
}
Пример #8
0
ListJobs::ListJobs( QWidget* parent):
	ListNodes( parent, "jobs")
{
	if( af::Environment::VISOR())
		m_ctrl_sf = new CtrlSortFilter( this,
			&ms_SortType1_SU, &ms_SortAscending1_SU,
			&ms_SortType2_SU, &ms_SortAscending2_SU,
			&ms_FilterType_SU, &ms_FilterInclude_SU, &ms_FilterMatch_SU, &ms_FilterString_SU);
	else
		m_ctrl_sf = new CtrlSortFilter( this,
			&ms_SortType1, &ms_SortAscending1,
			&ms_SortType2, &ms_SortAscending2,
			&ms_FilterType, &ms_FilterInclude, &ms_FilterMatch, &ms_FilterString);

	m_ctrl_sf->addSortType(   CtrlSortFilter::TNONE);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMECREATION);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMERUN);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMESTARTED);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMEFINISHED);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNUMRUNNINGTASKS);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TSERVICE);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNAME);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TNONE);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TNAME);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TSERVICE);
	if( af::Environment::VISOR())
	{
		m_ctrl_sf->addSortType(   CtrlSortFilter::TPRIORITY);
		m_ctrl_sf->addSortType(   CtrlSortFilter::THOSTNAME);
		m_ctrl_sf->addSortType(   CtrlSortFilter::TUSERNAME);
		m_ctrl_sf->addFilterType( CtrlSortFilter::THOSTNAME);
		m_ctrl_sf->addFilterType( CtrlSortFilter::TUSERNAME);
	}

	initSortFilterCtrl();

	CtrlJobs * control = new CtrlJobs( m_ctrl_sf, this);
	m_ctrl_sf->getLayout()->addWidget( control);


	// Add left panel buttons:
	ButtonPanel * bp;

	bp = addButtonPanel("LOG","jobs_log","Show job log.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actRequestLog()));

	bp = addButtonPanel("EHO","jobs_show_err_hosts","Show error hosts.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actRequestErrorHostsList()));

	bp = addButtonPanel("PAU","jobs_pause","Pause selected jobs.","P");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actPause()));

	bp = addButtonPanel("STA","jobs_start","Start selected jobs.","S");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actStart()));

	bp = addButtonPanel("REH","jobs_reset_avoid_hosts","Reset error hosts.","E");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actResetErrorHosts()));

	bp = addButtonPanel("RET","jobs_restart_error_tasks","Restart error tasks.","R");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actRestartErrors()));

	bp = addButtonPanel("DEL","jobs_delete","Delete selected jobs.","D", true);
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actDelete()));

	bp = addButtonPanel("DDJ","jobs_delete_done","Delete all done jobs.","", true);
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actDeleteDone()));


	init();

	QTimer * timer = new QTimer(this);
	timer->start( 1000 * af::Environment::getWatchRefreshGuiSec());
	connect( timer, SIGNAL( timeout()), this, SLOT( repaintItems()));

	m_parentWindow->setWindowTitle("Jobs:");
}
Пример #9
0
ListRenders::ListRenders( QWidget* parent):
	ListNodes( parent, "renders")
{
	m_ctrl_sf = new CtrlSortFilter( this,
			&ms_SortType1, &ms_SortAscending1,
			&ms_SortType2, &ms_SortAscending2,
			&ms_FilterType, &ms_FilterInclude, &ms_FilterMatch, &ms_FilterString
		);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNONE);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TPRIORITY);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TCAPACITY);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TELDERTASKTIME);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMELAUNCHED);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTIMEREGISTERED);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TNAME);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TTASKUSER);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TUSERNAME);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TENGINE);
	m_ctrl_sf->addSortType(   CtrlSortFilter::TADDRESS);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TNONE);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TNAME);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TUSERNAME);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TTASKUSER);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TENGINE);
	m_ctrl_sf->addFilterType( CtrlSortFilter::TADDRESS);
	initSortFilterCtrl();

	CtrlRenders * control = new CtrlRenders( m_ctrl_sf, this);
	m_ctrl_sf->getLayout()->addWidget( control);

	// Add left panel buttons:
	ButtonPanel * bp;

	bp = addButtonPanel("LOG","renders_log","Show render log.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actRequestLog()));

	bp = addButtonPanel("TLG","renders_tasks_log","Show tasks log.");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actRequestTasksLog()));

	bp = addButtonPanel("nim","renders_nimby","Set nimby.","M");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actNimby()));

	bp = addButtonPanel("NIM","renders_NIMBY","Set NIMBY.","N");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actNIMBY()));

	bp = addButtonPanel("FRE","renders_free","Set free.","F");
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actFree()));

	bp = addButtonPanel("EJA","renders_eject_all","Eject all tasks.","", true);
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actEjectTasks()));

	bp = addButtonPanel("EJN","renders_eject_notmy","Eject mot my tasks.","", true);
	connect( bp, SIGNAL( sigClicked()), this, SLOT( actEjectNotMyTasks()));


	timer = new QTimer( this);
	connect(timer, SIGNAL(timeout()), this, SLOT( requestResources()));
	timer->start( 990 * af::Environment::getRenderHeartbeatSec() * af::Environment::getRenderUpResourcesPeriod());

	m_parentWindow->setWindowTitle("Renders");

	init();

	connect( (ModelNodes*)m_model, SIGNAL(   nodeAdded( ItemNode *, const QModelIndex &)),
	                         this,   SLOT( renderAdded( ItemNode *, const QModelIndex &)));

	if( false == af::Environment::VISOR())
		connect( m_view->selectionModel(), SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection &)),
	                                 this,   SLOT( selectionChanged( const QItemSelection &, const QItemSelection &)));

	setSpacing();

	QTimer * timer = new QTimer(this);
	timer->start( 1900 * af::Environment::getWatchRefreshGuiSec());
	connect( timer, SIGNAL( timeout()), this, SLOT( repaintItems()));
}
Пример #10
0
void QIArrowSplitter::prepare()
{
    /* Create main-layout: */
    m_pMainLayout = new QVBoxLayout(this);
    AssertPtrReturnVoid(m_pMainLayout);
    {
        /* Configure main-layout: */
        m_pMainLayout->setContentsMargins(0, 0, 0, 0);
        m_pMainLayout->setSpacing(3);
        /* Create button-layout: */
        QHBoxLayout *pButtonLayout = new QHBoxLayout;
        AssertPtrReturnVoid(pButtonLayout);
        {
            /* Configure button-layout: */
            pButtonLayout->setContentsMargins(0, 0, 0, 0);
            pButtonLayout->setSpacing(0);
            /* Create switch-button: */
            m_pSwitchButton = new QIArrowButtonSwitch;
            AssertPtrReturnVoid(m_pSwitchButton);
            {
                /* Configure switch-button: */
                m_pSwitchButton->setIconSize(QSize(10, 10));
                m_pSwitchButton->setIconForButtonState(QIArrowButtonSwitch::ButtonState_Collapsed,
                                                       UIIconPool::iconSet(":/arrow_right_10px.png"));
                m_pSwitchButton->setIconForButtonState(QIArrowButtonSwitch::ButtonState_Expanded,
                                                       UIIconPool::iconSet(":/arrow_down_10px.png"));
                connect(m_pSwitchButton, SIGNAL(sigClicked()), this, SLOT(sltUpdateNavigationButtonsVisibility()));
                connect(m_pSwitchButton, SIGNAL(sigClicked()), this, SLOT(sltUpdateDetailsBrowserVisibility()));
                /* Add switch-button into button-layout: */
                pButtonLayout->addWidget(m_pSwitchButton);
            }
            /* Add stretch: */
            pButtonLayout->addStretch();
            /* Create back-button: */
            m_pBackButton = new QIArrowButtonPress(QIArrowButtonPress::ButtonType_Back);
            AssertPtrReturnVoid(m_pBackButton);
            {
                /* Configure back-button: */
                m_pBackButton->setIconSize(QSize(10, 10));
                m_pBackButton->setIcon(UIIconPool::iconSet(":/arrow_left_10px.png"));
                connect(m_pBackButton, SIGNAL(sigClicked()), this, SLOT(sltSwitchDetailsPageBack()));
                /* Add back-button into button-layout: */
                pButtonLayout->addWidget(m_pBackButton);
            }
            /* Create next-button: */
            m_pNextButton = new QIArrowButtonPress(QIArrowButtonPress::ButtonType_Next);
            AssertPtrReturnVoid(m_pNextButton);
            {
                /* Configure next-button: */
                m_pNextButton->setIconSize(QSize(10, 10));
                m_pNextButton->setIcon(UIIconPool::iconSet(":/arrow_right_10px.png"));
                connect(m_pNextButton, SIGNAL(sigClicked()), this, SLOT(sltSwitchDetailsPageNext()));
                /* Add next-button into button-layout: */
                pButtonLayout->addWidget(m_pNextButton);
            }
            /* Add button layout into main-layout: */
            m_pMainLayout->addLayout(pButtonLayout);
            /* Update navigation-buttons visibility: */
            sltUpdateNavigationButtonsVisibility();
        }
        /* Create details-browser: */
        m_pDetailsBrowser = new QIDetailsBrowser;
        AssertPtrReturnVoid(m_pDetailsBrowser);
        {
            /* Add details-browser into main-layout: */
            m_pMainLayout->addWidget(m_pDetailsBrowser);
            /* Update details-browser visibility: */
            sltUpdateDetailsBrowserVisibility();
            /* Update details: */
            updateDetails();
        }
    }

    /* Apply size-policy finally: */
    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
}