Ejemplo n.º 1
0
void WizardPageController::applyLayout() {
    wc->clearControllers();
    qDeleteAll(controllers);
    controllers.clear();
    QLayout *old = wPage->layout();
    removeLayout(old);

    U2OpStatusImpl os;
    page->validate(wc->getCurrentActors(), os);
    if (os.hasError()) {
        coreLog.error(os.getError());
        setError(wPage);
        return;
    }

    PageContentCreator pcc(wc);
    page->getContent()->accept(&pcc);
    if (wc->isBroken()) {
        setError(wPage);
        return;
    }
    pcc.setPageTitle(page->getTitle());
    wPage->setLayout(pcc.getResult());
    controllers << pcc.getControllers();

    wPage->setFinalPage(page->isFinal());
}
Ejemplo n.º 2
0
void QgsLayoutManager::clear()
{
  const QList< QgsMasterLayoutInterface * > layouts = mLayouts;
  for ( QgsMasterLayoutInterface *l : layouts )
  {
    removeLayout( l );
  }
}
Ejemplo n.º 3
0
 // -------------------------------------------------------------
 TRasterMapsMembers::TDeleteCoordinatesButton::TDeleteCoordinatesButton(
    TRasterMapsDialog* Dialog_, TMapAnchor Anchor_, QHBoxLayout* Layout_, QWidget* Parent_) 
    : QPushButton(Parent_), w_Layout(Layout_), w_Dialog(Dialog_), m_Anchor(Anchor_)
 {
 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
 setMaximumSize(QSize(11, 11));
 setFlat(true);
 m_Pixmap.loadFromData(qnetmap_deleteicon, sizeof(qnetmap_deleteicon));
 setIcon(QIcon(m_Pixmap));
 //
 QNM_DEBUG_CHECK(connect(this, SIGNAL(clicked()), SLOT(removeLayout())));
 }
Ejemplo n.º 4
0
void Calendar::updateTaskWindow()
{

    static int licznikUpdatow;
    licznikUpdatow++;


    taskCounter = 0; // counter of correct date comparisons, also index of labels

    for(int i = 0; i < eventListCounter; i++)
    {
        if(eventList[i]->getDate() ==  *activeDate)
        {
            QString tempName;
            tempName = eventList[i]->getName();

            QString tempStartTime;
            tempStartTime = eventList[i]->getStartTime().toString("hh:mm"); // "hh:mm" is format of string to be created

            QString tempEndTime;
            tempEndTime = eventList[i]->getEndTime().toString("hh:mm");

            // rewriting smaller array to bigger one

            QLabel *taskNameListMemory;
            QLabel *taskStartTimeListMemory;
            QLabel *taskEndTimeListMemory;

            if(taskCounter > 0)
            {
                taskNameListMemory = taskNameList;
                taskStartTimeListMemory = taskStartTimeList;
                taskEndTimeListMemory = taskEndTimeList;

                taskNameList = new QLabel[taskCounter + 1];
                taskStartTimeList = new QLabel[taskCounter + 1];
                taskEndTimeList = new QLabel[taskCounter + 1];

                for(int i = 0; i < taskCounter; i++)
                {
                    taskNameList[i].setText(taskNameListMemory[i].text());
                    taskStartTimeList[i].setText(taskStartTimeListMemory[i].text());
                    taskEndTimeList[i].setText(taskEndTimeListMemory[i].text());
                }

                delete[] taskNameListMemory;
                delete[] taskStartTimeListMemory;
                delete[] taskEndTimeListMemory;
            }

            // setting most current labels

            taskNameList[taskCounter].setText(tempName);
            taskStartTimeList[taskCounter].setText(tempStartTime);
            taskEndTimeList[taskCounter].setText(tempEndTime);

            taskCounter++;

        }
    }

    removeLayout(scrollAreaLayout);     // removing all widgets in layout

    // adding all necessary labels to visualize tasks associated with active day

    for(int i = 0; i < taskCounter; i++)
    {
        scrollAreaLayout->addWidget(&taskNameList[i], i + 1, 1);
        scrollAreaLayout->addWidget(&taskStartTimeList[i], i + 1, 2);
        scrollAreaLayout->addWidget(&taskEndTimeList[i], i + 1, 3);
    }
}