void CommentsView::addNewUserComment( QModelIndex parentIndex, QString title, QString body ) { GluonPlayer::CommentsModel* model = static_cast<GluonPlayer::CommentsModel*>( m_model ); model->uploadComment( parentIndex, title, body ); connect( model, SIGNAL( addCommentFailed() ), SLOT( showComments() ) ); sender()->deleteLater(); }
void CommentsView::reloadComments() { hideComments(); removeComments(); loadComments(); showComments(); }
void CommentsView::reloadComments() { qDebug() << "Reloading"; hideComments(); removeComments(); loadComments(); showComments(); }
void CommentController:: setupGui() { Ui::MainWindow* ui = project_->mainWindow()->getItems(); // Connect enabled/disable actions, // 'enableCommentAdder' sets/unsets this as current tool when // the action is checked/unchecked. connect(ui->actionAddComment, SIGNAL(toggled(bool)), SLOT(enableCommentAdder(bool))); connect(this, SIGNAL(enabledChanged(bool)), ui->actionAddComment, SLOT(setChecked(bool))); connect(ui->actionShowComments, SIGNAL(toggled(bool)), SLOT(showComments(bool))); showComments(ui->actionShowComments->isChecked()); }
void ActivitiesWidget:: createConnections() { // activities connect(ui->activitiesTableWidget, SIGNAL(clicked(QModelIndex)), this, SLOT(showActivity(QModelIndex))); connect(ui->pageNavigatorWidget, SIGNAL(prevPageToggled()), this, SLOT(prevPage())); connect(ui->pageNavigatorWidget, SIGNAL(nextPageToggled()), this, SLOT(nextPage())); connect(ui->activitiesFindButton, SIGNAL(clicked()), this, SLOT(findActivities())); connect(ui->activitiesFindLineEdit, SIGNAL(returnPressed()), this, SLOT(findActivities())); // comments connect(ui->activitiesShowCommentsButton, SIGNAL(clicked()), this, SLOT(showComments())); // by activity connect( ui->showPeopleByActivityButton, SIGNAL(clicked()), this, SLOT(findPeopleByActivity())); }
void CommentsView::cancelNewComment() { sender()->deleteLater(); showComments(); }