Code Monkey home page Code Monkey logo

qtnproperty's People

Contributors

acherdantseva avatar gray-z avatar ibnz avatar kleomash avatar kmkolasinski avatar kusharami avatar lexxmark avatar madmiraal avatar niello avatar ppiecuch avatar vorlov-playrix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qtnproperty's Issues

Mouse Movement detection & Drawing rectangle in QtnProperty

Hi,
another question: Is there a possibility to change for example Float property using mouse movement, I was thinking about similar sliders like in gimp 2.8, such that one can change the value with mouse additionaly the property is filled with "progress like" bar rectangle depending on the current, min and max values of given property.
Thanks in advance.

Hello :)

As has been told on AwesomeBump github, would be good to have a "Button" property - action you could start from QtnProperty (for example "Recalculate " - as it might be some time consuming operations, should not executed immediately after parameters have been changed). I would like to implement such think - could you give recommendations how could I start with that?

Regards
Pawel

Qt 5.15.2 MinGW build error

Building the demo application with Qt 5.15.2 and MinGW 11 causes the following error

make -f Makefile.Release
make[1]: Entering directory 'C:/CodingXP/QtnProperty/build/Demo'
g++ -c -fno-keep-inline-dllexport -O2 -std=gnu++11 -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DQTN_DYNAMIC_IMPORT -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\..\Demo -I. -I..\..\..\QtnProperty -I. -I..\..\..\Qt\5.15.2\mingw81_64\include -I..\..\..\Qt\5.15.2\mingw81_64\include\QtWidgets -I..\..\..\Qt\5.15.2\mingw81_64\include\QtGui -I..\..\..\Qt\5.15.2\mingw81_64\include\QtANGLE -I..\..\..\Qt\5.15.2\mingw81_64\include\QtScript -I..\..\..\Qt\5.15.2\mingw81_64\include\QtScriptTools -I..\..\..\Qt\5.15.2\mingw81_64\include\QtCore -I. -I/include -I..\..\..\Qt\5.15.2\mingw81_64\mkspecs\win32-g++  -o release\MainWindow.o ..\..\Demo\MainWindow.cpp
..\..\Demo\MainWindow.cpp: In constructor 'MainWindow::MainWindow(QWidget*)':
..\..\Demo\MainWindow.cpp:44:56: warning: 'const QRect QDesktopWidget::availableGeometry(int) const' is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]
   44 |         move(QApplication::desktop()->availableGeometry().center() -
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from ..\..\..\Qt\5.15.2\mingw81_64\include\QtWidgets/QDesktopWidget:1,
                 from ..\..\Demo\MainWindow.cpp:5:
..\..\..\Qt\5.15.2\mingw81_64\include\QtWidgets/qdesktopwidget.h:88:67: note: declared here
   88 |     QT_DEPRECATED_X("Use QGuiApplication::screens()") const QRect availableGeometry(int screen = -1) const;
      |                                                                   ^~~~~~~~~~~~~~~~~
In file included from C:/CodingXP/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/string:48,
                 from ..\..\..\Qt\5.15.2\mingw81_64\include/QtCore/qbytearray.h:52,
                 from ..\..\..\Qt\5.15.2\mingw81_64\include/QtCore/qstring.h:50,
                 from ..\..\..\Qt\5.15.2\mingw81_64\include/QtCore/qobject.h:47,
                 from ..\..\..\Qt\5.15.2\mingw81_64\include/QtWidgets/qwidget.h:45,
                 from ..\..\..\Qt\5.15.2\mingw81_64\include\QtWidgets/qmainwindow.h:44,
                 from ..\..\..\Qt\5.15.2\mingw81_64\include\QtWidgets/QMainWindow:1,
                 from ..\..\Demo\MainWindow.h:4,
                 from ..\..\Demo\MainWindow.cpp:1:
C:/CodingXP/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/bits/stl_function.h: In instantiation of 'bool std::equal_to<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = MyColor]':
..\..\..\QtnProperty/QtnProperty/Auxiliary/PropertyTemplates.h:282:18:   required from 'bool QtnSinglePropertyBaseAs<QtnSinglePropertyBaseType, ActualValueType, EqPred>::isValueEqualImpl(QtnSinglePropertyBaseAs<QtnSinglePropertyBaseType, ActualValueType, EqPred>::ValueType) [with QtnSinglePropertyBaseType = QtnPropertyQColorBase; ActualValueType = MyColor; EqPred = std::equal_to<MyColor>; QtnSinglePropertyBaseAs<QtnSinglePropertyBaseType, ActualValueType, EqPred>::ValueType = MyColor]'
..\..\..\QtnProperty/QtnProperty/Auxiliary/PropertyTemplates.h:280:15:   required from here
C:/CodingXP/mingw1120_64/lib/gcc/x86_64-w64-mingw32/11.2.0/include/c++/bits/stl_function.h:356:20: error: no match for 'operator==' (operand types are 'const MyColor' and 'const MyColor')
  356 |       { return __x == __y; }
      |                ~~~~^~~~~~

ASSERT: "data.ptr->ref.isStatic()" in file kernel\qmetaobject.cpp, line 152 in debug mode

#include <QApplication>

#include "PropertyCore.h"
#include "PropertyWidget.h""
#include "QObjectPropertySet.h"

#include <QHBoxLayout>
#include <QString>


int main(int argc, char *argv[])
{

    QApplication a(argc, argv);
    QWidget w;

    w.setLayout(new QHBoxLayout);

    QtnPropertyWidget *centralWidget = new QtnPropertyWidget();

    auto m_propertySet = new QtnPropertySet(centralWidget);

    w.layout()->addWidget(centralWidget);

    auto floatValue = new QtnPropertyFloat(m_propertySet);
    floatValue->setName(QObject::tr("Value"));
    floatValue->setDescription(QObject::tr("Float value"));
    floatValue->setMaxValue(1.f);
    floatValue->setMinValue(0.f);
    floatValue->setStepValue(0.1f);
    floatValue->setValue(0.3f);



    auto m_propertySet2 = new QtnPropertySet(centralWidget);
    m_propertySet2->setName("ololo");
    m_propertySet->addChildProperty(m_propertySet2);

    centralWidget->setPropertySet(m_propertySet);

    w.show();
    
    return a.exec();
    //QtnPropertyEnum* EnumProperty = new QtnPropertyEnum(nullptr);
}

if uncomment //QtnPropertyEnum* EnumProperty = new QtnPropertyEnum(nullptr); it will works.
if exclude all enums from Demo.pef, it will give the same exeption.
I think something wrong with initQtnPropertyWidgetLibrary in PropertyDelegateFactory.cpp.
I use visual studio 2017 x64 and Qt 5.10.1.

QtnPropertyQColorLineEditBttnHandler::onToolButtonClicked crash

editorBase() will destoryed which is QColorDialog's parent

why not use as flow

auto property = &this->property();
auto reason = delegate()->editReason();
QColorDialog dlg(property->value());
if (dlg.exec() == QDialog::Accepted)
{
    property->setValue(dlg.currentColor(), reason);
}

Improve delegates look&feel

Implement mechanism to notify delegate if mouse over or pushed on the delegate.
For example to make pushing Button's delegate more natural.

Add virtual method to QtnPropertySet

Hello. Working with QtnPropertySetXXX i created own method QtnPropertySetXXX::method() in pef file. I need to operate it from base class.
If topic name solution isnt suitable, how could it be achieved without casting?

License on Qt Apps says GPL

I almost didn't bother with this project because it says that it's licensed under the GPL on Qt apps :)
However, it was a pleasant surprise to see that the license has changed to Apache.
Could you perhaps change the information?
Thanks!

LINK : fatal error LNK1181: cannot open input file 'release\QtnCoreUnity.obj'

LINK : fatal error LNK1181: cannot open input file 'release\QtnCoreUnity.obj'
jom: C:\Users\User\Documents\Visual Studio 2015\Projects\build-Property-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Core\Makefile.Release [C:\Users\User\Documents\Visual Studio 2015\Projects\QtnProperty\bin-win\QtnPropertyCore.lib] Error 1181
jom: C:\Users\User\Documents\Visual Studio 2015\Projects\build-Property-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Core\Makefile [release] Error 2
jom: C:\Users\User\Documents\Visual Studio 2015\Projects\build-Property-Desktop_Qt_5_8_0_MSVC2015_64bit-Release\Makefile [sub-Core-make_first] Error 2
17:30:25: The process "C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project Property (kit: Desktop Qt 5.8.0 MSVC2015_64bit)
When executing step "Make"
17:30:25: Elapsed time: 00:36.

Hey guys, seems like a great project and would like to use it in mine, but I'm getting this error while trying to compile it.
I'm on Windows 10 64bit, Qt 5.8 with msvc2015_64 also tried on Qt5.8.0-mingw-5-3.
I tried compiling through the Qt Creator and also with cmake. Nmake commands also didn't help.
Does Qt 5.8 works with this one? or the libraries here needs to be updated?

Use existing delegate for custom data type

I have some custom types which closely resemble Qt types with property delegates already implemented. E.g. Colour -> QColor, glm::vec2 -> QPointF. I would like to reuse existing delegates and write as little bridge code as possible. In a perfect case there would be only two methods to convert between these types back and forth. What is the easiest way to reuse delegates right now? Are some improvements possible?

Support Tab navigation

Hi, Alex Zhondin.

First, thanks for your QtnProperty library. It's nice.

And can you support Tab (Shift + Tab) to navigate to input next field?

Regards,
Eric.

Signals in QtnProperty

Hi,
I want to add QtnProperty to my project in which I have a set of parameters which control the application. I would like to add the possibility to update the application each time one of the parameters has changed. Normally, I would write a signal "parameterChanged" for each property and detect this signal in main class. The question is: How can I do it with QtnProperty ?
Thanks in advance.

Cannot find default delegate for property ""

QtnPropertyWidget* centralWidget;
QtnPropertySet* m_propertySet;
centralWidget = new QtnPropertyWidget();
m_propertySet = new QtnPropertySet(centralWidget);
layout()->addWidget(centralWidget);
centralWidget->setPropertySet(m_propertySet);
new QtnPropertyBool(m_propertySet); // this produce Cannot find default delegate for property "" Did you forget to register default delegate for  QtnPropertyBase type?

if i swap this lines

centralWidget->setPropertySet(m_propertySet);
new QtnPropertyBool(m_propertySet);

this problem is gone.

serializable properties should have unique ids

Hi, at first I would like to thank you for all the help you done to integrate Qtn in AwesomeBump project. I slowly introduce changes in GUI and everything works perfect.
However today I've tried to implement saving feature which is done in following way. I have multiple propertysets which are separate, but I want to keep all the data in one file. So to do that I decided to make another property set which I will use to keep all the data in one place:

property_set AwesomeBump{
    extern property_set FormImageProp Diffuse{}
    extern property_set FormImageProp Specular{}
}

In future I'm going to add more properties to it. Then during save I do

    abSettings->Diffuse.copyValues(diffuseImageProp->imageProp.properties);
    abSettings->Specular.copyValues(specularImageProp->imageProp.properties);  
    QFile file( "test.dat" );
    QDataStream stream( &file );
    abSettings->save(stream);

Which causes this assert:

ASSERT: "false && "serializable properties should have unique ids"" in file ../AwesomeBump/Sources/utils/QtnProperty/Core/PropertySet.cpp, line 332

However I tried to use:

QTextStream stream(&file);
QString data;
abSettings->toStr(data);
stream << data;

But only the first property FormImageProp Diffuse was written into file. Do you know how to fix it?

Inplace editing is possible only after updating visuals

When calling propertyView()->setActiveProperty() sub-items are not created immediately. So if I send fake Enter key to the view synchronously it doesn't start inplace editing. I have to send it async at the next frame.

Is it possible to fix this? Is it also possible to create a method for triggering inplace editor without having user to send fake keyboard events? Would like something like this:

propertyView()->setActiveProperty(...);
propertyView()->startEditingActiveProperty(); // create inplace editor and focus on it

See also:
cegui/ceed-cpp@c7c2f3a#diff-583c1e7f1eb64f6f91c4b799dcca092a8388a8c63cca38f694237d404224cbbcR1352

Doccumentation issue

this code:

QtnPropertySet* set = new QtnPropertySet(this);
ui->propertyWidget->setPropertySet(set);
QtnPropertyQColor* textColor = new QtnPropertyQColor(set);
textColor->setName(tr("textColor"));
textColor->setDescription(tr("Foreground text color"));
textColor->setValue(QColor(0, 0, 0));

produces following:

textColor Delegate <> unknown;

I've spent an hour and still can't find how to attach a delegate.
Anyway, the project really misses documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.