Esempio n. 1
0
// Called by the proxy when it is time to kick off an animation job
void QQuickAnimatorController::start(const QSharedPointer<QAbstractAnimationJob> &job)
{
    m_rootsPendingStart.insert(job);
    m_rootsPendingStop.remove(job);
    job->addAnimationChangeListener(this, QAbstractAnimationJob::Completion);
    start_helper(job.data());
    requestSync();
}
Esempio n. 2
0
	void CDeploymentConfigurationSynchroniserSkel::requestSync_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		requestSync(sender);
	}
Esempio n. 3
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void Envelope::emitResult(const Processor *proc,
                          double acc, double vel, double disp,
                          const Core::Time &timestamp, bool clipped) {
	_creationInfo.setCreationTime(Core::Time::GMT());

	// Objects with empty publicID are created since they are currently
	// not sent as notifiers and stored in the database
	VS::EnvelopePtr envelope = new VS::Envelope("");
	envelope->setCreationInfo(_creationInfo);
	envelope->setNetwork(proc->waveformID().networkCode());
	envelope->setStation(proc->waveformID().stationCode());
	envelope->setTimestamp(timestamp);

	VS::EnvelopeChannelPtr cha = new VS::EnvelopeChannel("");
	cha->setName(proc->name());
	cha->setWaveformID(proc->waveformID());

	VS::EnvelopeValuePtr val;

	// Add acceleration value
	val = new VS::EnvelopeValue;
	val->setValue(acc);
	val->setType("acc");
	if ( clipped ) val->setQuality(VS::EnvelopeValueQuality(VS::clipped));
	cha->add(val.get());

	// Add velocity value
	val = new VS::EnvelopeValue;
	val->setValue(vel);
	val->setType("vel");
	if ( clipped ) val->setQuality(VS::EnvelopeValueQuality(VS::clipped));
	cha->add(val.get());

	// Add displacement value
	val = new VS::EnvelopeValue;
	val->setValue(disp);
	val->setType("disp");
	if ( clipped ) val->setQuality(VS::EnvelopeValueQuality(VS::clipped));
	cha->add(val.get());

	envelope->add(cha.get());

	Core::DataMessagePtr msg = new Core::DataMessage;
	msg->attach(envelope.get());

	/* -- DEBUG --
	Core::DataMessage *tmp = &msg;
	IO::XMLArchive ar;
	ar.create("-");
	ar.setFormattedOutput(true);
	ar << tmp;
	ar.close();
	*/

	if ( connection() ) {
		connection()->send(msg.get());
		++_sentMessages;
		++_sentMessagesTotal;

#ifndef SC3_SYNC_VERSION
		if ( _config.maxMessageCountPerSecond > 0 ) {
			bool first = true;
			while ( !isExitRequested() && _sentMessages > _config.maxMessageCountPerSecond ) {
				if ( first )
					SEISCOMP_WARNING("Throttling message output, more than %d allowed messages sent per second",
					                 _config.maxMessageCountPerSecond);
				first = false;
				Core::msleep(100);
			}
		}
#else
		// Request a sync token every 100 messages
		if ( _sentMessages > 100 ) {
			_sentMessages = 0;
			// Tell the record acquisition to request synchronization and to
			// stop sending records until the sync is completed.
			requestSync();
		}
#endif
	}
}
Esempio n. 4
0
MainWindow::MainWindow(ContactRoster *roster, bool showWhatsNew, QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // Configure the main listView

    model = new ContactSelectionModel(ui->listView);
    model->setSortRole(Qt::UserRole + 2);
    ui->listView->setModel(model);
    ui->listView->installEventFilter(this);

    ChatDisplayDelegate *delegate = new ChatDisplayDelegate(ui->listView);

    ui->listView->setItemDelegate(delegate);

    connect(ui->createChatButton,SIGNAL(pressed()),this,SLOT(createChatWindow()));
    connect(ui->actionSettings,SIGNAL(triggered()),this,SLOT(showGlobalSettingsDialog()));
    connect(ui->actionStatus,SIGNAL(triggered()),this,SLOT(showStatusWindow()));
    connect(ui->actionQuit,SIGNAL(triggered()),this,SLOT(quit()));
    connect(ui->actionAbout,SIGNAL(triggered()),this,SLOT(showAboutDialog()));
    connect(ui->actionDonate,SIGNAL(triggered()),this,SLOT(showDonate()));
    connect(ui->actionSync,SIGNAL(triggered()),this,SLOT(requestSync()));
    connect(ui->actionProfile,SIGNAL(triggered()),
            this,SLOT(showProfileWindow()));
    connect(ui->actionAccountInfo,SIGNAL(triggered()),
            this,SLOT(showAccountInfoWindow()));
    connect(ui->actionNetworkUsage,SIGNAL(triggered()),
            this,SLOT(showNetworkUsageWindow()));
    connect(ui->actionCreateGroup,SIGNAL(triggered()),
            this,SLOT(showCreateGroupWindow()));
    connect(ui->actionBlockedContacts,SIGNAL(triggered()),
            this,SLOT(showBlockedContactsWindow()));

    connect(ui->listView,SIGNAL(clicked(QModelIndex)),
            this,SLOT(contactSelected(QModelIndex)));

    connect(this,SIGNAL(sendRightButtonClicked(QPoint)),
            this,SLOT(contextMenu(QPoint)));

    this->roster = roster;

    setAttribute(Qt::WA_Maemo5StackedWindow);
    setAttribute(Qt::WA_DeleteOnClose,false);
    setAttribute(Qt::WA_QuitOnClose,false);

    isScreenLocked = false;

    notifyObject = new NotifyObject(this);
    connect(this,SIGNAL(sendNotification(QString,FMessage)),
            notifyObject,SLOT(sendNotify(QString,FMessage)));

    newDayTimer = new QTimer(this);
    connect(newDayTimer,SIGNAL(timeout()),this,SLOT(updateTimestamps()));
    resetNewDayTimer();

    loadOpenChats();

    // WhatsNew Window

    if (showWhatsNew)
    {
        WhatsNewWindow *window = new WhatsNewWindow(this);

        window->setAttribute(Qt::WA_Maemo5StackedWindow);
        window->setAttribute(Qt::WA_DeleteOnClose);
        window->setWindowFlags(window->windowFlags() | Qt::Window);
        window->show();
    }

}