コード例 #1
0
ファイル: pmanagement.cpp プロジェクト: rutku/dediq
void pManagement::projectContents()
{
    /*
     *Todo: Hazır şablonlar sınıfı oluşturulacak.
     *Bu method hazır şablon sınıfına devredilecek.
    */
    //Ana dosya oluşuturuluyor.
    QString path = getProjectPath()+QDir::separator()+getProjectName()+
                   QDir::separator()+getMainClass();
    QFile mclass(path+".d");
    if (!mclass.open(QIODevice::WriteOnly | QIODevice::Text))
        return;
    QTextStream out(&mclass);
    out << "import std.stdio;" << endl
            << "void main(){" << endl
            << " writefln(\"Merhaba\");" << endl
            << "}" << endl;
    mclass.close();

    QFile mindex(getProjectPath()+QDir::separator()+getProjectName()+QDir::separator()+"index.did");
    if (!mindex.open(QIODevice::WriteOnly | QIODevice::Text))
        return;
    QTextStream out2(&mindex);
    out2 << "RUNCLASS=" << getMainClass() <<".d\n";
    mindex.close();
    projectsHistory(getProjectPath()+QDir::separator()+getProjectName());
}
コード例 #2
0
ファイル: wndlistenjob.cpp プロジェクト: AlbertR/cgru170
bool WndListenJob::caseMessage( af::Msg * msg)
{
//printf("MonOutput::caseMessage:\n");msg.stdOutData();
   switch( msg->type())
   {
   case af::Msg::TTaskOutput:
   {
      af::MCTaskOutput mclass( msg);
//mclass.stdOut( true );
      if( mclass.getJobId() != jobid ) return false;
      qTextEdit->append( afqt::stoq( mclass.getRenderName()) + ": " + afqt::dtoq( mclass.getData(), mclass.getDataSize()));
      break;
   }
   default:
      return false;
   }
   return true;
}
コード例 #3
0
ファイル: wndlistenjob.cpp プロジェクト: AlbertR/cgru170
WndListenJob::WndListenJob( int JobId, const QString & Name):
   WndText( "Listen Job"),
   jobid( JobId),
   jobname( Name)
{
#if QT_VERSION >= 0x040300
   layout->setContentsMargins( 10, 10, 10, 10);
#endif
   setContentsMargins(1,1,1,1);

   qTextEdit->moveCursor( QTextCursor::End, QTextCursor::KeepAnchor);
   QTextCursor cursor = qTextEdit->textCursor();
   QTextBlockFormat blockFormat;
   blockFormat.setTopMargin(-5);
   blockFormat.setBottomMargin(-5);
   cursor.setBlockFormat( blockFormat);
   qTextEdit->setTextCursor( cursor);
   qTextEdit->setWordWrapMode( QTextOption::NoWrap);
   setWindowTitle( jobname);

   af::MCListenAddress mclass( af::MCListenAddress::TOLISTEN, Watch::getClientAddress(), jobid);
   Watch::sendMsg( new af::Msg( af::Msg::TTaskListenOutput, &mclass));
}
コード例 #4
0
ファイル: wndlistenjob.cpp プロジェクト: AlbertR/cgru170
void WndListenJob::closeEvent( QCloseEvent * event)
{
   af::MCListenAddress mclass( 0, Watch::getClientAddress(), jobid);
   Watch::sendMsg( new af::Msg( af::Msg::TTaskListenOutput, &mclass));
   Wnd::closeEvent( event);
}