Fix several clazy issues:
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify] * Use Q_ENUM instead of Q_ENUMS [-Wclazy-qenums] * Add missing a Q_OBJECT macro [-Wclazy-missing-qobject-macro] * Signal/Slot arguments need to be fully-qualified [-Wclazy-fully-qualified-moc-types]
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QMessageBox>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
namespace Gui {
|
||||
namespace Dialog {
|
||||
@@ -46,13 +47,13 @@ struct DlgCheckableMessageBoxPrivate;
|
||||
class GuiExport DlgCheckableMessageBox : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString text READ text WRITE setText)
|
||||
Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap)
|
||||
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked)
|
||||
Q_PROPERTY(QString text READ text WRITE setText) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QPixmap iconPixmap READ iconPixmap WRITE setIconPixmap) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked) // clazy:exclude=qproperty-without-notify
|
||||
//Q_PROPERTY(QString prefEntry WRITE setPrefEntry) // Must have a READ accessor!
|
||||
Q_PROPERTY(QString checkBoxText READ checkBoxText WRITE setCheckBoxText)
|
||||
Q_PROPERTY(QDialogButtonBox::StandardButtons buttons READ standardButtons WRITE setStandardButtons)
|
||||
Q_PROPERTY(QDialogButtonBox::StandardButton defaultButton READ defaultButton WRITE setDefaultButton)
|
||||
Q_PROPERTY(QString checkBoxText READ checkBoxText WRITE setCheckBoxText) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QDialogButtonBox::StandardButtons buttons READ standardButtons WRITE setStandardButtons) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QDialogButtonBox::StandardButton defaultButton READ defaultButton WRITE setDefaultButton) // clazy:exclude=qproperty-without-notify
|
||||
public:
|
||||
explicit DlgCheckableMessageBox(QWidget *parent);
|
||||
virtual ~DlgCheckableMessageBox();
|
||||
@@ -82,40 +83,40 @@ public:
|
||||
QString checkBoxText() const;
|
||||
void setCheckBoxText(const QString &);
|
||||
|
||||
QDialogButtonBox::StandardButtons standardButtons() const;
|
||||
void setStandardButtons(QDialogButtonBox::StandardButtons s);
|
||||
QDialogButtonBox::StandardButtons standardButtons() const;
|
||||
void setStandardButtons(QDialogButtonBox::StandardButtons s);
|
||||
|
||||
QDialogButtonBox::StandardButton defaultButton() const;
|
||||
void setDefaultButton(QDialogButtonBox::StandardButton s);
|
||||
QDialogButtonBox::StandardButton defaultButton() const;
|
||||
void setDefaultButton(QDialogButtonBox::StandardButton s);
|
||||
|
||||
// see static QMessageBox::standardPixmap()
|
||||
QPixmap iconPixmap() const;
|
||||
void setIconPixmap (const QPixmap &p);
|
||||
|
||||
// Query the result
|
||||
QAbstractButton *clickedButton() const;
|
||||
QDialogButtonBox::StandardButton clickedStandardButton() const;
|
||||
// Query the result
|
||||
QAbstractButton *clickedButton() const;
|
||||
QDialogButtonBox::StandardButton clickedStandardButton() const;
|
||||
|
||||
// Conversion convenience
|
||||
static QMessageBox::StandardButton dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton);
|
||||
// Conversion convenience
|
||||
static QMessageBox::StandardButton dialogButtonBoxToMessageBoxButton(QDialogButtonBox::StandardButton);
|
||||
|
||||
/// convenient show method
|
||||
/// It shows a dialog with header and message provided and a checkbox in check state with the message provided.
|
||||
/// It uses a parameter in path "User parameter:BaseApp/CheckMessages" derived from the header test, defaulting to false,
|
||||
/// to store the status of the checkbox, when the user exits the modal dialog.
|
||||
static void showMessage(const QString& header, const QString& message, bool check = false, const QString& checkText = QString::fromLatin1("Don't show me again"));
|
||||
/// convenient show method
|
||||
/// It shows a dialog with header and message provided and a checkbox in check state with the message provided.
|
||||
/// It uses a parameter in path "User parameter:BaseApp/CheckMessages" derived from the header test, defaulting to false,
|
||||
/// to store the status of the checkbox, when the user exits the modal dialog.
|
||||
static void showMessage(const QString& header, const QString& message, bool check = false, const QString& checkText = QString::fromLatin1("Don't show me again"));
|
||||
|
||||
/// Same as showMessage above, but it checks the specific preference path and parameter provided, defaulting to entryDefault value if the parameter is not present.
|
||||
static void showMessage(const QString& header, const QString& message, const QString& prefPath, const QString& paramEntry, bool entryDefault = false,
|
||||
bool check = false, const QString& checkText = QString::fromLatin1("Don't show me again"));
|
||||
/// Same as showMessage above, but it checks the specific preference path and parameter provided, defaulting to entryDefault value if the parameter is not present.
|
||||
static void showMessage(const QString& header, const QString& message, const QString& prefPath, const QString& paramEntry, bool entryDefault = false,
|
||||
bool check = false, const QString& checkText = QString::fromLatin1("Don't show me again"));
|
||||
|
||||
private Q_SLOTS:
|
||||
void slotClicked(QAbstractButton *b);
|
||||
void slotClicked(QAbstractButton *b);
|
||||
|
||||
private:
|
||||
DlgCheckableMessageBoxPrivate *m_d;
|
||||
QByteArray paramEntry;
|
||||
QString prefPath;
|
||||
DlgCheckableMessageBoxPrivate *m_d;
|
||||
QByteArray paramEntry;
|
||||
QString prefPath;
|
||||
};
|
||||
|
||||
} // namespace Dialog
|
||||
|
||||
@@ -186,7 +186,7 @@ protected Q_SLOTS:
|
||||
* @note We need to reimplement this method as QTreeWidgetItem::flags()
|
||||
* doesn't have an int parameter.
|
||||
*/
|
||||
bool edit ( const QModelIndex & index, EditTrigger trigger, QEvent * event );
|
||||
bool edit ( const QModelIndex & index, QAbstractItemView::EditTrigger trigger, QEvent * event );
|
||||
|
||||
private:
|
||||
QMenu* menuEdit;
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
|
||||
Q_SIGNALS:
|
||||
/// sends a message to the document
|
||||
void sendCloseView(MDIView* theView);
|
||||
void sendCloseView(Gui::MDIView* theView);
|
||||
};
|
||||
|
||||
} // namespace Gui
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QUrl>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
|
||||
class AutoSaver;
|
||||
@@ -43,8 +44,6 @@ class Ui_DownloadManager;
|
||||
class GuiExport DownloadManager : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy)
|
||||
Q_ENUMS(RemovePolicy)
|
||||
|
||||
public:
|
||||
enum RemovePolicy {
|
||||
@@ -53,6 +52,10 @@ public:
|
||||
SuccessFullDownload
|
||||
};
|
||||
|
||||
Q_PROPERTY(RemovePolicy removePolicy READ removePolicy WRITE setRemovePolicy) // clazy:exclude=qproperty-without-notify
|
||||
Q_ENUM(RemovePolicy)
|
||||
|
||||
public:
|
||||
static DownloadManager* getInstance();
|
||||
|
||||
private:
|
||||
|
||||
@@ -766,6 +766,15 @@ void FileChooser::chooseFile()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the accept mode.
|
||||
*/
|
||||
void FileChooser::setAcceptMode(FileChooser::AcceptMode mode)
|
||||
{
|
||||
accMode = mode;
|
||||
Q_EMIT acceptModeChanged(accMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* \property FileChooser::mode
|
||||
*
|
||||
@@ -786,6 +795,7 @@ FileChooser::Mode FileChooser::mode() const
|
||||
void FileChooser::setMode( FileChooser::Mode m )
|
||||
{
|
||||
md = m;
|
||||
Q_EMIT modeChanged(md);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -807,6 +817,7 @@ QString FileChooser::filter() const
|
||||
void FileChooser::setFilter ( const QString& filter )
|
||||
{
|
||||
_filter = filter;
|
||||
Q_EMIT filterChanged(_filter);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -818,6 +829,7 @@ void FileChooser::setButtonText( const QString& txt )
|
||||
int w1 = 2 * QtTools::horizontalAdvance(button->fontMetrics(), txt);
|
||||
int w2 = 2 * QtTools::horizontalAdvance(button->fontMetrics(), QLatin1String(" ... "));
|
||||
button->setFixedWidth( (w1 > w2 ? w1 : w2) );
|
||||
Q_EMIT buttonTextChanged(txt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -152,18 +152,19 @@ class GuiExport FileChooser : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_ENUMS( Mode )
|
||||
Q_PROPERTY( Mode mode READ mode WRITE setMode )
|
||||
Q_ENUMS( AcceptMode )
|
||||
Q_PROPERTY( AcceptMode acceptMode READ acceptMode WRITE setAcceptMode )
|
||||
Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
|
||||
Q_PROPERTY( QString filter READ filter WRITE setFilter )
|
||||
Q_PROPERTY( QString buttonText READ buttonText WRITE setButtonText )
|
||||
|
||||
public:
|
||||
enum Mode { File, Directory };
|
||||
enum AcceptMode { AcceptOpen, AcceptSave };
|
||||
|
||||
Q_ENUM( Mode )
|
||||
Q_PROPERTY(Mode mode READ mode WRITE setMode NOTIFY modeChanged)
|
||||
Q_ENUM( AcceptMode )
|
||||
Q_PROPERTY(AcceptMode acceptMode READ acceptMode WRITE setAcceptMode NOTIFY acceptModeChanged)
|
||||
Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
|
||||
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
|
||||
Q_PROPERTY(QString buttonText READ buttonText WRITE setButtonText NOTIFY buttonTextChanged)
|
||||
|
||||
public:
|
||||
FileChooser ( QWidget * parent = nullptr );
|
||||
virtual ~FileChooser();
|
||||
|
||||
@@ -191,9 +192,7 @@ public:
|
||||
/**
|
||||
* Sets the accept mode.
|
||||
*/
|
||||
void setAcceptMode(AcceptMode mode) {
|
||||
accMode = mode;
|
||||
}
|
||||
void setAcceptMode(AcceptMode mode);
|
||||
/**
|
||||
* Returns the accept mode.
|
||||
*/
|
||||
@@ -203,13 +202,17 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void setFileName( const QString &fn );
|
||||
virtual void setMode( Mode m );
|
||||
virtual void setMode( Gui::FileChooser::Mode m );
|
||||
virtual void setFilter ( const QString & );
|
||||
virtual void setButtonText ( const QString & );
|
||||
|
||||
Q_SIGNALS:
|
||||
void fileNameChanged( const QString & );
|
||||
void fileNameSelected( const QString & );
|
||||
void filterChanged(const QString&);
|
||||
void buttonTextChanged(const QString&);
|
||||
void modeChanged(Gui::FileChooser::Mode);
|
||||
void acceptModeChanged(Gui::FileChooser::AcceptMode);
|
||||
|
||||
private Q_SLOTS:
|
||||
void chooseFile();
|
||||
|
||||
@@ -59,18 +59,18 @@ class GuiExport InputField : public ExpressionLineEdit, public ExpressionBinding
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY(double singleStep READ singleStep WRITE setSingleStep )
|
||||
Q_PROPERTY(double maximum READ maximum WRITE setMaximum )
|
||||
Q_PROPERTY(double minimum READ minimum WRITE setMinimum )
|
||||
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double singleStep READ singleStep WRITE setSingleStep ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double maximum READ maximum WRITE setMaximum ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double minimum READ minimum WRITE setMinimum ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double rawValue READ rawValue WRITE setValue NOTIFY valueChanged)
|
||||
Q_PROPERTY(int historySize READ historySize WRITE setHistorySize )
|
||||
Q_PROPERTY(QString unit READ getUnitText WRITE setUnitText )
|
||||
Q_PROPERTY(int precision READ getPrecision WRITE setPrecision )
|
||||
Q_PROPERTY(QString format READ getFormat WRITE setFormat )
|
||||
Q_PROPERTY(Base::Quantity quantity READ getQuantity WRITE setValue )
|
||||
Q_PROPERTY(QString quantityString READ getQuantityString WRITE setQuantityString )
|
||||
Q_PROPERTY(QString rawText READ rawText WRITE setRawText )
|
||||
Q_PROPERTY(int historySize READ historySize WRITE setHistorySize ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QString unit READ getUnitText WRITE setUnitText ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(int precision READ getPrecision WRITE setPrecision ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QString format READ getFormat WRITE setFormat ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(Base::Quantity quantity READ getQuantity WRITE setValue NOTIFY valueChanged)
|
||||
Q_PROPERTY(QString quantityString READ getQuantityString WRITE setQuantityString ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QString rawText READ rawText WRITE setRawText ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -165,7 +165,7 @@ protected Q_SLOTS:
|
||||
* whenever the window state of the active view changes.
|
||||
* The default implementation does nothing.
|
||||
*/
|
||||
virtual void windowStateChanged(MDIView*);
|
||||
virtual void windowStateChanged(Gui::MDIView*);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *e);
|
||||
|
||||
@@ -320,7 +320,7 @@ private Q_SLOTS:
|
||||
|
||||
Q_SIGNALS:
|
||||
void timeEvent();
|
||||
void windowStateChanged(MDIView*);
|
||||
void windowStateChanged(Gui::MDIView*);
|
||||
void workbenchActivated(const QString&);
|
||||
void mainWindowClosed();
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ class GuiExport PrefSpinBox : public QSpinBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefSpinBox ( QWidget * parent = nullptr );
|
||||
@@ -133,8 +133,8 @@ class GuiExport PrefDoubleSpinBox : public QDoubleSpinBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefDoubleSpinBox ( QWidget * parent = nullptr );
|
||||
@@ -154,8 +154,8 @@ class GuiExport PrefLineEdit : public QLineEdit, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefLineEdit ( QWidget * parent = nullptr );
|
||||
@@ -175,8 +175,8 @@ class GuiExport PrefTextEdit : public QTextEdit, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QByteArray prefEntry READ entryName WRITE setEntryName)
|
||||
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath)
|
||||
Q_PROPERTY(QByteArray prefEntry READ entryName WRITE setEntryName) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefTextEdit(QWidget* parent = nullptr);
|
||||
@@ -196,8 +196,8 @@ class GuiExport PrefFileChooser : public FileChooser, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefFileChooser ( QWidget * parent = nullptr );
|
||||
@@ -217,8 +217,8 @@ class GuiExport PrefComboBox : public QComboBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefComboBox ( QWidget * parent = nullptr );
|
||||
@@ -238,8 +238,8 @@ class GuiExport PrefCheckBox : public QCheckBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefCheckBox ( QWidget * parent = nullptr );
|
||||
@@ -259,8 +259,8 @@ class GuiExport PrefRadioButton : public QRadioButton, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefRadioButton ( QWidget * parent = nullptr );
|
||||
@@ -280,8 +280,8 @@ class GuiExport PrefSlider : public QSlider, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefSlider ( QWidget * parent = nullptr );
|
||||
@@ -301,8 +301,8 @@ class GuiExport PrefColorButton : public ColorButton, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefColorButton ( QWidget * parent = nullptr );
|
||||
@@ -323,8 +323,8 @@ class GuiExport PrefUnitSpinBox : public QuantitySpinBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefUnitSpinBox ( QWidget * parent = nullptr );
|
||||
@@ -346,9 +346,9 @@ class GuiExport PrefQuantitySpinBox : public QuantitySpinBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QByteArray prefEntry READ entryName WRITE setEntryName)
|
||||
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath)
|
||||
Q_PROPERTY(int historySize READ historySize WRITE setHistorySize)
|
||||
Q_PROPERTY(QByteArray prefEntry READ entryName WRITE setEntryName) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(int historySize READ historySize WRITE setHistorySize) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefQuantitySpinBox (QWidget * parent = nullptr);
|
||||
@@ -388,8 +388,8 @@ class GuiExport PrefFontBox : public QFontComboBox, public PrefWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName )
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath )
|
||||
Q_PROPERTY( QByteArray prefEntry READ entryName WRITE setEntryName ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( QByteArray prefPath READ paramGrpPath WRITE setParamGrpPath ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PrefFontBox ( QWidget * parent = nullptr );
|
||||
|
||||
@@ -163,8 +163,8 @@ class QSINT_EXPORT ActionBox : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QPixmap icon READ icon WRITE setIcon)
|
||||
Q_PROPERTY(ActionLabel header READ header)
|
||||
Q_PROPERTY(QPixmap icon READ icon WRITE setIcon) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(ActionLabel header READ header) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
/** Constructor.
|
||||
|
||||
@@ -36,9 +36,9 @@ class QSINT_EXPORT ActionGroup : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(bool expandable READ isExpandable WRITE setExpandable)
|
||||
Q_PROPERTY(bool header READ hasHeader WRITE setHeader)
|
||||
Q_PROPERTY(QString headerText READ headerText WRITE setHeaderText)
|
||||
Q_PROPERTY(bool expandable READ isExpandable WRITE setExpandable) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool header READ hasHeader WRITE setHeader) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QString headerText READ headerText WRITE setHeaderText) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
/** Constructor. Creates ActionGroup without header.
|
||||
|
||||
@@ -39,14 +39,14 @@ class GuiExport QuantitySpinBox : public QAbstractSpinBox, public ExpressionSpin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString unit READ unitText WRITE setUnitText)
|
||||
Q_PROPERTY(double minimum READ minimum WRITE setMinimum)
|
||||
Q_PROPERTY(double maximum READ maximum WRITE setMaximum)
|
||||
Q_PROPERTY(double singleStep READ singleStep WRITE setSingleStep)
|
||||
Q_PROPERTY(QString unit READ unitText WRITE setUnitText) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double minimum READ minimum WRITE setMinimum) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double maximum READ maximum WRITE setMaximum) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double singleStep READ singleStep WRITE setSingleStep) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double rawValue READ rawValue WRITE setValue NOTIFY valueChanged)
|
||||
Q_PROPERTY(Base::Quantity value READ value WRITE setValue NOTIFY valueChanged USER true)
|
||||
Q_PROPERTY(QString binding READ boundToName WRITE setBoundToByName)
|
||||
Q_PROPERTY(QString expression READ expressionText)
|
||||
Q_PROPERTY(QString binding READ boundToName WRITE setBoundToByName) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QString expression READ expressionText) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
explicit QuantitySpinBox(QWidget *parent = nullptr);
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
/**************************************************************************\
|
||||
* Copyright (c) Kongsberg Oil & Gas Technologies AS
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
*
|
||||
* Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
@@ -62,31 +62,7 @@ class QUARTER_DLL_API QuarterWidget : public QGraphicsView {
|
||||
typedef QGraphicsView inherited;
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QUrl navigationModeFile READ navigationModeFile WRITE setNavigationModeFile RESET resetNavigationModeFile)
|
||||
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
|
||||
Q_PROPERTY(bool contextMenuEnabled READ contextMenuEnabled WRITE setContextMenuEnabled)
|
||||
Q_PROPERTY(bool headlightEnabled READ headlightEnabled WRITE setHeadlightEnabled)
|
||||
Q_PROPERTY(bool clearZBuffer READ clearZBuffer WRITE setClearZBuffer)
|
||||
Q_PROPERTY(bool clearWindow READ clearWindow WRITE setClearWindow)
|
||||
Q_PROPERTY(bool interactionModeEnabled READ interactionModeEnabled WRITE setInteractionModeEnabled)
|
||||
Q_PROPERTY(bool interactionModeOn READ interactionModeOn WRITE setInteractionModeOn)
|
||||
|
||||
Q_PROPERTY(TransparencyType transparencyType READ transparencyType WRITE setTransparencyType)
|
||||
Q_PROPERTY(RenderMode renderMode READ renderMode WRITE setRenderMode)
|
||||
Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode)
|
||||
Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged)
|
||||
|
||||
Q_ENUMS(TransparencyType)
|
||||
Q_ENUMS(RenderMode)
|
||||
Q_ENUMS(StereoMode)
|
||||
|
||||
|
||||
public:
|
||||
explicit QuarterWidget(QWidget * parent = nullptr, const QtGLWidget * sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit QuarterWidget(QtGLContext * context, QWidget * parent = nullptr, const QtGLWidget * sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit QuarterWidget(const QtGLFormat & format, QWidget * parent = nullptr, const QtGLWidget * shareWidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
virtual ~QuarterWidget();
|
||||
|
||||
enum TransparencyType {
|
||||
SCREEN_DOOR = SoGLRenderAction::SCREEN_DOOR,
|
||||
ADD = SoGLRenderAction::ADD,
|
||||
@@ -118,6 +94,31 @@ public:
|
||||
INTERLEAVED_COLUMNS = SoRenderManager::INTERLEAVED_COLUMNS
|
||||
};
|
||||
|
||||
Q_PROPERTY(QUrl navigationModeFile READ navigationModeFile WRITE setNavigationModeFile RESET resetNavigationModeFile) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool contextMenuEnabled READ contextMenuEnabled WRITE setContextMenuEnabled) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool headlightEnabled READ headlightEnabled WRITE setHeadlightEnabled) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool clearZBuffer READ clearZBuffer WRITE setClearZBuffer) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool clearWindow READ clearWindow WRITE setClearWindow) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool interactionModeEnabled READ interactionModeEnabled WRITE setInteractionModeEnabled) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(bool interactionModeOn READ interactionModeOn WRITE setInteractionModeOn) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
Q_PROPERTY(TransparencyType transparencyType READ transparencyType WRITE setTransparencyType) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(RenderMode renderMode READ renderMode WRITE setRenderMode) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged)
|
||||
|
||||
Q_ENUM(TransparencyType)
|
||||
Q_ENUM(RenderMode)
|
||||
Q_ENUM(StereoMode)
|
||||
|
||||
|
||||
public:
|
||||
explicit QuarterWidget(QWidget * parent = nullptr, const QtGLWidget * sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit QuarterWidget(QtGLContext * context, QWidget * parent = nullptr, const QtGLWidget * sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit QuarterWidget(const QtGLFormat & format, QWidget * parent = nullptr, const QtGLWidget * shareWidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
virtual ~QuarterWidget();
|
||||
|
||||
TransparencyType transparencyType() const;
|
||||
RenderMode renderMode() const;
|
||||
StereoMode stereoMode() const;
|
||||
@@ -183,9 +184,9 @@ public Q_SLOTS:
|
||||
|
||||
void redraw();
|
||||
|
||||
void setRenderMode(RenderMode mode);
|
||||
void setStereoMode(StereoMode mode);
|
||||
void setTransparencyType(TransparencyType type);
|
||||
void setRenderMode(SIM::Coin3D::Quarter::QuarterWidget::RenderMode mode);
|
||||
void setStereoMode(SIM::Coin3D::Quarter::QuarterWidget::StereoMode mode);
|
||||
void setTransparencyType(SIM::Coin3D::Quarter::QuarterWidget::TransparencyType type);
|
||||
|
||||
Q_SIGNALS:
|
||||
void devicePixelRatioChanged(qreal dev_pixel_ratio);
|
||||
|
||||
@@ -756,3 +756,5 @@ SbVec2f SIM::Coin3D::Quarter::SoQTQuarterAdaptor::addFrametime(double starttime)
|
||||
this->starttime = timeofday;
|
||||
return SbVec2f(1000 * this->drawtime, 1.0f / this->frametime);
|
||||
}
|
||||
|
||||
#include "moc_SoQTQuarterAdaptor.cpp"
|
||||
|
||||
@@ -44,6 +44,8 @@ typedef void SoQTQuarterAdaptorCB(void* data, SoQTQuarterAdaptor* viewer);
|
||||
|
||||
class QUARTER_DLL_API SoQTQuarterAdaptor : public QuarterWidget {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SoQTQuarterAdaptor(QWidget* parent = nullptr, const QtGLWidget* sharewidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
explicit SoQTQuarterAdaptor(const QtGLFormat& format, QWidget* parent = nullptr, const QtGLWidget* shareWidget = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
|
||||
@@ -79,8 +79,8 @@ protected:
|
||||
class GuiExport UnsignedValidator : public QValidator
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( uint bottom READ bottom WRITE setBottom )
|
||||
Q_PROPERTY( uint top READ top WRITE setTop )
|
||||
Q_PROPERTY( uint bottom READ bottom WRITE setBottom ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( uint top READ top WRITE setTop ) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
UnsignedValidator( QObject * parent );
|
||||
|
||||
@@ -3283,7 +3283,7 @@ void View3DInventorViewer::drawAxisCross(void)
|
||||
// Find unit vector end points.
|
||||
SbMatrix px;
|
||||
glGetFloatv(GL_PROJECTION_MATRIX, (float*)px);
|
||||
SbMatrix comb = mx.multRight(px);
|
||||
SbMatrix comb = mx.multRight(px); // clazy:exclude=rule-of-two-soft
|
||||
|
||||
SbVec3f xpos;
|
||||
comb.multVecMatrix(SbVec3f(1,0,0), xpos);
|
||||
@@ -3709,3 +3709,4 @@ void View3DInventorViewer::dragLeaveEvent(QDragLeaveEvent *e)
|
||||
inherited::dragLeaveEvent(e);
|
||||
}
|
||||
|
||||
#include "moc_View3DInventorViewer.cpp"
|
||||
|
||||
@@ -80,6 +80,7 @@ class ViewerEventFilter;
|
||||
class GuiExport View3DInventorViewer : public Quarter::SoQTQuarterAdaptor, public SelectionObserver
|
||||
{
|
||||
typedef Quarter::SoQTQuarterAdaptor inherited;
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/// Pick modes for picking points in the scene
|
||||
|
||||
@@ -226,10 +226,10 @@ class GuiExport ColorButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QColor color READ color WRITE setColor )
|
||||
Q_PROPERTY( bool allowChangeColor READ allowChangeColor WRITE setAllowChangeColor )
|
||||
Q_PROPERTY( bool drawFrame READ drawFrame WRITE setDrawFrame )
|
||||
Q_PROPERTY( bool allowTransparency READ allowTransparency WRITE setAllowTransparency)
|
||||
Q_PROPERTY( QColor color READ color WRITE setColor NOTIFY changed)
|
||||
Q_PROPERTY( bool allowChangeColor READ allowChangeColor WRITE setAllowChangeColor ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( bool drawFrame READ drawFrame WRITE setDrawFrame ) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( bool allowTransparency READ allowTransparency WRITE setAllowTransparency) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
ColorButton(QWidget* parent = nullptr);
|
||||
@@ -284,8 +284,8 @@ private:
|
||||
class GuiExport UrlLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( QString url READ url WRITE setUrl)
|
||||
Q_PROPERTY( bool launchExternal READ launchExternal WRITE setLaunchExternal)
|
||||
Q_PROPERTY( QString url READ url WRITE setUrl) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY( bool launchExternal READ launchExternal WRITE setLaunchExternal) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
UrlLabel ( QWidget * parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags() );
|
||||
@@ -398,7 +398,7 @@ class GuiExport LabelButton : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QVariant value READ value WRITE setValue)
|
||||
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
|
||||
|
||||
public:
|
||||
LabelButton (QWidget * parent = nullptr);
|
||||
@@ -516,8 +516,8 @@ class GuiExport LabelEditor : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString text READ text WRITE setText )
|
||||
Q_PROPERTY(QString buttonText READ buttonText WRITE setButtonText)
|
||||
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
|
||||
Q_PROPERTY(QString buttonText READ buttonText WRITE setButtonText) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
enum InputType {String, Float, Integer};
|
||||
|
||||
@@ -62,8 +62,8 @@ class PropertyEditor : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QBrush groupBackground READ groupBackground WRITE setGroupBackground DESIGNABLE true SCRIPTABLE true)
|
||||
Q_PROPERTY(QColor groupTextColor READ groupTextColor WRITE setGroupTextColor DESIGNABLE true SCRIPTABLE true)
|
||||
Q_PROPERTY(QBrush groupBackground READ groupBackground WRITE setGroupBackground DESIGNABLE true SCRIPTABLE true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor groupTextColor READ groupTextColor WRITE setGroupTextColor DESIGNABLE true SCRIPTABLE true) // clazy:exclude=qproperty-without-notify
|
||||
|
||||
public:
|
||||
PropertyEditor(QWidget *parent = nullptr);
|
||||
|
||||
@@ -463,9 +463,9 @@ class PropertyFloatItem;
|
||||
class GuiExport PropertyVectorItem: public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(double x READ x WRITE setX DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double y READ y WRITE setY DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double z READ z WRITE setZ DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double x READ x WRITE setX DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double y READ y WRITE setY DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double z READ z WRITE setZ DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -568,9 +568,9 @@ class PropertyUnitItem;
|
||||
class GuiExport PropertyVectorDistanceItem: public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(Base::Quantity x READ x WRITE setX DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Quantity y READ y WRITE setY DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Quantity z READ z WRITE setZ DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Quantity x READ x WRITE setX DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(Base::Quantity y READ y WRITE setY DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(Base::Quantity z READ z WRITE setZ DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -615,22 +615,22 @@ class GuiExport PropertyDirectionItem: public PropertyVectorDistanceItem
|
||||
class GuiExport PropertyMatrixItem: public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(double A11 READ getA11 WRITE setA11 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A12 READ getA12 WRITE setA12 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A13 READ getA13 WRITE setA13 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A14 READ getA14 WRITE setA14 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A21 READ getA21 WRITE setA21 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A22 READ getA22 WRITE setA22 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A23 READ getA23 WRITE setA23 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A24 READ getA24 WRITE setA24 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A31 READ getA31 WRITE setA31 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A32 READ getA32 WRITE setA32 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A33 READ getA33 WRITE setA33 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A34 READ getA34 WRITE setA34 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A41 READ getA41 WRITE setA41 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A42 READ getA42 WRITE setA42 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A43 READ getA43 WRITE setA43 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A44 READ getA44 WRITE setA44 DESIGNABLE true USER true)
|
||||
Q_PROPERTY(double A11 READ getA11 WRITE setA11 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A12 READ getA12 WRITE setA12 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A13 READ getA13 WRITE setA13 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A14 READ getA14 WRITE setA14 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A21 READ getA21 WRITE setA21 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A22 READ getA22 WRITE setA22 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A23 READ getA23 WRITE setA23 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A24 READ getA24 WRITE setA24 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A31 READ getA31 WRITE setA31 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A32 READ getA32 WRITE setA32 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A33 READ getA33 WRITE setA33 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A34 READ getA34 WRITE setA34 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A41 READ getA41 WRITE setA41 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A42 READ getA42 WRITE setA42 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A43 READ getA43 WRITE setA43 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(double A44 READ getA44 WRITE setA44 DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -727,8 +727,8 @@ private:
|
||||
class GuiExport PropertyRotationItem: public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(Base::Quantity Angle READ getAngle WRITE setAngle DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Vector3d Axis READ getAxis WRITE setAxis DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Quantity Angle READ getAngle WRITE setAngle DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(Base::Vector3d Axis READ getAxis WRITE setAxis DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -784,9 +784,9 @@ private:
|
||||
class GuiExport PropertyPlacementItem: public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(Base::Quantity Angle READ getAngle WRITE setAngle DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Vector3d Axis READ getAxis WRITE setAxis DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Vector3d Position READ getPosition WRITE setPosition DESIGNABLE true USER true)
|
||||
Q_PROPERTY(Base::Quantity Angle READ getAngle WRITE setAngle DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(Base::Vector3d Axis READ getAxis WRITE setAxis DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(Base::Vector3d Position READ getPosition WRITE setPosition DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -827,7 +827,7 @@ class PropertyStringListItem;
|
||||
class GuiExport PropertyEnumItem: public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QStringList Enum READ getEnum WRITE setEnum DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QStringList Enum READ getEnum WRITE setEnum DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -957,12 +957,12 @@ protected:
|
||||
class GuiExport PropertyMaterialItem : public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor AmbientColor READ getAmbientColor WRITE setAmbientColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor DiffuseColor READ getDiffuseColor WRITE setDiffuseColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor SpecularColor READ getSpecularColor WRITE setSpecularColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor EmissiveColor READ getEmissiveColor WRITE setEmissiveColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(float Shininess READ getShininess WRITE setShininess DESIGNABLE true USER true)
|
||||
Q_PROPERTY(float Transparency READ getTransparency WRITE setTransparency DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor AmbientColor READ getAmbientColor WRITE setAmbientColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor DiffuseColor READ getDiffuseColor WRITE setDiffuseColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor SpecularColor READ getSpecularColor WRITE setSpecularColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor EmissiveColor READ getEmissiveColor WRITE setEmissiveColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(float Shininess READ getShininess WRITE setShininess DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(float Transparency READ getTransparency WRITE setTransparency DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
@@ -1006,12 +1006,12 @@ private:
|
||||
class GuiExport PropertyMaterialListItem : public PropertyItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor AmbientColor READ getAmbientColor WRITE setAmbientColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor DiffuseColor READ getDiffuseColor WRITE setDiffuseColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor SpecularColor READ getSpecularColor WRITE setSpecularColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor EmissiveColor READ getEmissiveColor WRITE setEmissiveColor DESIGNABLE true USER true)
|
||||
Q_PROPERTY(float Shininess READ getShininess WRITE setShininess DESIGNABLE true USER true)
|
||||
Q_PROPERTY(float Transparency READ getTransparency WRITE setTransparency DESIGNABLE true USER true)
|
||||
Q_PROPERTY(QColor AmbientColor READ getAmbientColor WRITE setAmbientColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor DiffuseColor READ getDiffuseColor WRITE setDiffuseColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor SpecularColor READ getSpecularColor WRITE setSpecularColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(QColor EmissiveColor READ getEmissiveColor WRITE setEmissiveColor DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(float Shininess READ getShininess WRITE setShininess DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
Q_PROPERTY(float Transparency READ getTransparency WRITE setTransparency DESIGNABLE true USER true) // clazy:exclude=qproperty-without-notify
|
||||
PROPERTYITEM_HEADER
|
||||
|
||||
virtual QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const;
|
||||
|
||||
@@ -204,22 +204,24 @@ private:
|
||||
|
||||
/**
|
||||
* There is a bug in QtDesigner of Qt version 4.0, 4.1 and 4.2. If a class declaration
|
||||
* is inside a namespace and it uses the Q_ENUMS macro then QtDesigner doesn't handle
|
||||
* is inside a namespace and it uses the Q_ENUM macro then QtDesigner doesn't handle
|
||||
* the enum(s) correctly in its property editor. This bug is fixed since Qt 4.3.0.
|
||||
*/
|
||||
class FileChooser : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_ENUMS( Mode )
|
||||
public:
|
||||
enum Mode { File, Directory };
|
||||
|
||||
private:
|
||||
Q_ENUM( Mode )
|
||||
Q_PROPERTY( Mode mode READ mode WRITE setMode )
|
||||
Q_PROPERTY( QString fileName READ fileName WRITE setFileName )
|
||||
Q_PROPERTY( QString filter READ filter WRITE setFilter )
|
||||
Q_PROPERTY( QString buttonText READ buttonText WRITE setButtonText )
|
||||
|
||||
public:
|
||||
enum Mode { File, Directory };
|
||||
|
||||
FileChooser (QWidget *parent = 0);
|
||||
virtual ~FileChooser();
|
||||
|
||||
@@ -231,7 +233,7 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void setFileName( const QString &fn );
|
||||
void setMode( Mode m );
|
||||
void setMode( FileChooser::Mode m );
|
||||
void setFilter ( const QString & );
|
||||
void setButtonText ( const QString & );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user