コード例 #1
0
AaServerWindowApp::AaServerWindowApp(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::AaServerWindowApp)
{
    localSize = 2048;
    totalBytesRecevice = 0;
    bytesRecevice = 0;
    bytesToWriteSend = 0;
    bytesWrittenSend = 0;
    fileNameSize = 0;
    ui->setupUi(this);
    ui->m_txtOutput->setReadOnly(true);
    setFocusPolicy(Qt::ClickFocus);
    ui->menuBar->hide();

    ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Send"));
    ui->buttonBox->button(QDialogButtonBox::Ok)->setShortcut(Qt::ALT+Qt::Key_S);

    ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Close"));
    setWindowTitle(tr("Server"));
    init();

    //connect
    connect(m_pServerServer,SIGNAL(newConnection()),this,SLOT(acceptConnection()));
    connect(ui->buttonBox,SIGNAL(clicked(QAbstractButton*)),this,SLOT(slotBtnClicked(QAbstractButton*)));
    connect(ui->actionSend_File,SIGNAL(triggered()),this,SLOT(slotSendFile()));
    connect(m_pServerSocket,SIGNAL(bytesWritten(qint64)),this,SLOT(slotContinueSendFile(qint64)));
}
コード例 #2
0
CServiceSendFtpGprs::CServiceSendFtpGprs()
{
    m_start = false;
    m_thread = new CServiceSendFtpGprsThread;


    m_timer.setSingleShot(false);
    connect (&m_timer , SIGNAL (timeout()) , this , SLOT(slotSendFile()) );

    createWidget ();
}
コード例 #3
0
int CServiceSendFtpGprs::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = CServiceAbstractObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: signalSendData(); break;
        case 1: slotUpdate(); break;
        case 2: slotSendFile(); break;
        case 3: slotStateChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 4;
    }
    return _id;
}
コード例 #4
0
YahooChatSession::YahooChatSession( Kopete::Protocol *protocol, const Kopete::Contact *user,
	Kopete::ContactPtrList others, const char *name )
: Kopete::ChatSession( user, others, protocol,  name )
{
	kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl;
	Kopete::ChatSessionManager::self()->registerChatSession( this );
	setInstance(protocol->instance());

	// Add Actions
	new KAction( i18n( "Buzz Contact" ), QIconSet(BarIcon("bell")), "Ctrl+G", this, SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ;
	new KAction( i18n( "Show User Info" ), QIconSet(BarIcon("idea")), 0, this, SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ;
	new KAction( i18n( "Request Webcam" ), QIconSet(BarIcon("webcamreceive")), 0, this, SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ;
	new KAction( i18n( "Invite to view your Webcam" ), QIconSet(BarIcon("webcamsend")), 0, this, SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ;
	new KAction( i18n( "Send File" ), QIconSet(BarIcon("attach")), 0, this, SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" );

	YahooContact *c = static_cast<YahooContact*>( others.first() );
	connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) );
	m_image = new QLabel( 0L, "kde toolbar widget" );
	new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" );
	if(c->hasProperty(Kopete::Global::Properties::self()->photo().key())  )
	{
		connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) );
	}
コード例 #5
0
ファイル: FrmUserList.cpp プロジェクト: s18leoare/rabbitim
int CFrmUserList::InitMenu()
{
    bool check = true;
    m_Menu.setTitle(tr("Operator roster(&O)"));
    m_Menu.setIcon(QIcon(":/icon/Operate"));

    check = connect(&m_Menu, SIGNAL(aboutToShow()),
                    SLOT(slotUpdateMenu()));
    Q_ASSERT(check);

    //菜单设置  
    m_pMenuAction = NULL;
    m_Menu.addAction(ui->actionSendMessage);
    check = connect(ui->actionSendMessage, SIGNAL(triggered()),
                    SLOT(slotSendMessage()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionSendFile);
    check = connect(ui->actionSendFile, SIGNAL(triggered()),
                    SLOT(slotSendFile()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionVideo);
    check = connect(ui->actionVideo, SIGNAL(triggered()),
                    SLOT(slotCallVideo()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionAudio);
    check = connect(ui->actionAudio, SIGNAL(triggered()),
                    SLOT(slotCallAudio()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionAllowMonitor);
    ui->actionAllowMonitor->setCheckable(true);
    check = connect(ui->actionAllowMonitor, SIGNAL(triggered()),
                    SLOT(slotMonitor()));
    Q_ASSERT(check);
    //TODO:1.新增菜单,总共三步  
    
    m_Menu.addSeparator();

    m_Menu.addAction(ui->actionAddRoster_A);
    check = connect(ui->actionAddRoster_A, SIGNAL(triggered()),
                    SLOT(slotAddRoster()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionRename);
    check = connect(ui->actionRename, SIGNAL(triggered()),
                     SLOT(slotRenameRoster()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionMove_roster);
    check = connect(ui->actionMove_roster, SIGNAL(triggered()),
                    SLOT(slotMoveRoster()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionRemoveRoster_R);
    check = connect(ui->actionRemoveRoster_R, SIGNAL(triggered()),
                    SLOT(slotRemoveRoster()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionAgreeAddRoster);
    check = connect(ui->actionAgreeAddRoster, SIGNAL(triggered()),
                    SLOT(slotAgreeAddRoster()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionInformation_I);
    check = connect(ui->actionInformation_I, SIGNAL(triggered()),
                    SLOT(slotInformationRoster()));
    Q_ASSERT(check);

    m_Menu.addAction(ui->actionRemove_Group);
    check = connect(ui->actionRemove_Group, SIGNAL(triggered()),
                    SLOT(slotRemoveGroup()));
    Q_ASSERT(check);

    return 0;
}