|
|
|
|
@ -193,21 +193,6 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
|
|
|
|
|
|
|
|
|
|
connect(gearBtn, &QPushButton::clicked, this, [this] { emit settingsRequested(); }); |
|
|
|
|
|
|
|
|
|
m_ownFilesButton = new QPushButton(footer); |
|
|
|
|
m_ownFilesButton->setObjectName("ownFilesButton"); |
|
|
|
|
m_ownFilesButton->setIcon(style()->standardIcon(QStyle::SP_DirOpenIcon)); |
|
|
|
|
m_ownFilesButton->setFixedSize(28, 28); |
|
|
|
|
m_ownFilesButton->setToolTip(QCoreApplication::translate("ChatGui", "My files in the selected group")); |
|
|
|
|
m_ownFilesButton->setAccessibleName(m_ownFilesButton->toolTip()); |
|
|
|
|
m_ownFilesButton->setStyleSheet( |
|
|
|
|
"QPushButton { border: none; background: transparent; }" |
|
|
|
|
"QPushButton:hover { background: rgba(51,144,236,20); border-radius: 14px; }"); |
|
|
|
|
m_ownFilesButton->setEnabled(false); |
|
|
|
|
fl->addWidget(m_ownFilesButton); |
|
|
|
|
connect(m_ownFilesButton, &QPushButton::clicked, this, [this] { |
|
|
|
|
emit ownFilesRequested(m_listView->currentIndex().data(ChannelChannelIdRole).toString()); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
auto *monitorBtn = new QPushButton(QString::fromUtf8("\xF0\x9F\x94\x8D"), footer); /* 🔍 */ |
|
|
|
|
monitorBtn->setFixedSize(28, 28); |
|
|
|
|
monitorBtn->setToolTip(QCoreApplication::translate("ChatGui", "Connection Monitor")); |
|
|
|
|
@ -253,7 +238,6 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent)
|
|
|
|
|
|
|
|
|
|
connect(m_listView->selectionModel(), &QItemSelectionModel::currentChanged, |
|
|
|
|
this, [this](const QModelIndex ¤t, const QModelIndex &) { |
|
|
|
|
m_ownFilesButton->setEnabled(current.data(ChannelChannelIdRole).toString().toULongLong() != 0); |
|
|
|
|
if (current.isValid()) { |
|
|
|
|
QString cid = current.data(ChannelChannelIdRole).toString(); |
|
|
|
|
emit channelSelected(cid); |
|
|
|
|
@ -430,7 +414,6 @@ void ChannelList::loadChannels() {
|
|
|
|
|
sel->select(idx, QItemSelectionModel::ClearAndSelect); |
|
|
|
|
sel->setCurrentIndex(idx, QItemSelectionModel::NoUpdate); |
|
|
|
|
} |
|
|
|
|
m_ownFilesButton->setEnabled(m_listView->currentIndex().data(ChannelChannelIdRole).toString().toULongLong() != 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ChannelList::selectChannel(const QString& channelId) { |
|
|
|
|
|