//**************************************************************************
void MdlProjektErstellung::newOrderSpace()
//**************************************************************************
{
bool ok1,ok2;
"C:",
"Name", &ok1);
"1", &ok2);
vector<string> vecProjektDateien;
this->m_actualWorkSpaceFile.clear();
this->m_actualWorkSpaceFile.append(dir);
this->m_actualWorkSpaceFile.append("/");
this->m_actualWorkSpaceFile.append(WorkspaceName);
this->m_actualWorkSpaceFile.append(".ert");
OrderSpace* ActualSpace = new OrderSpace(dir.toAscii().data(),
WorkspaceName.toAscii().data(),
ProjektAnzahl.toInt(),
vecProjektDateien);
tableModel->setRowCount(0) ;
int Max_Number_of_Columns(1);
int Max_Number_of_Lines(0);
tableModel->setColumnCount(Max_Number_of_Columns) ;
for (vector <string>::iterator vItr=vecProjektDateien.begin(); vItr != vecProjektDateien.end(); ++vItr)
{
string tstr=(*vItr).c_str();
tableModel->setItem(Max_Number_of_Lines, 0, item) ;
Max_Number_of_Lines++;
}
this->myOrderView->setModel(tableModel);
this->myOrderView->setAlternatingRowColors(true);
this->myOrderView->resizeColumnsToContents();
connect(this
->myOrderView,
SIGNAL(clicked
(const QModelIndex)),
this,
SLOT(GetProjectItem
(const QModelIndex &)));
}
//**************************************************************************
void MdlProjektErstellung::GetProjectItem(const QModelIndex& index)
//**************************************************************************
{
str=tableModel->data(index,0).toString();
MdlProjektMaske* AktProjektMaske = new MdlProjektMaske(str,this->m_actualWorkSpaceFile);
AktProjektMaske->show();
//connect(AktProjektMaske, SIGNAL(closed()), AktProjektMaske, SLOT(deleteLater()));
}
//**************************************************************************
void MdlProjektErstellung::newOrderSpace()
//**************************************************************************
{
bool ok1,ok2;
QString dir = QFileDialog::getExistingDirectory(this, tr("open group path"),
"C:",
QFileDialog::ShowDirsOnly
| QFileDialog::DontResolveSymlinks);
QString WorkspaceName = QInputDialog::getText(this, tr("groupname"),
tr("Group"), QLineEdit::Normal,
"Name", &ok1);
QString ProjektAnzahl = QInputDialog::getText(this, tr("Projektinput"),
tr("Projektcount"), QLineEdit::Normal,
"1", &ok2);
vector<string> vecProjektDateien;
this->m_actualWorkSpaceFile.clear();
this->m_actualWorkSpaceFile.append(dir);
this->m_actualWorkSpaceFile.append("/");
this->m_actualWorkSpaceFile.append(WorkspaceName);
this->m_actualWorkSpaceFile.append(".ert");
OrderSpace* ActualSpace = new OrderSpace(dir.toAscii().data(),
WorkspaceName.toAscii().data(),
ProjektAnzahl.toInt(),
vecProjektDateien);
tableModel = new QStandardItemModel;
tableModel->setRowCount(0) ;
int Max_Number_of_Columns(1);
int Max_Number_of_Lines(0);
tableModel->setColumnCount(Max_Number_of_Columns) ;
for (vector <string>::iterator vItr=vecProjektDateien.begin(); vItr != vecProjektDateien.end(); ++vItr)
{
string tstr=(*vItr).c_str();
QStandardItem * item = new QStandardItem(tstr.c_str());
tableModel->setItem(Max_Number_of_Lines, 0, item) ;
Max_Number_of_Lines++;
}
this->myOrderView->setModel(tableModel);
this->myOrderView->setAlternatingRowColors(true);
this->myOrderView->resizeColumnsToContents();
this->myOrderView->setEditTriggers(QAbstractItemView::NoEditTriggers);
connect(this->myOrderView, SIGNAL(clicked(const QModelIndex)), this, SLOT(GetProjectItem(const QModelIndex &)));
}
//**************************************************************************
void MdlProjektErstellung::GetProjectItem(const QModelIndex& index)
//**************************************************************************
{
QString str;
str=tableModel->data(index,0).toString();
MdlProjektMaske* AktProjektMaske = new MdlProjektMaske(str,this->m_actualWorkSpaceFile);
AktProjektMaske->show();
//connect(AktProjektMaske, SIGNAL(closed()), AktProjektMaske, SLOT(deleteLater()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks