// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- int main(int argc, char **argv) { // Create a data model to use for this example MXADataModel::Pointer model = createDataModel(); if (NULL == model.get()) { return EXIT_FAILURE; } // Create a tiff image that we would like to import as a support file createTiffImage(Examples::SupportFileInput); // Now create a 'SupportFile' object and add it to the data model. We use 'false' // as the last argument because we don't want the file to be read immediately, // but rather the file imported into the datamodel output file 'on demand' during // the saving of the DataModel to the HDF5 file ISupportFile::Pointer supFile = MXASupportFile::NewFromFileSystem(Examples::SupportFileInput, SupportFile::FileType::Binary, false); // We use 'true' as the last argument because we want the data model to keep the // internal indexing for us. Most of the time that is what you want to do. model->addSupportFile(supFile, true); // Create the hdf5 datafile using the datamodel we created for its model. This will // attempt to write the model (and support files) to the data file immediately. IDataFile::Pointer dataFile = H5MXADataFile::CreateFileWithModel(Examples::SupportFileLocation, model); // Since we used boost::shared_ptrs to manage our memory for us we don't have to // call delete on anything. The output file should now be available in the binary // directory where this program was compiled. return EXIT_SUCCESS; }
/*public*/ TabbedTableItem::TabbedTableItem(QString choice, bool stdModel, Manager* manager, AbstractTableAction* tableAction) { AddToFrameRan = false; standardModel = true; dataPanel = new QWidget(); dataPanel->resize(600,300); this->tableAction = tableAction; itemText = choice; standardModel=stdModel; this->manager = manager; //If a panel model is used, it should really add to the bottom box //but it can be done this way if required. bottomBox = /*Box.createHorizontalBox();*/ new QFrame(); bottomBox->setObjectName("bottomBox"); //bottomBox.add(Box.createHorizontalGlue()); bottomBoxIndex = 0; // if(dataPanel->layout() != NULL) // dataPanelLayout = (QVBoxLayout*)dataPanel->layout(); // else dataPanel->setLayout(dataPanelLayout = new QGridLayout); if (stdModel) createDataModel(); else addPanelModel(); }