# HG changeset patch # User Michael Guravage # Date 2011-01-12 15:00:04 # Node ID 4d5a298af6e90f6c850e1a1dba1105aa4259035b # Parent 7c51085c079716045aee20fb707151b7e3273346 Rework Transporters dialog and About message. See ChangeLog for more details. user: Michael Guravage branch 'default' changed src/ChangeLog changed src/canvas.cpp changed src/transporterdialog.cpp changed src/wallitem.cpp diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2011-01-12 + + * transporterdialog.cpp (TransporterDialog): Add a proper title to + the dialog, and place the cell and wall pairs in a seperate labe. + +2011-01-10 + + * 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 * canvas.cpp (snapshot): Preface each image format extension with diff --git a/src/canvas.cpp b/src/canvas.cpp --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -1021,18 +1021,39 @@ void Main::about() { static QMessageBox* about = new QMessageBox ( "VirtualLeaf V1.0", - "

VirtualLeaf V1.0

" - "

" - "An Open Source framework for cell-based modeling of plant tissue growth and development
" - "(c) 2005-2008, Roeland Merks et al.
" - " VIB Department Plant Systems Biology, " - "Ghent, Belgium
" - "(c) 2008-2010, Roeland Merks et al.
" - " Centrum Wiskunde & Informatica and Netherlands Consortium for Systems Biology, Amsterdam, Netherlands
" -"
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.
" - "
If you use this code for your projects, please cite our paper:" -"
Merks, Guravage, Inze, and Beemster. An Open Source framework for cell-based modeling of plant tissue growth and development. Plant Physiology, submitted.
.
" - "
Please share your model plugins and extensions at http://virtualleaf.googlecode.com.", + "

VirtualLeaf V1.0

\ +

\ + An Open Source framework for cell-based modeling of plant\ + tissue growth and development.\ +

\ +

(c) 2005-2008, Roeland Merks et al.\ + VIB Department Plant Systems Biology,\ + Ghent, Belgium.\ +

\ +

(c) 2008-2010,\ + Roeland Merks et al.\ + Centrum Wiskunde & Informatica (CWI) and\ + Netherlands Consortium for Systems Biology (NCSB),\ + Amsterdam, the Netherlands.\ +

\ +

\ + 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.\ +

\ +

\ + If you use this code for your projects, please cite our paper in\ + Plant Physiology, ‘\ + Roeland M. H. Merks, Michael Guravage, Dirk Inze, and Gerrit T.S. Beemster,\ + \ + VirtualLeaf: an Open Source framework for cell-based modeling of plant tissue growth and development,
\ + Plant Physiology 2010: pp.110.167619v1-pp.110.167619.\ +

\ +

\ + Please share your model plugins and extensions at\ + http://virtualleaf.googlecode.com.\ +

", QMessageBox::Information, 1, 0, 0, this, 0, FALSE ); about->setButtonText( 1, "Dismiss" ); about->show(); diff --git a/src/transporterdialog.cpp b/src/transporterdialog.cpp --- a/src/transporterdialog.cpp +++ b/src/transporterdialog.cpp @@ -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 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() diff --git a/src/wallitem.cpp b/src/wallitem.cpp --- a/src/wallitem.cpp +++ b/src/wallitem.cpp @@ -128,6 +128,7 @@ void WallItem::OnClick(QMouseEvent *e) { setColor(); } else { TransporterDialog dialog(w, c, wn); + dialog.setWindowModality(Qt::WindowModal); dialog.exec(); }