39 #include <QGridLayout>
43 m_DatabaseConnector(0)
67 vlayout->
setAlignment(RadioButtonLayout, Qt::AlignHCenter);
113 std::cout <<
"Pb, there is no existing Img session" << std::endl;
114 std::cout <<
"Debug: In " << __FILE__ <<
", line " << __LINE__;
115 std::cout << std::endl;
160 std::vector< std::string > ImgSessionAttributes (2);
161 ImgSessionAttributes[0] =
"Name";
162 ImgSessionAttributes[1] =
"ImagingSessionID";
166 "ProjectName").toString().toStdString() );
215 setField(
"ImgSessionID", ImgID.c_str() );
254 std::string ImagingSessionID =
"0";
256 if ( ImgSessionName !=
"" )
263 ImagingSessionID = it->second;
270 "ImagingSessionID", ImagingSessionID);
271 if ( ListDescription.size() != 1 )
273 std::cout <<
"Pb, the imagingsession " << ImgSessionName.
toStdString().c_str()
274 <<
"has more than 1 description" << std::endl;
275 std::cout <<
"Debug: In " << __FILE__ <<
", line " << __LINE__;
276 std::cout << std::endl;
290 tr(
"Click on 'Next' if you want to import a new dataset\n or choose 'Open an imaging session':") );
305 "Select the imaging session you want to open and click on 'Finish' to load the corresponding images or choose 'Create a new imaging session':") );
QLabel * textChoiceImgSession
std::string toStdString() const
QStringList m_ListImgSession
QGoOpenCreateImgSessionPage(QWidget *parent=0)
void registerField(const QString &name, QWidget *widget, const char *property, const char *changedSignal)
void setSubTitle(const QString &subTitle)
bool CloseDatabaseConnection(vtkMySQLDatabase *DatabaseConnector)
return true if the connection has been closed, false if the connection was already closed ...
QRadioButton * OpenImgSessionRadioButton
vtkMySQLDatabase * OpenDatabaseConnection(std::string ServerName, std::string login, std::string Password, std::string DBName)
void DisplayInfoImgSession(QString ImgSessionName)
display in the description text the existing description stored in the database for a given Imaging S...
~QGoOpenCreateImgSessionPage()
QString tr(const char *sourceText, const char *disambiguation, int n)
void setField(const QString &name, const QVariant &value)
boost::unordered_map< std::string, std::string > MapTwoColumnsFromTable(vtkMySQLDatabase *DatabaseConnector, const std::vector< std::string > &iColumnNames, const std::string &iTableName, std::string iField, std::string iValue)
query: "SELECT ColumnName1, ColumnName2 FROM TableName"
void setBold(bool enable)
void ChangeToOpenImgSessionDisplay()
void append(const T &value)
QLineEdit * lineImgSessionName
bool GetListImgSession()
fill the m_MapImgSessionIDName with the names of the existing imaging session stored in the database ...
std::vector< std::string > ListSpecificValuesForOneColumn(vtkMySQLDatabase *iDatabaseConnector, const std::string &TableName, const std::string &ColumnName, const std::string &field, const std::string &value, bool ExcludeZero)
SELECT ColumnName FROM TableName WHERE field = value and ColumnName <> 0 (if excludezero) ...
QVariant field(const QString &name) const
QRadioButton * CreateImgSessionRadioButton
QLineEdit * lineImgSessionID
void ChangeToCreateImgSessionDisplay()
bool setAlignment(QWidget *w, QFlags< Qt::AlignmentFlag > alignment)
QTextEdit * lineDescription
void setFinalPage(bool finalPage)
boost::unordered_map< std::string, std::string > m_MapImgSessionIDName
void OpenDBConnection() const
void addItems(const QStringList &texts)
void setReadOnly(bool ro)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setText(const QString &text)
QComboBox * ChoiceImgSession
vtkMySQLDatabase * m_DatabaseConnector
void addLayout(QLayout *layout, int stretch)