示例#1
0
 OutputProxy()
 {
     // Users of this class can either be in the GUI thread or in other threads.
     // Use Qt::AutoConnection to always append in the GUI thread (directly or queued)
     VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
     connect(this, SIGNAL(append(QString)), outputWindow, SLOT(append(QString)));
     connect(this, SIGNAL(appendSilently(QString)), outputWindow, SLOT(appendSilently(QString)));
     connect(this, SIGNAL(appendError(QString)), outputWindow, SLOT(appendError(QString)));
     connect(this, SIGNAL(appendCommand(QString,QString,QStringList)),
             outputWindow, SLOT(appendCommand(QString,QString,QStringList)));
     connect(this, SIGNAL(appendMessage(QString)), outputWindow, SLOT(appendMessage(QString)));
 }
示例#2
0
status_t
IMAPMailbox::AppendMessage(BPositionIO& message, off_t size, int32 flags,
	time_t time)
{
	AppendCommand appendCommand(*this, message, size, flags, time);
	return ProcessCommand(&appendCommand);
}
示例#3
0
bool SetterCommand::mergeWith( const QUndoCommand* command )
{
   //SetterCommand* other = qobject_cast<SetterCommand*>(command);
   // NOTE: just gotta pray that you can do this cast?
   const SetterCommand* other = reinterpret_cast<const SetterCommand*>(command);
   if( other == 0 )
      return false;
   
   int i, size;
   size = other->size();
   for( i = 0; i < size; ++i )
   {
      appendCommand(
         other->tables[i],
         other->keys[i],
         other->col_names[i],
         other->values[i],
         other->props[i],
         other->objects[i],
         other->notify[i],
         other->oldValues[i]
      );
   }
   
   return true;
}
示例#4
0
/*------------------------------------------------------------------------------
|    OpenMAXILPlayerControl::pause
+-----------------------------------------------------------------------------*/
void OpenMAXILPlayerControl::pause()
{
   log_debug_func;

   PlayerCommandPause* pause = new PlayerCommandPause;
   pause->m_playerCommandType = PLAYER_COMMAND_TYPE_PAUSE;
   appendCommand(pause);
}
示例#5
0
VCSJobRunner::VCSJobRunner() : d(new VCSJobRunnerPrivate)
{
    VCSBase::VCSBaseOutputWindow *ow = VCSBase::VCSBaseOutputWindow::instance();
    connect(this, SIGNAL(error(QString)),
            ow, SLOT(appendError(QString)), Qt::QueuedConnection);
    connect(this, SIGNAL(commandStarted(QString)),
            ow, SLOT(appendCommand(QString)), Qt::QueuedConnection);
}
/*------------------------------------------------------------------------------
|    OpenMAXILPlayerControl::pause
+-----------------------------------------------------------------------------*/
void OpenMAXILPlayerControl::pause()
{
   LOG_DEBUG(LOG_TAG, "%s", Q_FUNC_INFO);

   PlayerCommandPause* pause = new PlayerCommandPause;
   pause->m_playerCommandType = PLAYER_COMMAND_TYPE_PAUSE;
   appendCommand(pause);
}
示例#7
0
/*------------------------------------------------------------------------------
|    OpenMAXILPlayerControl::play
+-----------------------------------------------------------------------------*/
void OpenMAXILPlayerControl::play()
{
   log_debug_func;

   LOG_VERBOSE(LOG_TAG, "Deferring play() command...");
   PlayerCommandPlay* play = new PlayerCommandPlay;
   play->m_playerCommandType = PLAYER_COMMAND_TYPE_PLAY;
   appendCommand(play);
}
/*------------------------------------------------------------------------------
|    OpenMAXILPlayerControl::play
+-----------------------------------------------------------------------------*/
void OpenMAXILPlayerControl::play()
{
   LOG_DEBUG(LOG_TAG, "%s", Q_FUNC_INFO);

   LOG_VERBOSE(LOG_TAG, "Deferring play() command...");
   PlayerCommandPlay* play = new PlayerCommandPlay;
   play->m_playerCommandType = PLAYER_COMMAND_TYPE_PLAY;
   appendCommand(play);
}
示例#9
0
/*------------------------------------------------------------------------------
|    OpenMAXILPlayerControl::setMedia
+-----------------------------------------------------------------------------*/
void OpenMAXILPlayerControl::setMedia(const QMediaContent& content, QIODevice* stream)
{
   Q_UNUSED(stream);

   log_debug_func;
   log_debug("Media: %s.", qPrintable(content.canonicalUrl().toString()));
   log_debug("setMedia thread is: 0x%x.", ((unsigned int)QThread::currentThread()));

   log_verbose("Deferring setMedia()...");
   /*QUrl url = content.canonicalUrl();
   if (url.isLocalFile() && !QFile(url.path()).exists()) {
      log_warn("Does not exist!");
      return;
   }*/

   PlayerCommandSetMedia* setMedia = new PlayerCommandSetMedia;
   setMedia->m_playerCommandType = PLAYER_COMMAND_TYPE_SET_MEDIA;
   setMedia->m_mediaContent = content;
   appendCommand(setMedia);
}
/*------------------------------------------------------------------------------
|    OpenMAXILPlayerControl::setMedia
+-----------------------------------------------------------------------------*/
void OpenMAXILPlayerControl::setMedia(const QMediaContent& content, QIODevice* stream)
{
   Q_UNUSED(stream);

   LOG_DEBUG(LOG_TAG, "%s", Q_FUNC_INFO);
   LOG_DEBUG(LOG_TAG, "Media: %s.", qPrintable(content.canonicalUrl().path()));
   LOG_DEBUG(LOG_TAG, "setMedia thread is: 0x%x.", ((unsigned int)QThread::currentThread()));

   LOG_VERBOSE(LOG_TAG, "Deferring setMedia()...");
   LOG_VERBOSE(LOG_TAG, "SKIPPED LOCAL PATH CHECKING!");
   //QUrl url = content.canonicalUrl();
   //if (url.isLocalFile() && !QFile(url.path()).exists()) {
   //   LOG_DEBUG(LOG_TAG, "Does not exist!");
   //   return;
   //}

   PlayerCommandSetMedia* setMedia = new PlayerCommandSetMedia;
   setMedia->m_playerCommandType = PLAYER_COMMAND_TYPE_SET_MEDIA;
   setMedia->m_mediaContent = content;
   appendCommand(setMedia);
}
示例#11
0
void CommandsItem::appendCommand( const QString& com )
{
    Command c(com);
    c.setExpectedExitCode(0);
    appendCommand( c );
}
示例#12
0
SetterCommand::SetterCommand( Brewtarget::DBTable table, int key, const char* col_name, QVariant value, QMetaProperty prop, BeerXMLElement* object, bool notify)
   : QUndoCommand(QString("Change %1 to %2").arg(col_name).arg(value.toString()))
{
   appendCommand( table, key, QString(col_name), value, prop, object, notify );
}
示例#13
0
void EditPanel::appendCommands(std::vector<CatheterChannelCmd> cmds) {
    for (int i = 0; i < cmds.size(); i++)
        appendCommand(cmds[i]);
}
void VcsOutputWindow::appendCommand(const QString &workingDirectory,
                                        const Utils::FileName &binary,
                                        const QStringList &args)
{
    appendCommand(msgExecutionLogEntry(workingDirectory, binary, args));
}