Changeset - 4d5a298af6e9
[Not reviewed]
default
0 4 0
Michael Guravage - 14 years ago 2011-01-12 15:00:04
michael.guravage@cwi.nl
Rework Transporters dialog and About message. See ChangeLog for more details.

user: Michael Guravage <michael.guravage@cwi.nl>
branch 'default'
changed src/ChangeLog
changed src/canvas.cpp
changed src/transporterdialog.cpp
changed src/wallitem.cpp
4 files changed with 64 insertions and 18 deletions:
0 comments (0 inline, 0 general)
src/ChangeLog
Show inline comments
 
2011-01-12    <guravage@petitdru.sen.cwi.nl>
 

	
 
	* transporterdialog.cpp (TransporterDialog): Add a proper title to
 
	the dialog, and place the cell and wall pairs in a seperate labe.
 

	
 
2011-01-10    <guravage@petitdru.sen.cwi.nl>
 

	
 
	* transporterdialog.cpp (TransporterDialog): Start numbering Transporter fields at zero.
 
	Resolves issue #1: http://code.google.com/p/virtualleaf/issues/detail?id=1.
 

	
 
	* wallitem.cpp (OnClick): Change dialog modality to Qt::WindowModal.
 
	Resolves issue #2: http://code.google.com/p/virtualleaf/issues/detail?id=2.
 

	
 
	* canvas.cpp (about): Add link to Plant Physiology paper.
 
	Resolves issue #3: http://code.google.com/p/virtualleaf/issues/detail?id=3.
 

	
 
2010-11-30    <guravage@petitdru.sen.cwi.nl>
 

	
 
	* canvas.cpp (snapshot): Preface each image format extension with
src/canvas.cpp
Show inline comments
 
@@ -1021,18 +1021,39 @@ void Main::about()
 
{
 
  static QMessageBox* about = new QMessageBox
 
    ( "VirtualLeaf V1.0",
 
      "<h3>VirtualLeaf V1.0</h3>"
 
      "<p>"
 
      "An Open Source framework for cell-based modeling of plant tissue growth and development <br>"
 
      "(c) 2005-2008, Roeland Merks <i>et al.</i><br>"
 
      "    <a href=\"http://www.psb.vib-ugent.be\">VIB Department Plant Systems Biology</a>, "
 
      "Ghent, Belgium <br>"
 
      "(c) 2008-2010, <a href=\"http://www.cwi.nl/~merks\">Roeland Merks <i>et al.</i></a> <br>"
 
      "    <a href=\"http://www.cwi.nl\">Centrum Wiskunde & Informatica</a> and <a href=\"http://www.ncsb.nl\">Netherlands Consortium for Systems Biology</a>, Amsterdam, Netherlands <br>"
 
"<br>VirtualLeaf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br>"
 
      "<br>If you use this code for your projects, please cite our paper:"
 
"<br>Merks, Guravage, Inze, and Beemster. An Open Source framework for cell-based modeling of plant tissue growth and development. <i>Plant Physiology,</i> submitted.<br> . <br>"
 
      "<br>Please share your model plugins and extensions at <a href=\"http://virtualleaf.googlecode.com\">http://virtualleaf.googlecode.com</a>.", 
 
      "<h3>VirtualLeaf V1.0</h3>\
 
       <p>\
 
         An Open Source framework for cell-based modeling of plant\
 
         tissue growth and development.\
 
       </p>\
 
       <p>(c) 2005-2008, Roeland Merks <i>et al.</i>\
 
         <a href=\"http://www.psb.vib-ugent.be\">VIB Department Plant Systems Biology</a>,\
 
         Ghent, Belgium.\
 
       </p>\
 
       <p>(c) 2008-2010,\
 
         <a href=\"http://www.cwi.nl/~merks\">Roeland Merks <i>et al.</i></a>\
 
         <a href=\"http://www.cwi.nl\">Centrum Wiskunde & Informatica (CWI)</a> and\
 
         <a href=\"http://www.ncsb.nl\"> Netherlands Consortium for Systems Biology (NCSB)</a>,\
 
         Amsterdam, the Netherlands.\
 
       </p>\
 
       <p>\
 
         VirtualLeaf is free software: you can redistribute it and/or\
 
         modify it under the terms of the GNU General Public License as\
 
         published by the Free Software Foundation, either version 3 of the\
 
         License, or (at your option) any later version.\
 
       </p>\
 
       <p>\
 
         If you use this code for your projects, please cite our paper in\
 
         <a href=\"http://www.plantphysiol.org\">Plant Physiology</a>, &lsquo;\
 
         Roeland M. H. Merks, Michael Guravage, Dirk Inze, and Gerrit T.S. Beemster,\
 
         <a href=\"http://www.plantphysiol.org/cgi/content/short/pp.110.167619?keytype=ref&ijkey=YTmfxrHG5QCsa8k\">\
 
         VirtualLeaf: an Open Source framework for cell-based modeling of plant tissue growth and development</a>,<br>\
 
         Plant Physiology 2010: pp.110.167619v1-pp.110.167619.\
 
       </p>\
 
       <p>\
 
         Please share your model plugins and extensions at\
 
         <a href=\"http://virtualleaf.googlecode.com\">http://virtualleaf.googlecode.com</a>.\
 
       </p>",
 
      QMessageBox::Information, 1, 0, 0, this, 0, FALSE );
 
  about->setButtonText( 1, "Dismiss" );
 
  about->show();
src/transporterdialog.cpp
Show inline comments
 
@@ -34,15 +34,22 @@ TransporterDialog::TransporterDialog(Wal
 
  QPushButton *ok = new QPushButton(tr("Ok"));
 
  QPushButton *cancel = new QPushButton(tr("Cancel"));
 
  QGridLayout *t_grid = new QGridLayout; // transporter grid
 
  QGridLayout *c_grid = new QGridLayout; // context grid
 

	
 
  // connect the slots
 
  connect(ok, SIGNAL(clicked()), this, SLOT(setTransporterValues()));
 
  connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
 

	
 
  // compose a label for the dialog box
 
  std::stringstream label_text; 
 
  label_text << "C("<< wall->C1()->Index() << "," << wall->C2()->Index() << "), N(" 
 
	     << wall->N1()->Index() << "," << wall->N2()->Index() << ")";
 
  // compose a label describing the cells and nodes associated with this wall
 
  std::stringstream desc; 
 
  desc << "between cells "<< wall->C1()->Index() << " and " << wall->C2()->Index() << ", and" << endl <<
 
          "connecting nodes " << wall->N1()->Index() << " and " << wall->N2()->Index();
 

	
 
  // description label
 
  label = new QLabel;
 
  label->setFrameStyle(frameStyle);
 
  label->setText(tr(desc.str().c_str()));
 
  c_grid->addWidget(label, 0, 0);
 

	
 
  // retrieve the current transporters
 
  QVector <double> transporters;  // transporter vector
 
@@ -57,7 +64,7 @@ TransporterDialog::TransporterDialog(Wal
 
    // label
 
    label = new QLabel;
 
    label->setFrameStyle(frameStyle);
 
    label->setText(QString("%1").arg(i+1)); // cardinal numbering
 
    label->setText(QString("%1").arg(i)); // cardinal numbering, i.e. starts at zero.
 

	
 
    // line editor
 
    QLineEdit *editor = new QLineEdit();
 
@@ -80,11 +87,12 @@ TransporterDialog::TransporterDialog(Wal
 

	
 
  // add both transporter and button grids to the box layout widget
 
  QVBoxLayout *layout = new QVBoxLayout;
 
  layout->addLayout(c_grid);
 
  layout->addLayout(t_grid);
 
  layout->addLayout(b_grid);
 
  setLayout(layout);
 

	
 
  setWindowTitle(tr(label_text.str().c_str()));
 
  setWindowTitle(QString("Edit Transporters"));
 
}
 

	
 
void TransporterDialog::setTransporterValues()
src/wallitem.cpp
Show inline comments
 
@@ -128,6 +128,7 @@ void WallItem::OnClick(QMouseEvent *e) {
 
	setColor();
 
      } else {
 
	TransporterDialog dialog(w, c, wn);
 
	dialog.setWindowModality(Qt::WindowModal);
 
	dialog.exec();
 
      }
 

	
0 comments (0 inline, 0 general)