Upload missing files.

Fix folder name.
Keep Qt optional.
Move open dialogue from doc to tools.
Rename 'load' to 'open'.
Deleted wrong comment.
actorid
Michal Sciubidlo 12 years ago
parent 492482de7f
commit 155cca0c9a

@ -8,7 +8,7 @@
#include <components/files/configurationmanager.hpp>
#include <components/files/ogreplugin.hpp>
#include <components/settings/settings.hpp>
#include <components/file_order_list/utils/naturalsort.hpp>
#include <components/fileorderlist/utils/naturalsort.hpp>
#include "graphicspage.hpp"

@ -1,6 +1,6 @@
#include <QtGui>
#include <components/file_order_list/datafileslist.hpp>
#include <components/fileorderlist/datafileslist.hpp>
#include "maindialog.hpp"
#include "playpage.hpp"

@ -12,12 +12,12 @@ set (OPENCS_SRC
model/tools/mandatoryid.cpp model/tools/reportmodel.cpp
view/doc/viewmanager.cpp view/doc/view.cpp view/doc/operations.cpp view/doc/operation.cpp view/doc/subviewfactory.cpp
view/doc/subview.cpp
view/doc/subview.cpp view/doc/opendialog.cpp
view/world/table.cpp view/world/tablesubview.cpp view/world/subviews.cpp view/world/util.cpp
view/world/dialoguesubview.cpp
view/tools/reportsubview.cpp view/tools/subviews.cpp view/tools/opendialog.cpp
view/tools/reportsubview.cpp view/tools/subviews.cpp
)
set (OPENCS_HDR
@ -33,12 +33,12 @@ set (OPENCS_HDR
model/tools/mandatoryid.hpp model/tools/reportmodel.hpp
view/doc/viewmanager.hpp view/doc/view.hpp view/doc/operations.hpp view/doc/operation.hpp view/doc/subviewfactory.hpp
view/doc/subview.hpp view/doc/subviewfactoryimp.hpp
view/doc/subview.hpp view/doc/subviewfactoryimp.hpp view/doc/opendialog.hpp
view/world/table.hpp view/world/tablesubview.hpp view/world/subviews.hpp view/world/util.hpp
view/world/dialoguesubview.hpp
view/tools/reportsubview.hpp view/tools/subviews.hpp view/tools/opendialog.hpp
view/tools/reportsubview.hpp view/tools/subviews.hpp
)
set (OPENCS_US

@ -0,0 +1,27 @@
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <components/fileorderlist/datafileslist.hpp>
#include "opendialog.hpp"
OpenDialog::OpenDialog(QWidget * parent) : QDialog(parent)
{
QVBoxLayout *layout = new QVBoxLayout(this);
mFileSelector = new DataFilesList(mCfgMgr, this);
layout->addWidget(mFileSelector);
mFileSelector->setupDataFiles();
buttonBox = new QDialogButtonBox(QDialogButtonBox::Open | QDialogButtonBox::Cancel, Qt::Horizontal, this);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
layout->addWidget(buttonBox);
setLayout(layout);
setWindowTitle(tr("Open"));
}
void OpenDialog::getFileList(std::vector<boost::filesystem::path>& paths)
{
mFileSelector->getSelectedFiles(paths);
}

@ -0,0 +1,17 @@
#include <qdialog.h>
#include <components/files/configurationmanager.hpp>
class DataFilesList;
class QDialogButtonBox;
class OpenDialog : public QDialog {
Q_OBJECT
public:
OpenDialog(QWidget * parent = 0);
void getFileList(std::vector<boost::filesystem::path>& paths);
private:
DataFilesList * mFileSelector;
QDialogButtonBox * buttonBox;
Files::ConfigurationManager mCfgMgr;
};

@ -14,8 +14,7 @@
#include "../tools/subviews.hpp"
#include "../tools/opendialog.hpp"
#include "opendialog.hpp"
#include "viewmanager.hpp"
#include "operations.hpp"
#include "subview.hpp"
@ -34,9 +33,9 @@ void CSVDoc::View::setupFileMenu()
connect (new_, SIGNAL (triggered()), this, SIGNAL (newDocumentRequest()));
file->addAction (new_);
mLoad = new QAction(tr ("&Load"), this);
connect (mLoad, SIGNAL (triggered()), this, SLOT (load()));
file->addAction (mLoad);
mOpen = new QAction(tr ("&Open"), this);
connect (mOpen, SIGNAL (triggered()), this, SLOT (open()));
file->addAction (mOpen);
mSave = new QAction (tr ("&Save"), this);
connect (mSave, SIGNAL (triggered()), this, SLOT (save()));
@ -211,11 +210,11 @@ void CSVDoc::View::save()
mDocument->save();
}
void CSVDoc::View::load()
void CSVDoc::View::open()
{
if (!mOpenDialog) {
mOpenDialog = new OpenDialog(this);
connect(mOpenDialog, SIGNAL(accepted()), this, SLOT(loadNewFiles()));
connect(mOpenDialog, SIGNAL(accepted()), this, SLOT(openNewFiles()));
}
mOpenDialog->show();
@ -223,9 +222,8 @@ void CSVDoc::View::load()
mOpenDialog->activateWindow();
}
void CSVDoc::View::loadNewFiles()
void CSVDoc::View::openNewFiles()
{
//FIXME close old files
std::vector<boost::filesystem::path> paths;
mOpenDialog->getFileList(paths);
//FIXME load new files

@ -37,7 +37,7 @@ namespace CSVDoc
QAction *mUndo;
QAction *mRedo;
QAction *mSave;
QAction *mLoad;
QAction *mOpen;
QAction *mVerify;
std::vector<QAction *> mEditingActions;
Operations *mOperations;
@ -95,8 +95,8 @@ namespace CSVDoc
void newView();
void load();
void loadNewFiles();
void open();
void openNewFiles();
void save();
void verify();

@ -66,15 +66,17 @@ add_component_dir (translation
translation
)
add_component_qt_dir (file_order_list
datafileslist model/modelitem model/datafilesmodel model/esm/esmfile
utils/filedialog utils/lineedit utils/profilescombobox utils/textinputdialog utils/naturalsort
)
find_package(Qt4 COMPONENTS QtCore QtGui)
find_package(Qt4 COMPONENTS QtCore QtGUI REQUIRED)
include(${QT_USE_FILE})
if(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
add_component_qt_dir (fileorderlist
datafileslist model/modelitem model/datafilesmodel model/esm/esmfile
utils/filedialog utils/lineedit utils/profilescombobox utils/textinputdialog utils/naturalsort
)
QT4_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES})
include(${QT_USE_FILE})
QT4_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES})
endif(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
include_directories(${BULLET_INCLUDE_DIRS})

Loading…
Cancel
Save