Giter Club home page Giter Club logo

pypapi's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @tizianolattisi

pypapi's People

Contributors

pivamichela avatar tizianolattisi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pypapi's Issues

DIsable the completion in PyPaPiComboBox

The QComboBox has a default completer based on the first characters on the left. This completer must be disabled in the PyPaPiComboBox (the tryToSelect method execute a full text search).

The QComboBox docs (c++) says:

"Sets the completer to use instead of the current completer. If completer is 0, auto completion is disabled."

But QComboBox.setCompleter(0) does not work.

Workaround: a empty char in the toString method.

It's not possible to edit in line a Boolean value in the TableView

  1. create a store for a TableView with a column of type Boolean
  2. try to click on the checkbox

The check state don't changes, and you got this error:

GRAVE: null
java.lang.NoSuchMethodException: com.axiastudio.pypapi.ui.BooleanItemField.setCheckstate(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1605)
at com.axiastudio.pypapi.Resolver.setterFromFieldName(Resolver.java:170)
at com.axiastudio.pypapi.ui.ItemEditable.set(ItemEditable.java:56)
at com.axiastudio.pypapi.ui.TableModel.setData(TableModel.java:137)
at com.trolltech.qt.gui.QApplication.exec_internal(Native Method)
at com.trolltech.qt.gui.QApplication.exec(QApplication.java:559)
at com.axiastudio.suite.Suite.main(Suite.java:121)
19-lug-2012 15.08.34 com.axiastudio.pypapi.ui.TableModel setData
GRAVE: null
java.lang.NullPointerException
at com.axiastudio.pypapi.ui.ItemEditable.set(ItemEditable.java:57)
at com.axiastudio.pypapi.ui.TableModel.setData(TableModel.java:137)
at com.trolltech.qt.gui.QApplication.exec_internal(Native Method)
at com.trolltech.qt.gui.QApplication.exec(QApplication.java:559)
at com.axiastudio.suite.Suite.main(Suite.java:121)

If you double click on the right of the checkbox appears a combo box with true/false options.

Without this feature the developer should provide a edit form for the row.

Criteria group

With a String dynamic property named "searchgroup", we can group criteria field of type QLineEdit and QTextEdit.
In the PickerDialog we present a single QLineEdit with the name of the group.
The controller executes a ilike search with the fields in or.

Bad casting of the proxy to TableModel

When using the row filter in the PickerDialog, after the ProxyModel patch:

Exception caught after invoking slot
java.lang.ClassCastException: com.axiastudio.pypapi.ui.ProxyModel cannot be cast to com.axiastudio.pypapi.ui.TableModel
at com.axiastudio.pypapi.ui.PickerDialog.applyFilter(PickerDialog.java:523)

AND || OR search

A radio button in PickerDialog to select the type of match in the search: "one of the criteria" or "all the criteria".

The controller's createCriteriaStore should alter the code:

if( predicates.size()>0 ){
    cq.where(cb.and(predicates.toArray(new Predicate[0])));
}

Distinguish between CellEditorType.CHOICE and CellEditorType.LOOKUP

Now the UI inspector set the type of the column to CellEditorType.CHOICE, when the widget is a QComboBox.
But if the widget is a PyPaPiComboxBox the type of cell's editor could be a LOOKUP.

This affects PickerDialog.addCriteria and executeSearch: with this change we don't need code like this:

if( widget.getClass().equals(QComboBox.class )){
    int idx = ((QComboBox) widget).currentIndex();
    data = ((QComboBox) widget).itemData(idx);
} else {
    data = this.entitySelectorUtilities.get(column.getName()).getSelected();
}

To distin between Enum and Entity

Multiple translation file

Actually is not possible to load more than one qm file (translation file): the last file overwrite the others.

Es:

Application app = new Application(args);
app.addQmFile("classpath:file1_{0}.qm");
app.addQmFile("classpath:file2_{0}.qm");
app.setLanguage("it");

file2_it.qm overrides file1_it.qm

Refactor the Controller class name

The name "Controller" is usually related to the ui-controller, so maybe could be more correct a class name like "DbManager" (EntityManager is used...).

Refactor before it's too late!

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.