Minor improvement 1 : folio report widget, reports aren't sort if they aren't drop in same order of diagram

ex: first are drop in diagram 1, 2 in diag 5, 3 in diag 3 etc...

Minor iprovement 2 : Able to connect folio report in the same folio.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2764 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-01-22 20:10:06 +00:00
parent 83bb7fd67f
commit 1f8bd1e411

View File

@@ -46,10 +46,9 @@ void FolioReportProperties::buildRadioList() {
//Research the invert report of @element_
int rep = element_->linkType() == Element::NextReport? Element::PreviousReport : Element::NextReport;
ElementProvider ep(element_->diagram()->project(), element_->diagram());
ElementProvider ep(element_->diagram()->project());
QList <Element *> elmt_list = ep.freeElement(rep);
qSort(elmt_list);
qDebug() <<elmt_list;
foreach (Element *elmt, elmt_list) {
if (elmt != element_) {
//label for the button
@@ -61,7 +60,7 @@ void FolioReportProperties::buildRadioList() {
.arg(elmt->diagram() -> convertPosition(elmt -> scenePos()).toString());
//button himself
QHBoxLayout *hl = new QHBoxLayout(this);
QHBoxLayout *hl = new QHBoxLayout();
QRadioButton *rb = new QRadioButton(button_text , this);
QPushButton *pb = new QPushButton(QET::Icons::ZoomDraw,"",this);
hl->addWidget(rb);
@@ -69,8 +68,6 @@ void FolioReportProperties::buildRadioList() {
hl->addWidget(pb);
ui->available_report_layout->addLayout(hl);
element_list << elmt;
qSort(element_list);
qDebug() <<element_list;
//map the radio button signal
connect(rb, SIGNAL(clicked()), sm_, SLOT(map()));
sm_ -> setMapping(rb, element_list.size()-1);