ChannelPane::ChannelPane(QWidget* parent) : QWidget(parent) { listView = new QListView(this); subscribeButton = new QPushButton(tr("Subscribe/unsubscribe"), this); tagsButton = new QPushButton(tr("Channel's tags"), this); connect(&OnLineInformation::getInstance(), SIGNAL(availableChannelsUpdated(QSharedPointer<Channels>)), this, SLOT(onChannelsUpdated())); connect(&OnLineInformation::getInstance(), SIGNAL(subscribedChannelsUpdated(QSharedPointer<Channels>)), this, SLOT(onChannelsUpdated())); connect(subscribeButton, SIGNAL(clicked()), this, SLOT(onSubscribeButtonClicked())); QVBoxLayout *layout = new QVBoxLayout(this); QHBoxLayout *buttonsLayout = new QHBoxLayout(); buttonsLayout->addWidget(subscribeButton); buttonsLayout->addWidget(tagsButton); layout->addWidget(listView); layout->addLayout(buttonsLayout); update(); }
void ShapesDialog::CreateSubscriber() { onSubscribeButtonClicked(); qDebug("Created Subscriber"); }