Added for Channel Message composer a Image Attach button

Added for Channel Message composer a Image Attach button
Added a Combobox for Sort in Posted links easyer with new icons
Messengerwindow changed the button icons & display on status the status icon too.
This commit is contained in:
defnax 2019-01-12 15:46:47 +01:00
parent 2fc0c643ef
commit 6750e6140f
17 changed files with 503 additions and 176 deletions

View file

@ -41,23 +41,19 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
ui->setupUi(this);
/* Setup UI helper */
mStateHelper->addWidget(mTokenTypeAllPosts, ui->hotSortButton);
mStateHelper->addWidget(mTokenTypeAllPosts, ui->newSortButton);
mStateHelper->addWidget(mTokenTypeAllPosts, ui->topSortButton);
mStateHelper->addWidget(mTokenTypeAllPosts, ui->comboBox);
mStateHelper->addWidget(mTokenTypePosts, ui->hotSortButton);
mStateHelper->addWidget(mTokenTypePosts, ui->newSortButton);
mStateHelper->addWidget(mTokenTypePosts, ui->topSortButton);
mStateHelper->addWidget(mTokenTypePosts, ui->comboBox);
mStateHelper->addWidget(mTokenTypeGroupData, ui->submitPostButton);
mStateHelper->addWidget(mTokenTypeGroupData, ui->subscribeToolButton);
connect(ui->hotSortButton, SIGNAL(clicked()), this, SLOT(getRankings()));
connect(ui->newSortButton, SIGNAL(clicked()), this, SLOT(getRankings()));
connect(ui->topSortButton, SIGNAL(clicked()), this, SLOT(getRankings()));
connect(ui->nextButton, SIGNAL(clicked()), this, SLOT(showNext()));
connect(ui->prevButton, SIGNAL(clicked()), this, SLOT(showPrev()));
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
connect(ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(getRankings(int)));
// default sort method.
mSortMethod = RsPosted::HotRankType;
@ -67,8 +63,6 @@ PostedListWidget::PostedListWidget(const RsGxsGroupId &postedId, QWidget *parent
mTokenTypeVote = nextTokenType();
ui->hotSortButton->setChecked(true);
/* fill in the available OwnIds for signing */
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
@ -183,7 +177,7 @@ void PostedListWidget::updateShowText()
ui->showLabel->setText(showText);
}
void PostedListWidget::getRankings()
void PostedListWidget::getRankings(int i)
{
if (groupId().isNull())
return;
@ -192,23 +186,19 @@ void PostedListWidget::getRankings()
std::cerr << std::endl;
int oldSortMethod = mSortMethod;
QObject* button = sender();
if(button == ui->hotSortButton)
switch(i)
{
default:
case 0:
mSortMethod = RsPosted::HotRankType;
}
else if(button == ui->topSortButton)
{
mSortMethod = RsPosted::TopRankType;
}
else if(button == ui->newSortButton)
{
break;
case 1:
mSortMethod = RsPosted::NewRankType;
}
else
{
return;
break;
case 2:
mSortMethod = RsPosted::TopRankType;
break;
}
if (oldSortMethod != mSortMethod)