Exemplo n.º 1
0
void FeedWidget::setFeed( QSharedPointer<Feed> feed )
{
    clearFeed();
    mFeed = feed;

    connect( mFeed.data(), SIGNAL(retiviedMore()), SLOT(feedRetrivedMore()) );
    showMore();
}
Exemplo n.º 2
0
void FeedWidget::scrolledFeed()
{
    if( mFeed ) {
        int max = verticalScrollBar()->maximum();
        int value = verticalScrollBar()->value();

        if( value+50 > max ) {
            showMore();
            mTargetTileCount += 25;
        }
    }
}
Exemplo n.º 3
0
ObjectWidget::ObjectWidget(QASObject* obj, QWidget* parent) : 
  ObjectWidgetWithSignals(parent),
  m_objectWidget(NULL),
  m_shortObjectWidget(NULL),
  m_contextLabel(NULL),
  m_contextButton(NULL),
  m_topLayout(NULL),
  m_object(NULL),
  m_irtObject(NULL),
  m_short(false)
{
#ifdef DEBUG_WIDGETS
  qDebug() << "Creating ObjectWidget";
#endif

  m_layout = new QVBoxLayout;
  m_layout->setContentsMargins(0, 0, 0, 0);
  m_layout->setSpacing(0);

  // Add label with context "Re:" text and "show context" button for
  // replies.
  m_topLayout = new QHBoxLayout;
  m_topLayout->setContentsMargins(0, 0, 0, 0);

  m_contextLabel = new RichTextLabel(this, true);
  m_topLayout->addWidget(m_contextLabel, 0, Qt::AlignVCenter);

  m_topLayout->addSpacing(10);
  m_contextButton = new TextToolButton(this);
  connect(m_contextButton, SIGNAL(clicked()), this, SLOT(onShowContext()));
  m_topLayout->addWidget(m_contextButton, 0, Qt::AlignVCenter);

  m_layout->addLayout(m_topLayout);

  m_objectWidget = new FullObjectWidget(m_object, this);
  ObjectWidgetWithSignals::connectSignals(m_objectWidget, this);
  connect(m_objectWidget, SIGNAL(lessClicked()),
          this, SLOT(showLess()));
  m_layout->addWidget(m_objectWidget);

  m_shortObjectWidget = new ShortObjectWidget(m_object, this);
  connect(m_shortObjectWidget, SIGNAL(follow(QString, bool)),
          this, SIGNAL(follow(QString, bool)));
  connect(m_shortObjectWidget, SIGNAL(moreClicked()),
          this, SLOT(showMore()));
  m_layout->addWidget(m_shortObjectWidget);
  
  changeObject(obj);

  setLayout(m_layout);
}
Exemplo n.º 4
0
TextFind::TextFind(QWidget *parent)
    : QWidget(parent)
{
    layout = new QGridLayout;
    layout->setContentsMargins(0, 0, 0, 0);

    hideBtn = new QPushButton(KIcon("window-close"), "");
    hideBtn->setMaximumWidth(30);
    hideBtn->setFlat(true);
    connect(hideBtn, SIGNAL(clicked()), this, SLOT(hide()));

    layout->addWidget(hideBtn, 0, 0);

    findEdit = new KLineEdit;
    findEdit->setClearButtonShown(true);
    findEdit->setMinimumWidth(150);
    layout->addWidget(findEdit, 0, 1);
    connect(findEdit, SIGNAL(textChanged(const QString &)), this, SLOT(findTextChange(const QString&)));

    prevBtn = new QPushButton(KIcon("go-previous"), i18n("Previous"));
    prevBtn->setFlat(true);
    connect(prevBtn, SIGNAL(clicked()), this, SLOT(prevBtnClicked()));
    layout->addWidget(prevBtn, 0, 2);

    nextBtn = new QPushButton(KIcon("go-next"), i18n("Next"));
    nextBtn->setFlat(true);
    connect(nextBtn, SIGNAL(clicked()), this, SLOT(nextBtnClicked()));
    layout->addWidget(nextBtn, 0, 3);

    moreBtn = new QPushButton(KIcon("arrow-up-double"), "");
    moreBtn->setFlat(true);
    moreBtn->setMaximumWidth(30);
    layout->addWidget(moreBtn, 0, 4);


    replaceEdit = new KLineEdit;
    replaceEdit->setClearButtonShown(true);
    replaceEdit->setMinimumWidth(150);
    layout->addWidget(replaceEdit, 1, 1);

    replaceBtn = new QPushButton(i18n("Replace"));
    replaceBtn->setFlat(true);
    connect(replaceBtn, SIGNAL(clicked()), this, SLOT(replaceBtnClicked()));
    layout->addWidget(replaceBtn, 1, 2);

    replaceAllBtn = new QPushButton(i18n("Replace All"));
    replaceAllBtn->setFlat(true);
    connect(replaceAllBtn, SIGNAL(clicked()), this, SLOT(replaceAllBtnClicked()));
    layout->addWidget(replaceAllBtn, 1, 3);


    optionPanel = new QFrame;
    optionLayout = new QHBoxLayout;
    optionLayout->setAlignment(Qt::AlignRight);
    caseCbx = new QCheckBox(i18n("Match case"));
    optionLayout->addWidget(caseCbx);
    wordCbx = new QCheckBox(i18n("Match whole word"));
    optionLayout->addWidget(wordCbx);
    optionPanel->setLayout(optionLayout);
    layout->addWidget(optionPanel, 2, 0, 4, 0);

    showAll = true;
    showMore();
    connect(moreBtn, SIGNAL(clicked()), this, SLOT(showMore()));

    setLayout(layout);
    connect(findEdit, SIGNAL(returnPressed()), nextBtn, SLOT(click()));

    abortAction = new QAction(this);
    abortAction->setShortcut(QKeySequence("Escape"));
    this->addAction(abortAction);
    connect(abortAction, SIGNAL(triggered(bool)), this, SLOT(hide()));
}
Exemplo n.º 5
0
void TextFind::showFull()
{
    show();
    if (!showAll)
        showMore();
}
Exemplo n.º 6
0
// Create the popupview with a dummy center.  It will be moved into place
// during LLViewerWindow's per-frame hover processing.
LLFloaterTools::LLFloaterTools()
:	LLFloater(std::string("toolbox floater")),
	mBtnFocus(NULL),
	mBtnMove(NULL),
	mBtnEdit(NULL),
	mBtnCreate(NULL),
	mBtnLand(NULL),
	mTextStatus(NULL),

	mRadioOrbit(NULL),
	mRadioZoom(NULL),
	mRadioPan(NULL),

	mRadioMove(NULL),
	mRadioLift(NULL),
	mRadioSpin(NULL),

	mRadioPosition(NULL),
	mRadioRotate(NULL),
	mRadioStretch(NULL),
	mRadioSelectFace(NULL),
	mCheckSelectIndividual(NULL),

	mCheckSnapToGrid(NULL),
	mBtnGridOptions(NULL),
	mTextGridMode(NULL),
	mComboGridMode(NULL),
	mCheckStretchUniform(NULL),
	mCheckStretchTexture(NULL),

	mBtnRotateLeft(NULL),
	mBtnRotateReset(NULL),
	mBtnRotateRight(NULL),

	mBtnDelete(NULL),
	mBtnDuplicate(NULL),
	mBtnDuplicateInPlace(NULL),

	mCheckSticky(NULL),
	mCheckCopySelection(NULL),
	mCheckCopyCenters(NULL),
	mCheckCopyRotates(NULL),
	mRadioSelectLand(NULL),
	mRadioDozerFlatten(NULL),
	mRadioDozerRaise(NULL),
	mRadioDozerLower(NULL),
	mRadioDozerSmooth(NULL),
	mRadioDozerNoise(NULL),
	mRadioDozerRevert(NULL),
	mComboDozerSize(NULL),
	mBtnApplyToSelection(NULL),
	mCheckShowOwners(NULL),


	mTab(NULL),
	mPanelPermissions(NULL),
	mPanelObject(NULL),
	mPanelVolume(NULL),
	mPanelContents(NULL),
	mPanelFace(NULL),
	mPanelLandInfo(NULL),

	mTabLand(NULL),
	mDirty(TRUE)
{
	setAutoFocus(FALSE);
	LLCallbackMap::map_t factory_map;
	factory_map["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions
	factory_map["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject
	factory_map["Features"] = LLCallbackMap(createPanelVolume, this);//LLPanelVolume
	factory_map["Texture"] = LLCallbackMap(createPanelFace, this);//LLPanelFace
	factory_map["Contents"] = LLCallbackMap(createPanelContents, this);//LLPanelContents
	factory_map["ContentsInventory"] = LLCallbackMap(createPanelContentsInventory, this);//LLPanelContents
	factory_map["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo

	LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",&factory_map,FALSE);

	mLargeHeight = getRect().getHeight();
	mSmallHeight = mLargeHeight;
	if (mTab) mSmallHeight -= mTab->getRect().getHeight();
	
	// force a toggle initially. seems to be needed to correctly initialize 
	// both "more" and "less" cases. it also seems to be important to begin
	// with the user's preference first so that it's initial position will
	// be correct (SL-51192) -MG
	BOOL show_more = gSavedSettings.getBOOL("ToolboxShowMore"); // get user's preference
	gSavedSettings.setBOOL("ToolboxShowMore", show_more); // sets up forced toggle below
	showMore( !show_more ); // does the toggle
	showMore(  show_more ); // reset the real user's preference
}