Debian Codegraph @

HercUtilities/TapeSplt.cpp

raw symbols SCIP
1 /*
2 * File: TapeSplt.cpp
3 *
4 * Author: Jacob Dekel
5 * Created on: Aug 31, 2010
6 *
7 * Copyright (c) 2009-2013 Jacob Dekel
8 * $Id$
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25 #include "TapeSplt.h"cxx . . $ `<file>/HercUtilities/TapeSplt.h`/
26 #include "HerculesStudio.h"cxx . . $ `<file>/HercStudio/HerculesStudio.h`/
27 #include "UtilityRunner.h"cxx . . $ `<file>/HercUtilities/UtilityRunner.h`/
28 #include "Preferences.h"cxx . . $ `<file>/HercStudio/Preferences.h`/
29 #include <QLineEdit>
30
31 #include <QFileDialog>
32 #include <QMessageBox>
33
34 #include <csignal>
35
36 TapeSpltcxx . . $ TapeSplt#::TapeSpltcxx . . $ TapeSplt#TapeSplt(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent)
37 : GenericUtilitycxx . . $ GenericUtility#("tapesplt"cxx . . $ QString#QString(e1217c004a86c950).,parent)
38 {
39 uicxx . . $ TapeSplt#ui..setupUicxx . . $ Ui_TapeSpltClass#setupUi(d194de0c0f68c28b).(this);
40 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setEditTriggerscxx . . $ QAbstractItemView#setEditTriggers(cbe1d262190fb0b).(QTableViewcxx . . $ QFlags#QFlags(9b289cee16747614).::NoEditTriggerscxx . . $ QAbstractItemView#NoEditTriggers.);
41 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..runButtoncxx . . $ Ui_TapeSpltClass#runButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(runClicked()));
42 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..exitButtoncxx . . $ Ui_TapeSpltClass#exitButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(cancelClicked()));
43 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..inputSelButtoncxx . . $ Ui_TapeSpltClass#inputSelButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(selectInputClicked()));
44 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..addButtoncxx . . $ Ui_TapeSpltClass#addButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(addClicked()));
45 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..deleteButtoncxx . . $ Ui_TapeSpltClass#deleteButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(deleteClicked()));
46 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..downButtoncxx . . $ Ui_TapeSpltClass#downButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(downClicked()));
47 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ TapeSplt#ui..upButtoncxx . . $ Ui_TapeSpltClass#upButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(upClicked()));
48 mMaxFilecxx . . $ TapeSplt#mMaxFile. = uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->geometrycxx . . $ QWidget#geometry(f4023511c62cad66).().widthcxx . . $ QRect#width(455f465bc33b4cdf).()/8-8;
49 }
50
51 TapeSpltcxx . . $ TapeSplt#::~cxx . . $ TapeSplt#`~TapeSplt`(49f6e7a06ebc5aa8).TapeSpltcxx . . $ TapeSplt#()
52 {
53
54 }
55
56 void TapeSpltcxx . . $ TapeSplt#::runClickedcxx . . $ TapeSplt#runClicked(49f6e7a06ebc5aa8).()
57 {
58 if (!runOrStopClickedcxx . . $ GenericUtility#runOrStopClicked(c9857a73d68e59ba).())
59 {
60 uicxx . . $ TapeSplt#ui..runButtoncxx . . $ Ui_TapeSpltClass#runButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("Run"cxx . . $ QString#QString(85c52e162fed56f9).);
61 return;
62 }
63
64 if (uicxx . . $ TapeSplt#ui..inputFilecxx . . $ Ui_TapeSpltClass#inputFile.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).().isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).())
65 {
66 QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(21b6fd1dd558cc82).(this, "tapesplt"cxx . . $ QString#QString(85c52e162fed56f9)., "Please specify input file to process"cxx . . $ QString#QString(85c52e162fed56f9).,
67 QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok., QMessageBoxcxx . . $ QMessageBox#::NoButtoncxx . . $ QMessageBox#NoButton.);
68 return;
69 }
70 if (!QFilecxx . . $ QFile#::existscxx . . $ QFile#exists(e1defb592416720d).(uicxx . . $ TapeSplt#ui..inputFilecxx . . $ Ui_TapeSpltClass#inputFile.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).()))
71 {
72 QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(21b6fd1dd558cc82).(this, "tapesplt"cxx . . $ QString#QString(85c52e162fed56f9)., "The specified file does not exist"cxx . . $ QString#QString(85c52e162fed56f9).,
73 QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok., QMessageBoxcxx . . $ QMessageBox#::NoButtoncxx . . $ QMessageBox#NoButton.);
74 return;
75 }
76
77 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> parameterscxx . . $ std/vector#vector(49f6e7a06ebc5aa8).;
78
79 parameters.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(uicxx . . $ TapeSplt#ui..inputFilecxx . . $ Ui_TapeSpltClass#inputFile.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).().toStdStringcxx . . $ QString#toStdString(219584694fe2b248).());
80
81 for (int i=0; i<mModelcxx . . $ TapeSplt#mModel.->rowCountcxx . . $ HTableModel#rowCount(e3878d4d6cd9529c).(); i++)
82 {
83 QModelIndexcxx . . $ QModelIndex# ix = mModelcxx . . $ TapeSplt#mModel.->indexcxx . . $ QAbstractTableModel#index(37dbccf64c4e392).(i,0,QModelIndexcxx . . $ QModelIndex#QModelIndex(49f6e7a06ebc5aa8).());
84 QStringcxx . . $ QString# row = mModelcxx . . $ QString#QString(e1217c004a86c950).->datacxx . . $ HTableModel#data(69b5b18a001c0029).(ix).toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).();
85 QStringcxx . . $ QString# fileName = rowcxx . . $ QString#QString(e1217c004a86c950)..leftcxx . . $ QString#left(3f3c3d0e9c0eb37f).(mMaxFilecxx . . $ TapeSplt#mMaxFile.).trimmedcxx . . $ QString#trimmed(30b3b70527b1c61a).();
86 QStringcxx . . $ QString# blocks = rowcxx . . $ QString#QString(e1217c004a86c950)..midcxx . . $ QString#mid(44b7563da18aea72).(mMaxFilecxx . . $ TapeSplt#mMaxFile.);
87 uicxx . . $ TapeSplt#ui..inputFilecxx . . $ Ui_TapeSpltClass#inputFile.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(fileName);
88 parameters.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(fileName.toStdStringcxx . . $ QString#toStdString(219584694fe2b248).());
89 parameters.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(blocks.toStdStringcxx . . $ QString#toStdString(219584694fe2b248).());
90 }
91
92 stdcxx . . $ std/::stringcxx . . $ std/string# commandcxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f). = "tapesplt"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).;
93
94 executecxx . . $ GenericUtility#execute(e5618828c763ae1e).(command, Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().hercDircxx . . $ Preferences#hercDir(219584694fe2b248).(), parameters);
95 uicxx . . $ TapeSplt#ui..runButtoncxx . . $ Ui_TapeSpltClass#runButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("Stop"cxx . . $ QString#QString(85c52e162fed56f9).);
96 }
97
98
99 void TapeSpltcxx . . $ TapeSplt#::cancelClickedcxx . . $ TapeSplt#cancelClicked(49f6e7a06ebc5aa8).()
100 {
101 deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).();
102 }
103
104 void TapeSpltcxx . . $ TapeSplt#::selectInputClickedcxx . . $ TapeSplt#selectInputClicked(49f6e7a06ebc5aa8).()
105 {
106 QStringcxx . . $ QString# s = QFileDialogcxx . . $ QString#QString(e1217c004a86c950).::getOpenFileNamecxx . . $ QFileDialog#getOpenFileName(a6b29be4bec65236).(this,"Browse for input tape file"cxx . . $ QString#QString(85c52e162fed56f9).,uicxx . . $ TapeSplt#ui..inputFilecxx . . $ Ui_TapeSpltClass#inputFile.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).());
107 uicxx . . $ TapeSplt#ui..inputFilecxx . . $ Ui_TapeSpltClass#inputFile.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(s);
108 }
109
110 void TapeSpltcxx . . $ TapeSplt#::addClickedcxx . . $ TapeSplt#addClicked(49f6e7a06ebc5aa8).()
111 {
112 TapeSpltSubDlgcxx . . $ TapeSpltSubDlg# * subDlg = new TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#(this);
113 connectcxx . . $ QObject#connect(158df1d9a01a3410). (subDlg, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(fileNameSet(QString, int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(fileNameSetSlot(QString, int)));
114 subDlg->execcxx . . $ QDialog#exec(b126dc7c1de90089).();
115 }
116
117 void TapeSpltcxx . . $ TapeSplt#::deleteClickedcxx . . $ TapeSplt#deleteClicked(49f6e7a06ebc5aa8).()
118 {
119 int i = uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).();
120 if (i>= 0) mModelcxx . . $ TapeSplt#mModel.->removeRowcxx . . $ HTableModel#removeRow(eb30e146838e644d).(i);
121 QStandardItemModelcxx . . $ QStandardItemModel# tcxx . . $ QStandardItemModel#QStandardItemModel(749de1b6ae65bddd).;
122 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(&t);
123 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(mModelcxx . . $ TapeSplt#mModel.);
124 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->resizeColumnToContentscxx . . $ QTableView#resizeColumnToContents(d4f767463ce0a6b3).(0);
125 }
126
127 void TapeSpltcxx . . $ TapeSplt#::downClickedcxx . . $ TapeSplt#downClicked(49f6e7a06ebc5aa8).()
128 {
129 int i = uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).();
130 if (i>=0 && (i+1)<mModelcxx . . $ TapeSplt#mModel.->rowCountcxx . . $ HTableModel#rowCount(e3878d4d6cd9529c).())
131 {
132 QVariantcxx . . $ QVariant# itemA = mModelcxx . . $ QVariant#QVariant(7157b2bac2a9068).->rowDatacxx . . $ HTableModel#rowData(cc12416a8a986c8f).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).());
133 QVariantcxx . . $ QVariant# itemB = mModelcxx . . $ QVariant#QVariant(7157b2bac2a9068).->rowDatacxx . . $ HTableModel#rowData(cc12416a8a986c8f).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(i+1,0));
134 mModelcxx . . $ TapeSplt#mModel.->setDatacxx . . $ HTableModel#setData(6d1d8401440d0a2c).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).(),itemB);
135 mModelcxx . . $ TapeSplt#mModel.->setDatacxx . . $ HTableModel#setData(6d1d8401440d0a2c).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(i+1,0),itemA);
136 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setCurrentIndexcxx . . $ QAbstractItemView#setCurrentIndex(87a6de385263c395).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(i+1,0));
137 QStandardItemModelcxx . . $ QStandardItemModel# tcxx . . $ QStandardItemModel#QStandardItemModel(749de1b6ae65bddd).;
138 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(&t);
139 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(mModelcxx . . $ TapeSplt#mModel.);
140 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->resizeColumnToContentscxx . . $ QTableView#resizeColumnToContents(d4f767463ce0a6b3).(0); }
141 }
142 void TapeSpltcxx . . $ TapeSplt#::upClickedcxx . . $ TapeSplt#upClicked(49f6e7a06ebc5aa8).()
143 {
144 int i = uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).();
145 if (i>=1 && mModelcxx . . $ TapeSplt#mModel.->rowCountcxx . . $ HTableModel#rowCount(e3878d4d6cd9529c).() > 1)
146 {
147 QVariantcxx . . $ QVariant# itemA = mModelcxx . . $ QVariant#QVariant(7157b2bac2a9068).->rowDatacxx . . $ HTableModel#rowData(cc12416a8a986c8f).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(i-1,0));
148 QVariantcxx . . $ QVariant# itemB = mModelcxx . . $ QVariant#QVariant(7157b2bac2a9068).->rowDatacxx . . $ HTableModel#rowData(cc12416a8a986c8f).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).());
149 mModelcxx . . $ TapeSplt#mModel.->setDatacxx . . $ HTableModel#setData(6d1d8401440d0a2c).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).(),itemA);
150 mModelcxx . . $ TapeSplt#mModel.->setDatacxx . . $ HTableModel#setData(6d1d8401440d0a2c).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(i-1,0),itemB);
151 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setCurrentIndexcxx . . $ QAbstractItemView#setCurrentIndex(87a6de385263c395).(uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->currentIndexcxx . . $ QAbstractItemView#currentIndex(a394cbc57608ce34).().siblingcxx . . $ QModelIndex#sibling(ed2c7c7bbed3ca7f).(i-1,0));
152 QStandardItemModelcxx . . $ QStandardItemModel# tcxx . . $ QStandardItemModel#QStandardItemModel(749de1b6ae65bddd).;
153 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(&t);
154 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(mModelcxx . . $ TapeSplt#mModel.);
155 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->resizeColumnToContentscxx . . $ QTableView#resizeColumnToContents(d4f767463ce0a6b3).(0); }
156 }
157 void TapeSpltcxx . . $ TapeSplt#::fileNameSetSlotcxx . . $ TapeSplt#fileNameSetSlot(f2e9810b37c242c3).(QStringcxx . . $ QString# fileName, int blocks)
158 {
159 if (fileName ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "") return;
160 if (uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->modelcxx . . $ QAbstractItemView#model(c9c1e11e7bd96493).() == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)
161 {
162 mModelcxx . . $ TapeSplt#mModel. = new HTableModelcxx . . $ HTableModel#(this);
163 }
164 else
165 {
166 QStandardItemModelcxx . . $ QStandardItemModel# tcxx . . $ QStandardItemModel#QStandardItemModel(749de1b6ae65bddd).;
167 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(&t);
168 }
169 mModelcxx . . $ TapeSplt#mModel.->insertRowcxx . . $ HTableModel#insertRow(12e0bfc71059d1cd).(mModelcxx . . $ TapeSplt#mModel.->rowCountcxx . . $ HTableModel#rowCount(e3878d4d6cd9529c).()-1, QModelIndexcxx . . $ QModelIndex#QModelIndex(49f6e7a06ebc5aa8).(), fileNamecxx . . $ QString#QString(3520e46b33348bf6)., QStringcxx . . $ QString#QString(e1217c004a86c950).::numbercxx . . $ QString#number(f4fd9db251ca774b).(blocks));
170 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->setModelcxx . . $ QTableView#setModel(c6e1f1e42522b780).(mModelcxx . . $ TapeSplt#mModel.);
171 uicxx . . $ TapeSplt#ui..tableViewcxx . . $ Ui_TapeSpltClass#tableView.->resizeColumnToContentscxx . . $ QTableView#resizeColumnToContents(d4f767463ce0a6b3).(0);
172 }
173
174 QStringcxx . . $ QString# TapeSpltcxx . . $ TapeSplt#::genLinecxx . . $ TapeSplt#genLine(93f2bd76dfa71479).(QStringcxx . . $ QString# file, int blocks)
175 {
176 QStringcxx . . $ QString# ret = filecxx . . $ QString#QString(3520e46b33348bf6)..leftJustifiedcxx . . $ QString#leftJustified(63a88914f7cad4ec).(mMaxFilecxx . . $ TapeSplt#mMaxFile.,' 'cxx . . $ QChar#QChar(d4f767463ce0a6b3).) +cxx . . $ operator+(fab9b4f80031f353). QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(blocks);
177 return filecxx . . $ QString#QString(3520e46b33348bf6)..leftJustifiedcxx . . $ QString#leftJustified(63a88914f7cad4ec).(mMaxFilecxx . . $ TapeSplt#mMaxFile.,' 'cxx . . $ QChar#QChar(d4f767463ce0a6b3).) +cxx . . $ operator+(fab9b4f80031f353). QStringcxx . . $ QString#::numbercxx . . $ QString#number(f4fd9db251ca774b).(blocks);
178 }
179
180
181 void TapeSpltcxx . . $ TapeSplt#::finishedSlotcxx . . $ TapeSplt#finishedSlot(49f6e7a06ebc5aa8).()
182 {
183 if (mFinishedOKcxx . . $ GenericUtility#mFinishedOK.)
184 {
185 QMessageBoxcxx . . $ QMessageBox#::informationcxx . . $ QMessageBox#information(dea435d67faf38b3).(this, "tapsplt"cxx . . $ QString#QString(85c52e162fed56f9)., "Tape split successfully completed!"cxx . . $ QString#QString(85c52e162fed56f9).,
186 QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok.,
187 QMessageBoxcxx . . $ QMessageBox#::NoButtoncxx . . $ QMessageBox#NoButton.);
188 deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).();
189 }
190 else
191 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! errorcxx . . $ GenericUtility#error(49f6e7a06ebc5aa8).();
192
193 uicxx . . $ TapeSplt#ui..runButtoncxx . . $ Ui_TapeSpltClass#runButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("Run"cxx . . $ QString#QString(85c52e162fed56f9).);
194 }
195
196 TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#::TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#TapeSpltSubDlg(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# * parent) : QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d).(parent)
197 {
198 setupUicxx . . $ TapeSpltSubDlg#setupUi(49f6e7a06ebc5aa8).();
199 connectcxx . . $ QObject#connect(158df1d9a01a3410).(selOutputButtoncxx . . $ TapeSpltSubDlg#selOutputButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(selectOutputSlot()));
200 connectcxx . . $ QObject#connect(158df1d9a01a3410).(addButtoncxx . . $ TapeSpltSubDlg#addButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(addSlot()));
201 connectcxx . . $ QObject#connect(158df1d9a01a3410).(cancelButtoncxx . . $ TapeSpltSubDlg#cancelButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(cancelSlot()));
202 }
203
204 TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#::~cxx . . $ TapeSpltSubDlg#`~TapeSpltSubDlg`(49f6e7a06ebc5aa8).TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#()
205 {
206
207 }
208
209 void TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#::setupUicxx . . $ TapeSpltSubDlg#setupUi(49f6e7a06ebc5aa8).()
210 {
211 resizecxx . . $ QWidget#resize(3e454b8ccf442868).(554, 204);
212 labelcxx . . $ TapeSpltSubDlg#label. = new QLabelcxx . . $ QLabel#(this);
213 labelcxx . . $ TapeSpltSubDlg#label.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("label"));
214 labelcxx . . $ TapeSpltSubDlg#label.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(30, 30, 461, 16));
215 lineEditcxx . . $ TapeSpltSubDlg#lineEdit. = new QLineEditcxx . . $ QLineEdit#QLineEdit(108f35f7aa7f3cf9).(this);
216 lineEditcxx . . $ TapeSpltSubDlg#lineEdit.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("lineEdit"));
217 lineEditcxx . . $ TapeSpltSubDlg#lineEdit.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(30, 60, 461, 20));
218 selOutputButtoncxx . . $ TapeSpltSubDlg#selOutputButton. = new QPushButtoncxx . . $ QPushButton#QPushButton(108f35f7aa7f3cf9).(this);
219 selOutputButtoncxx . . $ TapeSpltSubDlg#selOutputButton.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("selOutputButton"));
220 selOutputButtoncxx . . $ TapeSpltSubDlg#selOutputButton.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(510, 60, 31, 23));
221 spinBoxcxx . . $ TapeSpltSubDlg#spinBox. = new QSpinBoxcxx . . $ QSpinBox#(this);
222 spinBoxcxx . . $ TapeSpltSubDlg#spinBox.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("spinBox"));
223 spinBoxcxx . . $ TapeSpltSubDlg#spinBox.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(30, 120, 42, 22));
224 spinBoxcxx . . $ TapeSpltSubDlg#spinBox.->setMaximumcxx . . $ QSpinBox#setMaximum(d4f767463ce0a6b3).(9);
225 spinBoxcxx . . $ TapeSpltSubDlg#spinBox.->setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(1);
226 label_2cxx . . $ TapeSpltSubDlg#label_2. = new QLabelcxx . . $ QLabel#(this);
227 label_2cxx . . $ TapeSpltSubDlg#label_2.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("label_2"));
228 label_2cxx . . $ TapeSpltSubDlg#label_2.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(30, 90, 251, 16));
229 addButtoncxx . . $ TapeSpltSubDlg#addButton. = new QPushButtoncxx . . $ QPushButton#QPushButton(108f35f7aa7f3cf9).(this);
230 addButtoncxx . . $ TapeSpltSubDlg#addButton.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("addButton"));
231 addButtoncxx . . $ TapeSpltSubDlg#addButton.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(30, 160, 75, 23));
232 cancelButtoncxx . . $ TapeSpltSubDlg#cancelButton. = new QPushButtoncxx . . $ QPushButton#QPushButton(108f35f7aa7f3cf9).(this);
233 cancelButtoncxx . . $ TapeSpltSubDlg#cancelButton.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringcxx . . $ QString#::fromUtf8cxx . . $ QString#fromUtf8(5ac70cc0fa2a874e).("cancelButton"));
234 cancelButtoncxx . . $ TapeSpltSubDlg#cancelButton.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(460, 160, 75, 23));
235
236
237 setWindowTitlecxx . . $ QWidget#setWindowTitle(3520e46b33348bf6).("Add Output Tape"cxx . . $ QString#QString(85c52e162fed56f9).);
238 labelcxx . . $ TapeSpltSubDlg#label.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Name of output file:"cxx . . $ QString#QString(85c52e162fed56f9).);
239 selOutputButtoncxx . . $ TapeSpltSubDlg#selOutputButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("..."cxx . . $ QString#QString(85c52e162fed56f9).);
240 label_2cxx . . $ TapeSpltSubDlg#label_2.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Number of blocks to extarct into this tape file:"cxx . . $ QString#QString(85c52e162fed56f9).);
241 addButtoncxx . . $ TapeSpltSubDlg#addButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("Add"cxx . . $ QString#QString(85c52e162fed56f9).);
242 cancelButtoncxx . . $ TapeSpltSubDlg#cancelButton.->setTextcxx . . $ QAbstractButton#setText(3520e46b33348bf6).("Cancel"cxx . . $ QString#QString(85c52e162fed56f9).);
243 }
244
245 void TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#::selectOutputSlotcxx . . $ TapeSpltSubDlg#selectOutputSlot(49f6e7a06ebc5aa8).()
246 {
247 QStringcxx . . $ QString# s = QFileDialogcxx . . $ QString#QString(e1217c004a86c950).::getOpenFileNamecxx . . $ QFileDialog#getOpenFileName(a6b29be4bec65236).(this,"Browse for output tape file"cxx . . $ QString#QString(85c52e162fed56f9).,lineEditcxx . . $ TapeSpltSubDlg#lineEdit.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).());
248 lineEditcxx . . $ TapeSpltSubDlg#lineEdit.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(s);
249 }
250
251 void TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#::addSlotcxx . . $ TapeSpltSubDlg#addSlot(49f6e7a06ebc5aa8).()
252 {
253 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! fileNameSetcxx . . $ TapeSpltSubDlg#fileNameSet(f2e9810b37c242c3).(lineEditcxx . . $ QString#QString(e1217c004a86c950).->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).(), spinBoxcxx . . $ TapeSpltSubDlg#spinBox.->valuecxx . . $ QSpinBox#value(455f465bc33b4cdf).());
254 deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).();
255 }
256
257 void TapeSpltSubDlgcxx . . $ TapeSpltSubDlg#::cancelSlotcxx . . $ TapeSpltSubDlg#cancelSlot(49f6e7a06ebc5aa8).()
258 {
259 deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).();
260 }
261
262 //////////////////////////////////////
263
264 HTableModelcxx . . $ HTableModel#::HTableModelcxx . . $ HTableModel#HTableModel(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *o) : QAbstractTableModelcxx . . $ QAbstractTableModel#(o)
265 {
266
267 }
268
269 HTableModelcxx . . $ HTableModel#::~cxx . . $ HTableModel#`~HTableModel`(49f6e7a06ebc5aa8).HTableModelcxx . . $ HTableModel#()
270 {
271
272 }
273
274 bool HTableModelcxx . . $ HTableModel#::insertRowcxx . . $ HTableModel#insertRow(12e0bfc71059d1cd).(int row, const QModelIndexcxx . . $ QModelIndex# &index, QStringcxx . . $ QString# filename, QStringcxx . . $ QString# blocks)
275 {
276 hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(3,"insert " << filename.toStdString() << " to row "<< row);
277
278 if (row > static_cast<int>(mTablecxx . . $ HTableModel#mTable..sizecxx . . $ std/vector#size(fe4d2d262d4164a8).())) return false;
279 HTableTypecxx . . $ `HercUtilities/TapeSplt.h:68:9`!::iteratorcxx . . $ std/vector#iterator# it = mTablecxx . . $ HTableModel#mTable..begincxx . . $ std/vector#begin(33b10a496a38335b).()+cxx . . $ __gnu_cxx/__normal_iterator#operator+(d0cb2d2ebd313f38).(1+row);
280 QStringListcxx . . $ QStringList# listcxx . . $ QStringList#QStringList(49f6e7a06ebc5aa8).;
281 list <<cxx . . $ QStringList#`operator<<`(85116071a693d053). filename <<cxx . . $ QStringList#`operator<<`(85116071a693d053). blocks ;
282
283 beginInsertRowscxx . . $ QAbstractItemModel#beginInsertRows(d1f44b3c3a3f9fa).(index, row+1, row+2);
284 mTablecxx . . $ HTableModel#mTable..insertcxx . . $ std/vector#insert(e54735f7c99f2c9d).(itcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ea0f1a22ba5f21a0)., list);
285 endInsertRowscxx . . $ QAbstractItemModel#endInsertRows(49f6e7a06ebc5aa8).();
286
287 return true;
288 }
289
290 bool HTableModelcxx . . $ HTableModel#::removeRowcxx . . $ HTableModel#removeRow(eb30e146838e644d). ( int row, const QModelIndexcxx . . $ QModelIndex# & parent)
291 {
292 if (parent.isValidcxx . . $ QModelIndex#isValid(50ce9a9e25b4a850).()) return false;
293 if (row >= static_cast<int>(mTablecxx . . $ HTableModel#mTable..sizecxx . . $ std/vector#size(fe4d2d262d4164a8).())) return false;
294 HTableTypecxx . . $ `HercUtilities/TapeSplt.h:68:9`!::iteratorcxx . . $ std/vector#iterator# it = mTablecxx . . $ HTableModel#mTable..begincxx . . $ std/vector#begin(33b10a496a38335b).()+cxx . . $ __gnu_cxx/__normal_iterator#operator+(d0cb2d2ebd313f38).row;
295 mTablecxx . . $ HTableModel#mTable..erasecxx . . $ std/vector#erase(351407f384f345bc).(itcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(ea0f1a22ba5f21a0).);
296 return true;
297 }
298
299 int HTableModelcxx . . $ HTableModel#::rowCountcxx . . $ HTableModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &parent) const
300 {
301 if (parent.isValidcxx . . $ QModelIndex#isValid(50ce9a9e25b4a850).()) return 0;
302 else return mTablecxx . . $ HTableModel#mTable..sizecxx . . $ std/vector#size(fe4d2d262d4164a8).();
303 }
304
305 int HTableModelcxx . . $ HTableModel#::columnCountcxx . . $ HTableModel#columnCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &parent) const
306 {
307 if (parent.isValidcxx . . $ QModelIndex#isValid(50ce9a9e25b4a850).()) return 0;
308 else return 2;
309 }
310
311 QVariantcxx . . $ QVariant# HTableModelcxx . . $ HTableModel#::datacxx . . $ HTableModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# &index, int role) const
312 {
313 if (index.rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).() >= static_cast<int>(mTablecxx . . $ HTableModel#mTable..sizecxx . . $ std/vector#size(fe4d2d262d4164a8).())) return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).();
314 QStringListcxx . . $ QStringList# list = mTablecxx . . $ HTableModel#mTable.[cxx . . $ std/vector#`operator[]`(b61e45a10b63f40a).index.rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).()];
315 hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(5,"data(): request for col=" << index.column() << ";row=" << index.row() <<";role=" << role);
316 hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(5," list with size=" << list.size());
317 if (role != Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).();
318 if (index.columncxx . . $ QModelIndex#column(455f465bc33b4cdf).() == 0) return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).(list[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0]);
319 else return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).(list[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).1]);
320 }
321
322 QVariantcxx . . $ QVariant# HTableModelcxx . . $ HTableModel#::rowDatacxx . . $ HTableModel#rowData(cc12416a8a986c8f).(const QModelIndexcxx . . $ QModelIndex# &index) const
323 {
324 if (index.rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).() >= static_cast<int>(mTablecxx . . $ HTableModel#mTable..sizecxx . . $ std/vector#size(fe4d2d262d4164a8).())) return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).();
325 QStringListcxx . . $ QStringList# list = mTablecxx . . $ HTableModel#mTable.[cxx . . $ std/vector#`operator[]`(b61e45a10b63f40a).index.rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).()];
326 return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).(list);
327 }
328
329 QVariantcxx . . $ QVariant# HTableModelcxx . . $ HTableModel#::headerDatacxx . . $ HTableModel#headerData(b8cfec0985494997). ( int col, Qtcxx . . $ Qt/::Orientationcxx . . $ Qt/Orientation# orientation, int role ) const
330 {
331 if (orientation == Qtcxx . . $ Qt/::Horizontalcxx . . $ Qt/Horizontal. && role == 0)
332 {
333 if (col == 0) return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("File-Name"));
334 else return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).(QStringcxx . . $ QString#QString(85c52e162fed56f9).("Blocks"));
335 }
336 else
337 {
338 return QVariantcxx . . $ QVariant#QVariant(7157b2bac2a9068).();
339 }
340 }
341
342 bool HTableModelcxx . . $ HTableModel#::setDatacxx . . $ HTableModel#setData(6d1d8401440d0a2c).(const QModelIndexcxx . . $ QModelIndex# &index, const QVariantcxx . . $ QVariant# &value, int)
343 {
344 if (static_cast<int>(mTablecxx . . $ HTableModel#mTable..sizecxx . . $ std/vector#size(fe4d2d262d4164a8).()) <= index.rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).()) return false;
345 if (!value.isValidcxx . . $ QVariant#isValid(50ce9a9e25b4a850).() || !value.canConvertcxx . . $ QVariant#canConvert(4a668f6de69bf818).(QVariantcxx . . $ QVariant#::StringListcxx . . $ QVariant#StringList.)) return false;
346
347 QStringListcxx . . $ QStringList# list = value.toStringListcxx . . $ QVariant#toStringList(e1dbd5c4feadc8f5).();
348 mTablecxx . . $ HTableModel#mTable.[cxx . . $ std/vector#`operator[]`(428bb168810b9e52).index.rowcxx . . $ QModelIndex#row(455f465bc33b4cdf).()] =cxx . . $ QStringList#`operator=`(cb3c3d1614140851). list;
349 return true;
350 }