MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / export_run

Method export_run

DSView/pv/dialogs/storeprogress.cpp:296–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void StoreProgress::export_run()
297{
298 if (_store_session->IsLogicDataType())
299 {
300 QFormLayout *lay = new QFormLayout();
301 lay->setContentsMargins(5, 0, 0, 0);
302 bool isOrg = AppConfig::Instance().appOptions.originalData;
303
304 _ckOrigin = new QRadioButton();
305 _ckOrigin->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_ORIGINAL_DATA), "Original data"));
306 _ckOrigin->setChecked(isOrg);
307
308 _ckCompress = new QRadioButton();
309 _ckCompress->setText(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_COMPRESSED_DATA), "Compressed data"));
310 _ckCompress->setChecked(!isOrg);
311
312 _start_cursor = new DsComboBox();
313 _end_cursor = new DsComboBox();
314
315 _start_cursor->addItem("-");
316 _end_cursor->addItem("-");
317
318 auto &cursor_list = _view->get_cursorList();
319
320 for (int i=0; i<cursor_list.size(); i++){
321 //tr
322 QString cursor_name = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CURSOR), "Cursor") +
323 QString::number(i+1);
324 _start_cursor->addItem(cursor_name);
325 _end_cursor->addItem(cursor_name);
326 }
327
328 lay->addRow(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_START_CURSOR), "Start") , _start_cursor);
329 lay->addRow(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_END_CURSOR), "End"), _end_cursor);
330
331 QWidget *space = new QWidget();
332 space->setFixedHeight(5);
333 lay->addRow(space);
334
335 lay->addRow("",_ckOrigin);
336 lay->addRow("", _ckCompress);
337 _grid->addLayout(lay, 2, 0, 1, 2);
338
339 connect(_ckOrigin, SIGNAL(clicked(bool)), this, SLOT(on_ck_origin(bool)));
340 connect(_ckCompress, SIGNAL(clicked(bool)), this, SLOT(on_ck_compress(bool)));
341 }
342
343 _isExport = true;
344 setTitle(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_EXPORT), "Export"));
345 QString file = _store_session->MakeExportFile(false);
346 _fileLab->setText(file);
347
348 if (_ckOrigin != NULL){
349 bool bFlag = file.endsWith(".csv");
350 _ckOrigin->setVisible(bFlag);
351 _ckCompress->setVisible(bFlag);
352 }
353

Callers 1

on_exportMethod · 0.80

Calls 3

IsLogicDataTypeMethod · 0.80
sizeMethod · 0.80
MakeExportFileMethod · 0.80

Tested by

no test coverage detected