Gui: do not include generated ui file inside header file
This commit is contained in:
@@ -22,6 +22,9 @@
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QVBoxLayout>
|
||||
#endif
|
||||
|
||||
#include "PropertyPage.h"
|
||||
#include "PrefWidgets.h"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef _PreComp_
|
||||
# include <algorithm>
|
||||
# include <limits>
|
||||
# include <QApplication>
|
||||
# include <QVBoxLayout>
|
||||
#endif
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "DlgExpressionInput.h"
|
||||
#include "QuantitySpinBox_p.h"
|
||||
#include "Tools.h"
|
||||
#include "ui_DlgTreeWidget.h"
|
||||
|
||||
using namespace Gui;
|
||||
using namespace App;
|
||||
@@ -526,8 +527,9 @@ void ClearLineEdit::updateClearButton(const QString& text)
|
||||
*/
|
||||
CheckListDialog::CheckListDialog( QWidget* parent, Qt::WindowFlags fl )
|
||||
: QDialog( parent, fl )
|
||||
, ui(new Ui_DlgTreeWidget)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -544,7 +546,7 @@ CheckListDialog::~CheckListDialog()
|
||||
void CheckListDialog::setCheckableItems( const QStringList& items )
|
||||
{
|
||||
for ( QStringList::ConstIterator it = items.begin(); it != items.end(); ++it ) {
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui.treeWidget);
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeWidget);
|
||||
item->setText(0, *it);
|
||||
item->setCheckState(0, Qt::Unchecked);
|
||||
}
|
||||
@@ -557,7 +559,7 @@ void CheckListDialog::setCheckableItems( const QStringList& items )
|
||||
void CheckListDialog::setCheckableItems( const QList<CheckListItem>& items )
|
||||
{
|
||||
for ( QList<CheckListItem>::ConstIterator it = items.begin(); it != items.end(); ++it ) {
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui.treeWidget);
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeWidget);
|
||||
item->setText(0, (*it).first);
|
||||
item->setCheckState(0, ( (*it).second ? Qt::Checked : Qt::Unchecked));
|
||||
}
|
||||
@@ -576,7 +578,7 @@ QStringList CheckListDialog::getCheckedItems() const
|
||||
*/
|
||||
void CheckListDialog::accept ()
|
||||
{
|
||||
QTreeWidgetItemIterator it(ui.treeWidget, QTreeWidgetItemIterator::Checked);
|
||||
QTreeWidgetItemIterator it(ui->treeWidget, QTreeWidgetItemIterator::Checked);
|
||||
while (*it) {
|
||||
checked.push_back((*it)->text(0));
|
||||
++it;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef GUI_WIDGETS_H
|
||||
#define GUI_WIDGETS_H
|
||||
|
||||
#include <Gui/ui_DlgTreeWidget.h>
|
||||
#include <QDialog>
|
||||
#include <QListWidget>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
@@ -36,7 +36,16 @@
|
||||
#include <QToolButton>
|
||||
#include <QModelIndex>
|
||||
#include "ExpressionBinding.h"
|
||||
#include "Base/Parameter.h"
|
||||
#include <Base/Parameter.h>
|
||||
#include <memory>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
|
||||
class QGridLayout;
|
||||
class QVBoxLayout;
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
class QSpacerItem;
|
||||
|
||||
namespace Gui {
|
||||
class PrefCheckBox;
|
||||
@@ -164,6 +173,7 @@ private:
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
typedef QPair<QString, bool> CheckListItem;
|
||||
class Ui_DlgTreeWidget;
|
||||
|
||||
/**
|
||||
* The CheckListDialog class provides a dialog with a QListView with
|
||||
@@ -187,7 +197,7 @@ public:
|
||||
|
||||
private:
|
||||
QStringList checked;
|
||||
Ui_DlgTreeWidget ui;
|
||||
std::unique_ptr<Ui_DlgTreeWidget> ui;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QApplication>
|
||||
# include <QMenu>
|
||||
# include <QMessageBox>
|
||||
#endif
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#include <cmath>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGraphicsScene>
|
||||
#include <QMouseEvent>
|
||||
#include <QGraphicsSceneHoverEvent>
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <QPainter>
|
||||
#include <QString>
|
||||
#include <QTextOption>
|
||||
#include <QVBoxLayout>
|
||||
#include <sstream>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user