Getting dir list to the drop down field
This commit is contained in:
parent
0372a4ad8c
commit
bddc7ea852
|
@ -26,18 +26,19 @@ private:
|
|||
int m_curSeverity;
|
||||
|
||||
FileInfoWindow* m_infoWindow;
|
||||
QFileSystemModel* fmodel;
|
||||
QStringList filters;
|
||||
QFileSystemModel* fmodel;
|
||||
QStringList filters, dropDownDirList;
|
||||
|
||||
// functions
|
||||
private:
|
||||
void setupWidgets();
|
||||
void getAssetLibrary();
|
||||
void setAsset(QString);
|
||||
void setAsset(QString);
|
||||
void searchMeshFiles(QString path);
|
||||
void openFile();
|
||||
void open(QString);
|
||||
void open(QString);
|
||||
void takeScreenShot();
|
||||
void setDirList();
|
||||
void aboutTool();
|
||||
|
||||
protected:
|
||||
|
@ -54,6 +55,6 @@ signals:
|
|||
|
||||
// private slots
|
||||
private slots:
|
||||
void on_fileListView_doubleClicked(const QModelIndex &index);
|
||||
void on_dirDropDownList_currentTextChanged(const QString &arg1);
|
||||
void on_fileListView_doubleClicked(const QModelIndex &index);
|
||||
void on_dirDropDownList_currentTextChanged(const QString &arg1);
|
||||
};
|
||||
|
|
|
@ -51,10 +51,12 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
ui->dirDropDownList->addItem("BF1_ModTools", "C:/BF1_ModTools/Assets/Shipped Worlds/"); // temp here
|
||||
ui->dirDropDownList->addItem("BF2_ModTools", "C:/BF2_ModTools/assets/Sides/"); // temp here
|
||||
|
||||
// get the list of dirs from settimgs or rather settings window
|
||||
SettingsWindow obj;
|
||||
QStringList tmpList = obj.getDirList().split(";");
|
||||
for (int i = 0; i < tmpList.size(); i++)
|
||||
ui->dirDropDownList->addItem(tmpList[i], tmpList[i]); // temp here
|
||||
QString tmp = obj.getDirList();
|
||||
dropDownDirList = tmp.split(";");
|
||||
for (int i = 0; i < dropDownDirList.size(); i++)
|
||||
ui->dirDropDownList->addItem(dropDownDirList[i], dropDownDirList[i]); // temp here
|
||||
|
||||
// add widgets to the window
|
||||
setupWidgets();
|
||||
|
@ -75,10 +77,8 @@ MainWindow::~MainWindow()
|
|||
delete m_infoWindow;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// functions
|
||||
|
||||
void MainWindow::setupWidgets()
|
||||
{
|
||||
// Ogl Viewer
|
||||
|
@ -219,7 +219,6 @@ void MainWindow::open(QString fileName)
|
|||
emit loadFile(fileName);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::takeScreenShot()
|
||||
{
|
||||
QString destination = QFileDialog::getSaveFileName(this, "Save as...", "", "PNG (*.png);; BMP (*.bmp);;TIFF (*.tiff, *.tif);;JPEG (*.jpg *jpeg)");
|
||||
|
|
Loading…
Reference in New Issue