Getting dir list to the drop down field
This commit is contained in:
parent
0372a4ad8c
commit
bddc7ea852
|
@ -27,7 +27,7 @@ private:
|
||||||
|
|
||||||
FileInfoWindow* m_infoWindow;
|
FileInfoWindow* m_infoWindow;
|
||||||
QFileSystemModel* fmodel;
|
QFileSystemModel* fmodel;
|
||||||
QStringList filters;
|
QStringList filters, dropDownDirList;
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
private:
|
private:
|
||||||
|
@ -38,6 +38,7 @@ private:
|
||||||
void openFile();
|
void openFile();
|
||||||
void open(QString);
|
void open(QString);
|
||||||
void takeScreenShot();
|
void takeScreenShot();
|
||||||
|
void setDirList();
|
||||||
void aboutTool();
|
void aboutTool();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -51,10 +51,12 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
ui->dirDropDownList->addItem("BF1_ModTools", "C:/BF1_ModTools/Assets/Shipped Worlds/"); // temp here
|
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
|
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;
|
SettingsWindow obj;
|
||||||
QStringList tmpList = obj.getDirList().split(";");
|
QString tmp = obj.getDirList();
|
||||||
for (int i = 0; i < tmpList.size(); i++)
|
dropDownDirList = tmp.split(";");
|
||||||
ui->dirDropDownList->addItem(tmpList[i], tmpList[i]); // temp here
|
for (int i = 0; i < dropDownDirList.size(); i++)
|
||||||
|
ui->dirDropDownList->addItem(dropDownDirList[i], dropDownDirList[i]); // temp here
|
||||||
|
|
||||||
// add widgets to the window
|
// add widgets to the window
|
||||||
setupWidgets();
|
setupWidgets();
|
||||||
|
@ -75,10 +77,8 @@ MainWindow::~MainWindow()
|
||||||
delete m_infoWindow;
|
delete m_infoWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////
|
||||||
// functions
|
// functions
|
||||||
|
|
||||||
void MainWindow::setupWidgets()
|
void MainWindow::setupWidgets()
|
||||||
{
|
{
|
||||||
// Ogl Viewer
|
// Ogl Viewer
|
||||||
|
@ -219,7 +219,6 @@ void MainWindow::open(QString fileName)
|
||||||
emit loadFile(fileName);
|
emit loadFile(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::takeScreenShot()
|
void MainWindow::takeScreenShot()
|
||||||
{
|
{
|
||||||
QString destination = QFileDialog::getSaveFileName(this, "Save as...", "", "PNG (*.png);; BMP (*.bmp);;TIFF (*.tiff, *.tif);;JPEG (*.jpg *jpeg)");
|
QString destination = QFileDialog::getSaveFileName(this, "Save as...", "", "PNG (*.png);; BMP (*.bmp);;TIFF (*.tiff, *.tif);;JPEG (*.jpg *jpeg)");
|
||||||
|
|
Loading…
Reference in New Issue