Example #1
0
void MyLable::updateData()
{
    if(this->m_item->text() == ""){
        this->hide();
        emit hideButtons(true);
    }else{
        this->setText(this->m_item->text());
        this->show();
        emit hideButtons(false);

    }
}
Example #2
0
void AbstractItemDetail::afterSaveAct()
{
	progress(false);
	hideButtons(false);

	getItem()->getChildren();
}
Example #3
0
void TabBar::updateVisibilityWithFullscreen(bool visible)
{
    if (visible) {
        emit showButtons();
    }
    else {
        emit hideButtons();
    }

    QTabBar::setVisible(visible);
}
Example #4
0
// Choose the "most relevant" operation for this object, and show a button for
// that operation as the left-most button in the inspector.
void LLInspectObject::updateButtons(LLSelectNode* nodep)
{
	// We'll start with everyone hidden and show the ones we need
	hideButtons();
	
	LLViewerObject* object = nodep->getObject();
	LLViewerObject *parent = (LLViewerObject*)object->getParent();
	bool for_copy = anyone_copy_selection(nodep);
	bool for_sale = enable_buy_object();
	S32 price = nodep->mSaleInfo.getSalePrice();
	U8 click_action = final_click_action(object);

	if (for_copy
		|| (for_sale && price == 0))
	{
		// Free copies have priority over other operations
		getChild<LLUICtrl>("take_free_copy_btn")->setVisible(true);
	}
	else if (for_sale)
	{
		getChild<LLUICtrl>("buy_btn")->setVisible(true);
	}
	else if ( enable_pay_object() )
	{
		getChild<LLUICtrl>("pay_btn")->setVisible(true);
	}
	else if (click_action == CLICK_ACTION_SIT)
	{
		// Click-action sit must come before "open" because many objects on
		// which you can sit have scripts, and hence can be opened
		getChild<LLUICtrl>("sit_btn")->setVisible(true);
		updateSitLabel(nodep);
	}
	else if (object->flagHandleTouch()
		|| (parent && parent->flagHandleTouch()))
	{
		getChild<LLUICtrl>("touch_btn")->setVisible(true);
		updateTouchLabel(nodep);
	}
	else if ( enable_object_open() )
	{
		// Open is last because anything with a script in it can be opened
		getChild<LLUICtrl>("open_btn")->setVisible(true);
	}
	else
	{
		// By default, we can sit on anything
		getChild<LLUICtrl>("sit_btn")->setVisible(true);
		updateSitLabel(nodep);
	}

	// No flash
	focusFirstItem(FALSE, FALSE);
}
Example #5
0
void schedulescreen::showPoints(int)
{
    // first hide everything
    hidePoints();
    hideButtons();

    // display only those points that are requested by weekday check boxes
    if(MondayButton->isChecked()) {
        pointList.at(0)->show();
        pointList.at(1)->show();
        pointList.at(2)->show();
        pointList.at(3)->show();
    }
    if(TuesdayButton->isChecked()) {
        pointList.at(4)->show();
        pointList.at(5)->show();
        pointList.at(6)->show();
        pointList.at(7)->show();
    }
    if(WednesdayButton->isChecked()) {
        pointList.at(8)->show();
        pointList.at(9)->show();
        pointList.at(10)->show();
        pointList.at(11)->show();
    }
    if(ThursdayButton->isChecked()) {
        pointList.at(12)->show();
        pointList.at(13)->show();
        pointList.at(14)->show();
        pointList.at(15)->show();
    }
    if(FridayButton->isChecked()) {
        pointList.at(16)->show();
        pointList.at(17)->show();
        pointList.at(18)->show();
        pointList.at(19)->show();
    }
    if(SaturdayButton->isChecked()) {
        pointList.at(20)->show();
        pointList.at(21)->show();
        pointList.at(22)->show();
        pointList.at(23)->show();
    }
    if(SundayButton->isChecked()) {
        pointList.at(24)->show();
        pointList.at(25)->show();
        pointList.at(26)->show();
        pointList.at(27)->show();
    }
    return;

}
Example #6
0
void LLSplitButton::onItemSelected(LLUICtrl* ctrl)
{
	if (!ctrl) return;

	hideButtons();

	// call the callback if it exists
	if(!mSelectionCallback.empty())
	{
		mSelectionCallback(this, ctrl->getName());
	}

	gFocusMgr.setKeyboardFocus(NULL);
}
Example #7
0
favoritos::favoritos(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::favoritos)
{
    ui->setupUi(this);

    setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground);

    ui->pb1->setTipo(jbotao::retangulo);
    ui->pb2->setTipo(jbotao::retangulo);
    ui->pb3->setTipo(jbotao::retangulo);
    ui->pb4->setTipo(jbotao::retangulo);
    ui->pb5->setTipo(jbotao::retangulo);
    ui->pb6->setTipo(jbotao::retangulo);
    ui->pb7->setTipo(jbotao::retangulo);
    ui->pb8->setTipo(jbotao::retangulo);
    ui->pb9->setTipo(jbotao::retangulo);
    ui->pb10->setTipo(jbotao::retangulo);
    ui->pb11->setTipo(jbotao::retangulo);
    ui->pb12->setTipo(jbotao::retangulo);
    ui->pb13->setTipo(jbotao::retangulo);
    ui->pb14->setTipo(jbotao::retangulo);
    ui->pb15->setTipo(jbotao::retangulo);
    ui->pb16->setTipo(jbotao::retangulo);

//    layoutB->setAlignment(Qt::AlignTop);

    hideButtons();

    totalBotoes = 0;

    QSettings settings("config.ini", QSettings::IniFormat);

    QString plataforma = settings.value("plataforma").toString();

    QGridLayout *layout = new QGridLayout;
    layout->setAlignment(Qt::AlignLeft);

    setLayout(layout);

    setAcceptDrops(true);



/*
    createList();
    findInPath();
*/
}
Example #8
0
void TabBar::setVisible(bool visible)
{
    if (visible) {
        if (p_QupZilla->isFullScreen()) {
            return;
        }

        emit showButtons();
    }
    else {
        emit hideButtons();
    }

    QTabBar::setVisible(visible);
}
Example #9
0
void LLSplitButton::onArrowBtnDown()
{
	if (!mItemsPanel->getVisible())
	{
		showButtons();

		setFocus(TRUE);

		if (mArrowBtn->hasMouseCapture() || mShownItem->hasMouseCapture())
		{
			gFocusMgr.setMouseCapture(this);
		}
	}
	else
	{
		hideButtons();
	}
}
Example #10
0
/*virtual*/
BOOL LLInspectObject::postBuild(void)
{
	// The XML file has sample data in it.  Clear that out so we don't
	// flicker when data arrives off network.
	getChild<LLUICtrl>("object_name")->setValue("");
	getChild<LLUICtrl>("object_creator")->setValue("");
	getChild<LLUICtrl>("object_description")->setValue("");
	getChild<LLUICtrl>("object_media_url")->setValue("");
	// Set buttons invisible until we know what this object can do
	hideButtons();

	// Hide floater when name links clicked
	LLTextBox* textbox = getChild<LLTextBox>("object_creator");
	textbox->mURLClickSignal.connect(
		boost::bind(&LLInspectObject::closeFloater, this, false) );

	// Hook up functionality
	getChild<LLUICtrl>("buy_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickBuy, this));
	getChild<LLUICtrl>("pay_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickPay, this));
	getChild<LLUICtrl>("take_free_copy_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickTakeFreeCopy, this));
	getChild<LLUICtrl>("touch_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickTouch, this));
	getChild<LLUICtrl>("sit_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickSit, this));
	getChild<LLUICtrl>("open_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickOpen, this));
	getChild<LLUICtrl>("more_info_btn")->setCommitCallback(
		boost::bind(&LLInspectObject::onClickMoreInfo, this));

	// Watch for updates to selection properties off the network
	LLSelectMgr::getInstance()->mUpdateSignal.connect(
		boost::bind(&LLInspectObject::update, this) );

	return TRUE;
}
Example #11
0
void LLSplitButton::onFocusLost()
{
	hideButtons();
	LLUICtrl::onFocusLost();
}
Example #12
0
void schedulescreen::showButtons(schedulepoint *point)
{
    // show left, right, up, and down buttons in correct position for any input conditions
    int i;
    // track which is the point that has been clicked on
    currentPoint = point;
    // show time indicated by position of current point
    currentTime->setText(currentPoint->time());

    // first hide all 4 buttons, then we will make them reappear in the correct position
    hideButtons();

    // create left arrow
    QPushButton *leftArrowButton = new QPushButton();
    leftArrowButton->setFocusPolicy(Qt::NoFocus);
    leftArrowButton->setStyleSheet("background: rgba(0,0,0,0);"
                                   "border-image: url(:/Images/simple-black-square-icon-arrowleft.png) 1;");
    leftArrowButton->setFixedSize(25,25);
    connect(leftArrowButton, SIGNAL(clicked()), this, SLOT(shiftLeft()));

    // create right arrow
    QPushButton *rightArrowButton = new QPushButton();
    rightArrowButton->setFocusPolicy(Qt::NoFocus);
    rightArrowButton->setStyleSheet("background: rgba(0,0,0,0);"
                                   "border-image: url(:/Images/simple-black-square-icon-arrowright.png) 1;");
    rightArrowButton->setFixedSize(25,25);
    connect(rightArrowButton, SIGNAL(clicked()),this,SLOT(shiftRight()));

    // create up arrow
    QPushButton *upArrowButton = new QPushButton();
    upArrowButton->setFocusPolicy(Qt::NoFocus);
    upArrowButton->setStyleSheet("background: rgba(0,0,0,0);"
                                 "border-image: url(:/Images/simple-black-square-icon-arrowup.png) 1;");
    upArrowButton->setFixedSize(25,25);
    connect(upArrowButton, SIGNAL(clicked()), this, SLOT(increaseTemp()));

    // create down arrow
    QPushButton *downArrowButton = new QPushButton();
    downArrowButton->setFocusPolicy(Qt::NoFocus);
    downArrowButton->setStyleSheet("background: rgba(0,0,0,0);"
                                 "border-image: url(:/Images/simple-black-square-icon-arrowdown.png) 1;");
    downArrowButton->setFixedSize(25,25);
    connect(downArrowButton, SIGNAL(clicked()), this, SLOT(decreaseTemp()));

    // create proxy widgets so that buttons can be added to graphics view
    proxyLeftButton = new QGraphicsProxyWidget();
    proxyLeftButton->setWidget(leftArrowButton);
    proxyRightButton = new QGraphicsProxyWidget();
    proxyRightButton->setWidget(rightArrowButton);
    proxyUpButton = new QGraphicsProxyWidget();
    proxyUpButton->setWidget(upArrowButton);
    proxyDownButton = new QGraphicsProxyWidget();
    proxyDownButton->setWidget(downArrowButton);

    // set position of left and right buttons on either side of currently selected point
    proxyLeftButton->setPos(QPoint(0.075 + (85 * (point->getID() % 4)),
                                        25 + (22 * ((point->getID() / 4) % 7))));
    scene->addItem(proxyLeftButton);
    proxyRightButton->setPos(QPoint(45.075 + (85 * (point->getID() % 4)),
                                    25 + (22 * ((point->getID() / 4) % 7))));
    scene->addItem(proxyRightButton);

    // set up and down buttons at the top and bottom of currently visible column
    for(i=0; i<7; i++) {
        if(pointList.at((point->getID()%4 + 4*i))->isVisible()) {
            proxyUpButton->setPos(QPoint(-13 + pointList.at(point->getID()%4 + 4*i)->pos().x(),
                                         -31 + pointList.at(point->getID()%4 +4*i)->pos().y()));
            break;
        }
    }
    scene->addItem(proxyUpButton);

    for(i=0; i<7; i++) {
        if(pointList.at((24+(point->getID()%4) - 4*i))->isVisible()) { // only works if last row is visible
            proxyDownButton->setPos(QPoint(-13 + pointList.at((24+(point->getID()%4) - 4*i))->pos().x(),
                                           6 + pointList.at((24+(point->getID()%4) - 4*i))->pos().y()));
            break;
        }
    }

    scene->addItem(proxyDownButton);

    // if the point has already been moved, make sure buttons are created at the right spot
    if(point->getLocation()<0) {
        for(i=0; i>point->getLocation(); i--) {
            shiftHorizontalButtonsLeft();
        }
    } else {
        for(i=0; i<point->getLocation(); i++) {
            shiftHorizontalButtonsRight();
        }
    }

    // blur all columns except the currently selected column
    blur();

}
Example #13
0
void Gutenbrowser::keyReleaseEvent( QKeyEvent *e) {
    switch ( e->key() ) {
        case Key_D:
            DownloadIndex();
            break;
        case Key_P:
            PrintBtn();
            break;
        case Key_S:
            SearchBtn();
            break;
        case Key_R:
            break;
        case Key_T:
            ChangeFont();
            break;
        case Key_C:
            ClearEdit();
            break;
        case Key_H:
            HelpBtn();
            break;
        case Key_K:
            LookupBtn();
            break;
        case Key_O:
        case Key_F9: //activity
            OpenBtn();
            break;
        case Key_I:
        case Key_F10: //contacts
            hideButtons();
            break;
        case Key_U:// hide menu
        case Key_F11: //menu
            if(menubar->isHidden() )
                menubar->show();
            else
                menubar->hide();
            break;
        case Key_F12: //home
            BeginBtn();
            break;
        case Key_L:
        case Key_F13: //mail
          LibraryBtn();
          break;
        case Key_Space:
            if(loadCheck)
                ForwardBtn();
            break;
        case Key_Right:
            ForwardButton->setFocus();
            ForwardBtn();
            break;
        case Key_Left:
            BackBtn();
            BackButton->setFocus();
            break;
        case Key_E:
        case Key_Escape:
            ByeBye();
            break;
        case Key_B:
        case Key_PageUp:
            BackBtn();
            break;
        case Key_F:
        case Key_PageDown:
            ForwardBtn();
            break;
        case Key_M:
        case Key_Down:
        case Key_Up:
        case Key_Home:
        default:
            break;
    };
}