Beispiel #1
0
void ModemOma::setSessionState(int state)
{
    int previousState = m_sessionState;
    m_sessionState = state;

    if (m_enabledNotifications) {
        Q_EMIT SessionStateChanged(previousState, m_sessionState, MM_OMA_SESSION_STATE_UNKNOWN);
    }
}
Beispiel #2
0
    VideoSessionWidget::VideoSessionWidget(QWidget *parent, Communication::VoiceSessionInterface *video_session, QString &my_name, QString &his_name)
        : QWidget(parent),
          video_session_(video_session),
          my_name_(my_name),
          his_name_(his_name),
          internal_widget_(0),
          internal_v_layout_(0),
          internal_h_layout_(0),
          internal_v_layout_local_(0),
          internal_v_layout_remote_(0),
          local_video_(0),
          remote_video_(0),
          controls_local_widget_(new QWidget(this)),
          controls_remote_widget_(new QWidget(this)),
          main_view_visible_(false)

    {
        // Init all ui elements
        video_session_ui_.setupUi(this);

        controls_local_ui_.setupUi(controls_local_widget_);
        controls_local_ui_.videoCheckBox->setStyleSheet(QString("color:red"));
        controls_local_ui_.horizontalLayout->insertSpacerItem(2, new QSpacerItem(1,1, QSizePolicy::Expanding, QSizePolicy::Fixed));
        controls_local_widget_->hide();  

        controls_remote_ui_.setupUi(controls_remote_widget_);
        controls_remote_ui_.videoCheckBox->setStyleSheet(QString("color:red"));
        controls_remote_ui_.horizontalLayout->insertSpacerItem(0, new QSpacerItem(1,1, QSizePolicy::Expanding, QSizePolicy::Fixed));
        controls_remote_ui_.audioCheckBox->setEnabled(false);
        controls_remote_ui_.videoCheckBox->setEnabled(false);
        controls_remote_widget_->hide();
        
        // Update widget states
        SessionStateChanged(video_session_->GetState());
        AudioStreamStateChanged(video_session_->GetAudioStreamState());
        VideoStreamStateChanged(video_session_->GetVideoStreamState());
        UpdateLocalVideoControls(video_session_->IsSendingVideoData());
        UpdateLocalAudioControls(video_session_->IsSendingAudioData());
        UpdateRemoteVideoControls(video_session_->IsReceivingVideoData());
        UpdateRemoteAudioControls(video_session_->IsReceivingAudioData());

        // CLOSE TAB
        connect(video_session_ui_.closePushButton, SIGNAL( clicked() ),
                this, SLOT( CloseSession() ));
        // CONNECTION AND STREAM STATES
        connect(video_session_, SIGNAL( StateChanged(Communication::VoiceSessionInterface::State) ),
                this, SLOT( SessionStateChanged(Communication::VoiceSessionInterface::State) ));
        connect(video_session_, SIGNAL( AudioStreamStateChanged(Communication::VoiceSessionInterface::StreamState) ),
                this, SLOT( AudioStreamStateChanged(Communication::VoiceSessionInterface::StreamState) ));
        connect(video_session_, SIGNAL( VideoStreamStateChanged(Communication::VoiceSessionInterface::StreamState) ),
                this, SLOT( VideoStreamStateChanged(Communication::VoiceSessionInterface::StreamState) ));
        // AUDIO / VIDEO STATES
        connect(video_session_, SIGNAL( SendingVideoData(bool) ),
                this, SLOT( UpdateLocalVideoControls(bool) ));
        connect(video_session_, SIGNAL( SendingAudioData(bool) ),
                this, SLOT( UpdateLocalAudioControls(bool) ));
        connect(video_session_, SIGNAL( ReceivingVideoData(bool) ),
                this, SLOT( UpdateRemoteVideoControls(bool) ));
        connect(video_session_, SIGNAL( ReceivingAudioData(bool) ),
                this, SLOT( UpdateRemoteAudioControls(bool) ));
    }