Example #1
0
void QSysMessagePanel::initUI()
{
    QWidget     *headw = new QWidget(this);
    IconButton  *closeB = QAppUtils::ref().getCloseIconBtn(headw);
    QHBoxLayout *headLay = new QHBoxLayout(headw);
    QWidget     *center = new QWidget(this);
    QWidget     *msgWid = new QWidget(center);
    QScrollArea *scroll = new QScrollArea(this);
    QVBoxLayout *vlay = new QVBoxLayout(this);
    QVBoxLayout *vlayMsg = new QVBoxLayout(center);
    int         width,height;


    vlay->setContentsMargins(0,0,0,0);
    vlayMsg->addWidget(msgWid);
    vlayMsg->addStretch();

    QAppUtils::ref().getScreenSize(width,height);
    center->setMinimumSize(width/4.1,height/1.3);
    scroll->setBackgroundRole(QPalette::Dark);
    scroll->setWidget(center);
    scroll->setMinimumSize(width/4,height/1.2);

    headLay->addStretch();
    headLay->addWidget(closeB);
    connect(closeB,SIGNAL(clicked()),this,SLOT(close()));
    m_lay = new QGridLayout(msgWid);
    m_lay->setContentsMargins(0,0,0,0);
    vlay->addWidget(headw);
    vlay->addWidget(scroll);
    vlay->addStretch();
}
void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shares)
{
    QScrollArea *scrollArea = _ui->scrollArea;


    auto newViewPort = new QWidget(scrollArea);
    auto layout = new QVBoxLayout(newViewPort);

    QSize minimumSize = newViewPort->sizeHint();
    int x = 0;

    foreach(const auto &share, shares) {
        // We don't handle link shares
        if (share->getShareType() == Share::TypeLink) {
            continue;
        }

        ShareWidget *s = new ShareWidget(share, _ui->scrollArea);
        layout->addWidget(s);

        x++;
        if (x <= 3) {
            minimumSize = newViewPort->sizeHint();
        }
    }

    minimumSize.rwidth() += layout->spacing();
    minimumSize.rheight() += layout->spacing();
    scrollArea->setMinimumSize(minimumSize);
    scrollArea->setVisible(!shares.isEmpty());
    scrollArea->setWidget(newViewPort);
}
Example #3
0
void ShareUserGroupWidget::slotAdjustScrollWidgetSize()
{
    QScrollArea *scrollArea = _ui->scrollArea;
    if (scrollArea->findChildren<ShareWidget*>().count() <= 3) {
        auto minimumSize = scrollArea->widget()->sizeHint();
        auto spacing = scrollArea->widget()->layout()->spacing();
        minimumSize.rwidth() += spacing;
        minimumSize.rheight() += spacing;
        scrollArea->setMinimumSize(minimumSize);
    }
}
Example #4
0
PixEditor::PixEditor(QWidget *parent)
    : QMainWindow(parent)
{
    barreEtat=statusBar();
    addMenu();
    addock();
    addtoolbar();

    QScrollArea *defilement = new QScrollArea();
    defilement->setMinimumSize(QSize(500,500));
    setCentralWidget(defilement);
    defilement->setWidget(&widgetcentral);
    defilement->setWidgetResizable(true);



}
Example #5
0
Values::Values(Information *info)
{
    information = info;    

    setWindowTitle(tr("Values table"));
    setWindowIcon(QIcon(":/icons/valuesTable.png"));
    QHBoxLayout *mainLayout = new QHBoxLayout();
    QPushButton *addButton = new QPushButton(tr("Add"));
    addButton->setFixedSize(80,80);

    connect(addButton, SIGNAL(released()), this, SLOT(addValuesTable()));

    QScrollArea *scrollArea = new QScrollArea();
    scrollArea->setWidgetResizable(true);
    scrollArea->setMinimumSize(400,400);

    mainLayout->addWidget(scrollArea);
    mainLayout->addWidget(addButton);

    setLayout(mainLayout);

    widget = new QWidget();
    widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);

    QHBoxLayout *widgetLayout = new QHBoxLayout;
    widgetLayout->setMargin(0);

    tablesLayout = new QHBoxLayout();
    tablesLayout->setSpacing(25);

    widgetLayout->addLayout(tablesLayout);
    widgetLayout->addStretch();

    widget->setLayout(widgetLayout);

    scrollArea->setWidget(widget);

    addValuesTable();
}
Example #6
0
void ShareUserGroupWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shares)
{
    QScrollArea *scrollArea = _ui->scrollArea;

    auto newViewPort = new QWidget(scrollArea);
    auto layout = new QVBoxLayout(newViewPort);

    QSize minimumSize = newViewPort->sizeHint();
    int x = 0;

    foreach(const auto &share, shares) {
        // We don't handle link shares
        if (share->getShareType() == Share::TypeLink) {
            continue;
        }

        ShareWidget *s = new ShareWidget(share, _isFile, _ui->scrollArea);
        connect(s, SIGNAL(resizeRequested()), this, SLOT(slotAdjustScrollWidgetSize()));
        layout->addWidget(s);

        x++;
        if (x <= 3) {
            minimumSize = newViewPort->sizeHint();
        } else {
            minimumSize.rwidth() = qMax(newViewPort->sizeHint().width(), minimumSize.width());
        }
    }

    minimumSize.rwidth() += layout->spacing();
    minimumSize.rheight() += layout->spacing();
    scrollArea->setMinimumSize(minimumSize);
    scrollArea->setVisible(!shares.isEmpty());
    scrollArea->setWidget(newViewPort);

    _disableCompleterActivated = false;
    _ui->shareeLineEdit->setEnabled(true);
}
Example #7
0
/**
*@brief メインウインドウのコンストラクタ
*@param argc コマンドライン引数の数
*@param argv コマンドライン引数
*@param parent 親ウィジェット
*/
MainWindow::MainWindow(int argc, char** argv, QWidget *parent)
: QMainWindow(parent)
{
	
	tc = QTextCodec::codecForLocale();
	
	
	

	QHBoxLayout *layout = new QHBoxLayout;
	


	mOgreWidget = new OgreWidget() ;
	
	

	
	
	layout->addWidget(mOgreWidget);

	tabWidget = new QTabWidget;


	mBodySetWidget = new BodySetWidget();
	tabWidget->addTab(mBodySetWidget, tc->toUnicode("ボディ"));
	mBornSetWidget = new BornSetWidget();
	tabWidget->addTab(mBornSetWidget, tc->toUnicode("ボーン"));
	mCameraSetWidget = new CameraSetWidget();
	tabWidget->addTab(mCameraSetWidget, tc->toUnicode("カメラ"));
	mGUISetWidget = new GUISetWidget();
	tabWidget->addTab(mGUISetWidget, tc->toUnicode("CEGUI"));
	mGUITextSetWidget = new GUITextSetWidget();
	tabWidget->addTab(mGUITextSetWidget, tc->toUnicode("CEGUIのテキスト"));
	mImageSetWidget = new ImageSetWidget();
	tabWidget->addTab(mImageSetWidget, tc->toUnicode("CEGUIの画像"));
	mParticleSetWidget = new ParticleSetWidget();
	tabWidget->addTab(mParticleSetWidget, tc->toUnicode("パーティクル"));
	mSubWindowSetWidget = new SubWindowSetWidget();
	tabWidget->addTab(mSubWindowSetWidget, tc->toUnicode("画面分割"));
	mAnimationSetWidget = new AnimationSetWidget();
	tabWidget->addTab(mAnimationSetWidget, tc->toUnicode("アニメーション"));
	mLightSetWidget = new LightSetWidget();
	tabWidget->addTab(mLightSetWidget, tc->toUnicode("光源"));
	mNodeSetWidget = new NodeSetWidget();
	tabWidget->addTab(mNodeSetWidget, tc->toUnicode("ノード"));
	mSimulationSetWidget = new SimulationSetWidget();
	tabWidget->addTab(mSimulationSetWidget, tc->toUnicode("物理シミュレーション(設定)"));
	mSimBodySetWidget = new SimBodySetWidget();
	tabWidget->addTab(mSimBodySetWidget, tc->toUnicode("物理シミュレーション(ボディ)"));
	mSimJointSetWidget = new SimJointSetWidget();
	tabWidget->addTab(mSimJointSetWidget, tc->toUnicode("物理シミュレーション(ジョイント)"));
	mOtherSetWidget = new OtherSetWidget();
	tabWidget->addTab(mOtherSetWidget, tc->toUnicode("その他"));

	connect(mBodySetWidget, SIGNAL(UpdateBody()), mBornSetWidget, SLOT(UpdateBody()));
	connect(mGUISetWidget, SIGNAL(UpdateGUI()), mGUITextSetWidget, SLOT(UpdateGUI()));
	connect(mGUISetWidget, SIGNAL(UpdateGUI()), mImageSetWidget, SLOT(UpdateGUI()));


	connect(this, SIGNAL(UpdateList()), mBodySetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mCameraSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mGUISetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mGUITextSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mImageSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mParticleSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mSubWindowSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mAnimationSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mLightSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mNodeSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mSimulationSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mSimBodySetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mSimJointSetWidget, SLOT(UpdateList()));
	connect(this, SIGNAL(UpdateList()), mOtherSetWidget, SLOT(UpdateList()));

	connect(mBodySetWidget, SIGNAL(UpdateBody()), mNodeSetWidget, SLOT(UpdateList()));
	connect(mParticleSetWidget, SIGNAL(UpdateParticle()), mNodeSetWidget, SLOT(UpdateList()));
	connect(mAnimationSetWidget, SIGNAL(UpdateAnimation()), mNodeSetWidget, SLOT(UpdateList()));
	connect(mLightSetWidget, SIGNAL(UpdateLight()), mNodeSetWidget, SLOT(UpdateList()));
	connect(mSimBodySetWidget, SIGNAL(UpdateODEBody()), mNodeSetWidget, SLOT(UpdateList()));
	connect(mSimJointSetWidget, SIGNAL(UpdateODEJoint()), mNodeSetWidget, SLOT(UpdateList()));

	connect(mSimBodySetWidget, SIGNAL(UpdateODEBody()), mSimJointSetWidget, SLOT(UpdateList()));
	
	connect(mOgreWidget, SIGNAL(mouseMoveSignal(QMouseEvent*, int, int)), mCameraSetWidget, SLOT(mouseMoveSlot(QMouseEvent*, int, int)));
	connect(mOgreWidget, SIGNAL(mousePressSignal(QMouseEvent*)), mCameraSetWidget, SLOT(mousePressSlot(QMouseEvent*)));
	connect(mOgreWidget, SIGNAL(mouseReleaseSignal(QMouseEvent*)), mCameraSetWidget, SLOT(mouseReleaseSlot(QMouseEvent*)));

	connect(mOgreWidget, SIGNAL(mouseMoveSignal(QMouseEvent*, int, int)), mBodySetWidget, SLOT(mouseMoveSlot(QMouseEvent*, int, int)));
	connect(mOgreWidget, SIGNAL(mousePressSignal(QMouseEvent*)), mBodySetWidget, SLOT(mousePressSlot(QMouseEvent*)));
	connect(mOgreWidget, SIGNAL(mouseReleaseSignal(QMouseEvent*)), mBodySetWidget, SLOT(mouseReleaseSlot(QMouseEvent*)));


		
	QVBoxLayout *alayout = new QVBoxLayout;
	alayout->addWidget(tabWidget);
	QWidget *awidget = new QWidget;
	awidget->setLayout(alayout);

	tabWidget->setMinimumSize(250, 768);
	tabWidget->setMaximumWidth(250);

	QScrollArea *area = new QScrollArea();
	area->setWidget(awidget);
	area->setMaximumSize(300, 708);
	area->setMinimumSize(300, 708);
	
	layout->addWidget(area);
	

	

	
	QWidget *widget = new QWidget;
	
    widget->setLayout(layout);
	widget->setMinimumSize(1244, 708);

	setCentralWidget(widget);

	
	

	

	setWindowTitle(tr("OgreRTC"));
    setUnifiedTitleAndToolBarOnMac(true);

	mOgreWidget->initOgre();

	EC = mOgreWidget->mOgreRTCApplication;
	mBodySetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mBornSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mCameraSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mGUISetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mGUITextSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mImageSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mParticleSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mSubWindowSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mAnimationSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mLightSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mNodeSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mSimulationSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mSimBodySetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mSimJointSetWidget->EC = mOgreWidget->mOgreRTCApplication;
	mOtherSetWidget->EC = mOgreWidget->mOgreRTCApplication;


	

	createAction();
	createMenus();

	if(EC && argc > 1)
	{
		EC->reset();
		EC->OpenFile(argv[1]);
	}

}
void MainWindow::displayMap(const QString key)
{
    {
        const QString &file=key;
        if(!not_finishedFile.contains(key) && !finishedFile.contains(key))
            abort();
        MapContent mapContent;
        if(not_finishedFile.contains(key))
            mapContent=not_finishedFile.value(key);
        else if(finishedFile.contains(key))
            mapContent=finishedFile.value(key);
        else
            abort();
        if(mapContent.region.isEmpty())
            abort();
        ui->region->setText(mapContent.region);
        ui->zone->setText(mapContent.zone);
        ui->subzone->setText(mapContent.subzone);
        ui->name->setText(mapContent.name);
        ui->type->setCurrentIndex(ui->type->findText(mapContent.type));
        ui->officialZone->setChecked(mapContent.officialzone);
        ui->finished->setChecked(finishedFile.contains(key));

        QString pngDest=TMPDATA+file;
        pngDest.replace(".tmx",".png");
        ui->currentMapPreview->setPixmap(QPixmap(pngDest));

        {
            QLayoutItem *item = NULL;
            while ((item = ui->horizontalLayout_3->takeAt(0)) != 0) {
            delete item->widget();
            }
            //ui->horizontalLayout_3->widget()->deleteLater();
            //delete ui->scrollArea;
            QString fileSort=file;
            fileSort.replace(".tmx","");
            const std::string &fileSortStd=fileSort.toStdString();
            if(map_list.find(fileSortStd)!=map_list.cend())
            {
                const CatchChallenger::MapServer * const mapPointer=map_list.at(fileSortStd);

                QScrollArea *scrollArea = new QScrollArea(ui->groupBox);
                scrollArea->setMinimumSize(QSize(350, 0));
                scrollArea->setWidgetResizable(true);
                QWidget * scrollAreaWidgetContents = new QWidget();
                scrollAreaWidgetContents->setGeometry(QRect(0, 0, 892, 337));
                QHBoxLayout * horizontalLayout_2 = new QHBoxLayout(scrollAreaWidgetContents);
                horizontalLayout_2->setSpacing(6);
                horizontalLayout_2->setContentsMargins(11, 11, 11, 11);

                unsigned int mapIndex=0;
                while(mapIndex<mapPointer->linked_map.size())
                {
                    const CatchChallenger::CommonMap * const map=mapPointer->linked_map.at(mapIndex);
                    bool haveContent=true;

                    MapContent mapContent;
                    if(not_finishedFile.contains(QString::fromStdString(map->map_file)+".tmx"))
                        mapContent=not_finishedFile.value(QString::fromStdString(map->map_file)+".tmx");
                    else if(finishedFile.contains(QString::fromStdString(map->map_file)+".tmx"))
                        mapContent=finishedFile.value(QString::fromStdString(map->map_file)+".tmx");
                    else
                        abort();//haveContent=false;

                    if(haveContent)
                    {
                        QGroupBox * groupBox_4 = new QGroupBox(scrollAreaWidgetContents);
                        if(finishedFile.contains(QString::fromStdString(map->map_file)+".tmx"))
                        {
                            if(mapContent.type=="outdoor")
                                groupBox_4->setStyleSheet("background-color: rgb(60, 230, 108);");
                            else if(mapContent.type=="city")
                                groupBox_4->setStyleSheet("background-color: #e7ff43;");
                            else if(mapContent.type=="indoor")
                                groupBox_4->setStyleSheet("background-color: #ff4343;");
                            else if(mapContent.type=="cave")
                                groupBox_4->setStyleSheet("background-color: #9b6c14;");
                            else
                                groupBox_4->setStyleSheet("background-color: #43d2ff;");
                        }
                        groupBox_4->setMaximumSize(QSize(300, 300));
                        QVBoxLayout * verticalLayout = new QVBoxLayout(groupBox_4);
                        verticalLayout->setSpacing(6);
                        verticalLayout->setContentsMargins(11, 11, 11, 11);
                        QLabel * label_6 = new QLabel(groupBox_4);

                        label_6->setPixmap(QPixmap(TMPDATA+QString::fromStdString(map->map_file)+".png"));

                        label_6->setScaledContents(true);
                        verticalLayout->addWidget(label_6);
                        QLabel * label_7 = new QLabel(groupBox_4);
                        verticalLayout->addWidget(label_7);
                        QLabel * label_8 = new QLabel(groupBox_4);
                        verticalLayout->addWidget(label_8);
                        QLabel * label_9 = new QLabel(groupBox_4);
                        verticalLayout->addWidget(label_9);
                        QLabel * label_10 = new QLabel(groupBox_4);
                        verticalLayout->addWidget(label_10);
                        horizontalLayout_2->addWidget(groupBox_4);
                        scrollArea->setWidget(scrollAreaWidgetContents);

                        groupBox_4->setTitle(QString("%1 (%2)").arg(mapContent.name).arg(mapContent.type));
                        label_7->setText("Region: <a href=\""+mapContent.region+"\">"+mapContent.region+"</a>");
                        label_7->setToolTip(mapContent.region);
                        label_8->setText("Zone: <a href=\""+mapContent.zone+"\">"+mapContent.zone+"</a>");
                        label_8->setToolTip(mapContent.zone);
                        label_9->setText("Sub zone: <a href=\""+mapContent.subzone+"\">"+mapContent.subzone+"</a>");
                        label_9->setToolTip(mapContent.subzone);
                        label_10->setText("<a href=\""+QString::fromStdString(map->map_file)+"\">[Edit]</a>");
                        label_10->setToolTip(QString::fromStdString(map->map_file));

                        connect(label_7,&QLabel::linkActivated,this,&MainWindow::on_label_7_linkActivated);
                        connect(label_8,&QLabel::linkActivated,this,&MainWindow::on_label_8_linkActivated);
                        connect(label_9,&QLabel::linkActivated,this,&MainWindow::on_label_9_linkActivated);
                        connect(label_10,&QLabel::linkActivated,this,&MainWindow::on_label_10_linkActivated);

                    }

                    mapIndex++;
                }

                ui->horizontalLayout_3->addWidget(scrollArea);
                ui->scrollArea=scrollArea;
            }
        }

        selectedMap=file;
    }
}
SaveGeometryDialog::SaveGeometryDialog(QWidget *parent,Qt::WFlags flags) 
  : QDialog(parent, flags)
{
  static log4cplus::Logger logger =
      log4cplus::Logger::getInstance("SaveGeometryDialog.SaveGeometryDialog");

  verticalLayout = new QVBoxLayout(this);
  verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));

  // check boxes
  QGridLayout* gridLayout = new QGridLayout();
  gridLayout->setSizeConstraint(QLayout::SetMinimumSize);

  QScrollArea* scrollArea = new QScrollArea();
  QWidget* w = new QWidget();
  w->setLayout(gridLayout);
  scrollArea->setWidget(w);
  verticalLayout->addWidget(scrollArea);

  // check all buttons
  QPushButton* selectAll = new QPushButton("Select all");
  QPushButton* unselectAll = new QPushButton("Unselect all");
  connect(selectAll, SIGNAL(clicked()), SLOT(selectAllSlot()));
  connect(unselectAll, SIGNAL(clicked()), SLOT(unselectAllSlot()));
  QHBoxLayout* selectLayout = new QHBoxLayout();
  selectLayout->addWidget(selectAll);
  selectLayout->addWidget(unselectAll);
  verticalLayout->addLayout(selectLayout);

  // output directory
  _outputDir = new QLineEdit();
  QSettings settings;
  QString dir = settings.value("openFile/dir", "").toString();
  _outputDir->setText(dir);
  QPushButton* outputDirButton = new QPushButton("...");
  connect(outputDirButton, SIGNAL(clicked()), SLOT(outputDirSlot()));
  QGridLayout* dirLayout = new QGridLayout();
  dirLayout->addWidget(new QLabel("Dir:"), 0, 0);
  dirLayout->addWidget(_outputDir, 0, 2);
  dirLayout->addWidget(outputDirButton, 0, 4);
  dirLayout->setColumnStretch(2, 1);
  verticalLayout->addLayout(dirLayout);

  // type
  _typeBox = new QComboBox();
  _typeBox->addItem("obj");
  _typeBox->addItem("off");
  _typeBox->addItem("raw");
  QHBoxLayout* typeLayout = new QHBoxLayout();
  typeLayout->addWidget(new QLabel("Type:"), 0, Qt::AlignRight);
  typeLayout->addWidget(_typeBox, 0, Qt::AlignRight);
  verticalLayout->addLayout(typeLayout);

  // ok and cancel
  buttonBox = new QDialogButtonBox(this);
  buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
  buttonBox->setOrientation(Qt::Horizontal);
  buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
  verticalLayout->addWidget(buttonBox);

  setWindowTitle("Save Geometry");

  QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
  QObject::connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

  QMetaObject::connectSlotsByName(this);

  std::vector<std::string> keys = cvcapp.data<cvcraw_geometry::cvcgeom_t>();
  
  if(keys.empty()) {
    QMessageBox::information(this, tr("Laplace Skeletonization"),
                             tr("No geometry loaded."), QMessageBox::Ok);
  }
  else {
    gridLayout->addWidget(new QLabel("Geometry"), 0, 0);
    // gridLayout->setColumnMinimumWidth(1, 5);
    gridLayout->addWidget(new QLabel("Output filename"), 0, 2);
    gridLayout->setColumnStretch(2, 1);
    
    vector<string> vprops = cvcapp.listProperty("zoomed.geometries");
    set<string> props(vprops.begin(), vprops.end());

    BOOST_FOREACH(std::string key, keys) {
      const cvcraw_geometry::cvcgeom_t geom =
          boost::any_cast<cvcraw_geometry::cvcgeom_t>(cvcapp.data()[key]);
        if (geom.points().size() > 0 &&
            geom.const_tets().empty() &&
            props.find(key) != props.end()) {
        
        std::string segmentedString = "-segmented";
        int sizeSegmented = segmentedString.length();
        int positionSegmented = key.rfind(segmentedString);
          
        if(positionSegmented != NOT_FOUND)
          key.replace(key.rfind(segmentedString),sizeSegmented,"");
          
        string ext(".raw");
        switch (GetType(geom)) {
          case kRaw:
            ext = ".raw";
            break;
          case kRawn:
            ext = ".rawn";
            break;
          case kRawc:
            ext = ".rawc";
            break;
          case kRawnc:
            ext = ".rawnc";
            break;
        }
        const int i = _boxes.size();
        _boxes.push_back(new QCheckBox(QString::fromStdString(key)));//, this));
        // _filenames.push_back(new QLineEdit(QString::fromStdString(key+ext)));//, this));
        _filenames.push_back(new QLineEdit(QString::fromStdString(key)));//, this));

        _boxes[i]->setCheckState(Qt::Checked);

        gridLayout->addWidget(_boxes[i], i+1, 0);
        gridLayout->addWidget(_filenames[i], i+1, 2);
      }
    }
    QSize size = gridLayout->minimumSize();
    scrollArea->setMinimumSize(QSize(min(size.width()+10, 400), min(size.height()+10, 300)));
  }

  resize(minimumSizeHint());
}