1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
MainTraceWin::MainTraceWin(QWidget *parent) : QMainWindow(parent)
{
QFontMetrics QFm(this->font());
setupUi(this);
FileWatch = new QFileSystemWatcher(this);
createActions();
createMenus();
readSettings();
originalPalette = QApplication::palette();
set_style();
set_font();
progressBarMemory.setStyle(new QPlastiqueStyle());
progressBarMemory.setFormat("Free memory: %p%");
setMaximumSize (539,773);
tabWidget->setCurrentIndex(0);
statusBar()->insertPermanentWidget(0,&progressBarMemory);
CurProject.setEnabled(false);
toolBar->insertWidget(NULL,&CurProject);
CurProject.setMinimumSize (300,20);
QLabel *statusMes=new QLabel(this);
if (CEA) {
statusMes->setText(" "+UserName()+" [CEA User] ");
}
else statusMes->setText(" "+UserName()+" ");
statusBar()->insertPermanentWidget(0,statusMes);
QLabel *statusMes2=new QLabel(this);
statusBar()->insertPermanentWidget(0,statusMes2);
statusMes2->setText("");
label_15->setText ( "La doc de"
//lien par un text HTML
"<a href='http://qt.developpez.com/doc/latest/qlabel.html'>");
//on autorise l'ouverture du lien vers le viewer par defaut
label_15->setOpenExternalLinks ( true );
label_15->show();
EmitXXp->setValidator(new QDoubleValidator(this));
EmitYYp->setValidator(new QDoubleValidator(this));
EmitZZp->setValidator(new QDoubleValidator(this));
EmitPW->setValidator(new QDoubleValidator(this));
Current->setValidator(new QDoubleValidator(this));
Energy->setValidator(new QDoubleValidator(this));
Duty_cycle->setValidator(new QDoubleValidator(this));
Freq->setValidator(new QDoubleValidator(this));
Nbr_particle->setValidator(new QIntValidator(this));
Max_memory_fieldmap->setValidator(new QIntValidator(this));
Step_calcul_env->setValidator(new QIntValidator(this));
process_state=Process_stop;
QMovie *movie=new QMovie(QString::fromUtf8(":/new/prefix1/Molecule.gif"));
if (movie->isValid()) {
label_3->setMovie(movie);
movie->start ();
}
c=new cal_trace2(curProject.toStdString().c_str(),false);
try {
QFile file(curProject);
if (file.exists()) {
c->opt.Read(curProject.toStdString().c_str());
c->ini_fichiers();
}
} catch(Exception &e) {
QMessageBox::information(this,"Warning",e.Message.c_str());
}
Set_options();
Get_options();
opt0=c->opt;
highlighter1 = new Highlighter(text_Data->document());
highlighter2 = new Highlighter(text_Result->document());
find = new Dialog_Find(this);
replace = new Dialog_Replace(this);
timer_mem=new QTimer(this);
timer_mem->setInterval(500);
timer_mem->start();
connect(timer_mem, SIGNAL(timeout()), SLOT(slot_timer_mem()));
QTimer::singleShot(1000,this,SLOT(test_version()));
} |
Partager