forked from teamnwah/openmw-tes3coop
added filter box and basic record filter UI (not functional yet; only supporting on-the-fly filters for now)
This commit is contained in:
parent
f5b06d5d52
commit
789a66eaa7
6 changed files with 83 additions and 1 deletions
|
@ -116,7 +116,7 @@ opencs_hdrs_noqt (model/filter
|
||||||
)
|
)
|
||||||
|
|
||||||
opencs_units (view/filter
|
opencs_units (view/filter
|
||||||
filtercreator
|
filtercreator filterbox recordfilterbox
|
||||||
)
|
)
|
||||||
|
|
||||||
set (OPENCS_US
|
set (OPENCS_US
|
||||||
|
|
18
apps/opencs/view/filter/filterbox.cpp
Normal file
18
apps/opencs/view/filter/filterbox.cpp
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
|
||||||
|
#include "filterbox.hpp"
|
||||||
|
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
|
||||||
|
#include "recordfilterbox.hpp"
|
||||||
|
|
||||||
|
CSVFilter::FilterBox::FilterBox (QWidget *parent)
|
||||||
|
: QWidget (parent)
|
||||||
|
{
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout (this);
|
||||||
|
|
||||||
|
layout->setContentsMargins (0, 0, 0, 0);
|
||||||
|
|
||||||
|
layout->addWidget (new RecordFilterBox (this));
|
||||||
|
|
||||||
|
setLayout (layout);
|
||||||
|
}
|
19
apps/opencs/view/filter/filterbox.hpp
Normal file
19
apps/opencs/view/filter/filterbox.hpp
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#ifndef CSV_FILTER_FILTERBOX_H
|
||||||
|
#define CSV_FILTER_FILTERBOX_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace CSVFilter
|
||||||
|
{
|
||||||
|
class FilterBox : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
FilterBox (QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
20
apps/opencs/view/filter/recordfilterbox.cpp
Normal file
20
apps/opencs/view/filter/recordfilterbox.cpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
#include "recordfilterbox.hpp"
|
||||||
|
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
CSVFilter::RecordFilterBox::RecordFilterBox (QWidget *parent)
|
||||||
|
: QWidget (parent)
|
||||||
|
{
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout (this);
|
||||||
|
|
||||||
|
layout->setContentsMargins (0, 0, 0, 0);
|
||||||
|
|
||||||
|
layout->addWidget (new QLabel ("Record Filter", this));
|
||||||
|
|
||||||
|
layout->addWidget (new QLineEdit (this));
|
||||||
|
|
||||||
|
setLayout (layout);
|
||||||
|
}
|
21
apps/opencs/view/filter/recordfilterbox.hpp
Normal file
21
apps/opencs/view/filter/recordfilterbox.hpp
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#ifndef CSV_FILTER_RECORDFILTERBOX_H
|
||||||
|
#define CSV_FILTER_RECORDFILTERBOX_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
|
||||||
|
namespace CSVFilter
|
||||||
|
{
|
||||||
|
class RecordFilterBox : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
RecordFilterBox (QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#include "../../model/doc/document.hpp"
|
#include "../../model/doc/document.hpp"
|
||||||
|
|
||||||
|
#include "../filter/filterbox.hpp"
|
||||||
|
|
||||||
#include "table.hpp"
|
#include "table.hpp"
|
||||||
#include "tablebottombox.hpp"
|
#include "tablebottombox.hpp"
|
||||||
#include "creator.hpp"
|
#include "creator.hpp"
|
||||||
|
@ -23,6 +25,8 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
||||||
layout->insertWidget (0, mTable =
|
layout->insertWidget (0, mTable =
|
||||||
new Table (id, document.getData(), document.getUndoStack(), mBottom->canCreateAndDelete()), 2);
|
new Table (id, document.getData(), document.getUndoStack(), mBottom->canCreateAndDelete()), 2);
|
||||||
|
|
||||||
|
layout->insertWidget (0, new CSVFilter::FilterBox (this));
|
||||||
|
|
||||||
QWidget *widget = new QWidget;
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
widget->setLayout (layout);
|
widget->setLayout (layout);
|
||||||
|
|
Loading…
Reference in a new issue