コード例 #1
0
ファイル: commentsview.cpp プロジェクト: pranavrc/gluon
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();
}
コード例 #2
0
ファイル: commentsview.cpp プロジェクト: cgaebel/gluon
void CommentsView::reloadComments()
{
    hideComments();
    removeComments();
    loadComments();
    showComments();
}
コード例 #3
0
ファイル: commentsview.cpp プロジェクト: pranavrc/gluon
void CommentsView::reloadComments()
{
    qDebug() << "Reloading";
    hideComments();
    removeComments();
    loadComments();
    showComments();
}
コード例 #4
0
ファイル: commentcontroller.cpp プロジェクト: aveminus/freq
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());
}
コード例 #5
0
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()));
}
コード例 #6
0
ファイル: commentsview.cpp プロジェクト: pranavrc/gluon
void CommentsView::cancelNewComment()
{
    sender()->deleteLater();
    showComments();
}