Ejemplo n.º 1
0
void PostedItem::setup()
{
	/* Invoke the Qt Designer generated object setup routine */
	ui = new Ui::PostedItem;
	ui->setupUi(this);

	setAttribute(Qt::WA_DeleteOnClose, true);

	mInFill = false;

	/* clear ui */
	ui->titleLabel->setText(tr("Loading"));
	ui->dateLabel->clear();
	ui->fromLabel->clear();
	ui->siteLabel->clear();
	ui->newCommentLabel->hide();
	ui->commLabel->hide();

	/* general ones */
	connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(removeItem()));

	/* specific */
	connect(ui->readAndClearButton, SIGNAL(clicked()), this, SLOT(readAndClearItem()));

	connect(ui->commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
	connect(ui->voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
	connect(ui->voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));

	connect(ui->readButton, SIGNAL(toggled(bool)), this, SLOT(readToggled(bool)));

	ui->clearButton->hide();
	ui->readAndClearButton->hide();

	ui->frame_notes->hide();
}
Ejemplo n.º 2
0
void PostedItem::setup()
{
	setupUi(this);
	setAttribute(Qt::WA_DeleteOnClose, true);

	connect(commentButton, SIGNAL( clicked()), this, SLOT(loadComments()));
	connect(voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
	connect(voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));
}
Ejemplo n.º 3
0
/** Constructor */
PostedItem::PostedItem(PostedHolder *postHolder, const RsPostedPost &post)
:QWidget(NULL), mPostHolder(postHolder), mPost(post)
{
    setupUi(this);
    setAttribute ( Qt::WA_DeleteOnClose, true );

    setContent(mPost);

    connect( commentButton, SIGNAL( clicked() ), this, SLOT( loadComments() ) );
    connect( voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote()));
    connect( voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote()));

    return;
}