QField - Sub menus in input form for input fields - qgis

I just discovered QField and I amazed by its features! Now I am trying to create a project that will fit my needs and have come quite far. I just have one questing on adding features in the app:
When adding a feature in the Qfield App in my project, everything is on one page and I have to scroll down in order to reach all input fields. This can be quite tedious while working in the field.
In the documentation and the demo project, that follows when downloading Qfield from Play store (offline_bees.qgs), the input is split up into sub-menus which you can reach by scrolling sideways (see image). This is much more effective than having everything on one page and having to scroll downwards. Unfortunately, I haven't found out how you can split your feature into such sub-menus as seen here. I have played a bit around with the available input widgets in the attribute form, to no avail.
I have also read the available documentation for Qfield 1.0 multiple times, but since I am neither a frequent user of QGIS nor a programmer, it is a bit challenging for me to understand the instructions (https://qfield.org/docs/project-management/vector-layers.html). Does it have something to do with the Relation Widget or Relation Reference?
I am thankful if somebody could point me in the right direction.

Looks like I didn't play around enough. I found out how to solve my problem. Here are the instructions
In QGis while preparing the project for QField:
Go to layer properties/ attribute forms
Set to "Drag and drop designer" (I failed to find this at first)
Create groups (these will be the sub menus) with the "+" button
Drag and drop your fields into the created groups

Related

Is there a way to add extra margin space to a page in PDFKit/PDFView?

This is perhaps a more general question as I'm looking for ideas on how to approach a problem working with PDFView/PDFKit. I have a small sample application that allows you to display a page, select a range of text and then associate a comment with that text. Once the comment is saved the comment is displayed on the PDFView page in the margin via an overridden draw() function for PDFView.
Problem is that with very small margins the comments can be very squished. I've been looking for a straight-forward solution and would very much appreciate ideas on how to address it.
The obvious (ie, easy) solution is to change the actual "page size" in the PDFView and have wider margins, but of course PDFKit has no support for that (I don't think). Another thought was to go to a custom PDFView library but the only ones I found when I last looked were iOS (not Cocoa) based.
Last idea was to instead of drawing directly on the page have some sort of pop-up window (like a sticky-note) contain the note but then it would need to be moved dynamically with the scrolling of the page. And of course one other was to recreate the PDF dynamically for viewing and make all the pages larger... but I've not dug into how much of a performance hit / effort that would entail.
Maybe there's a simple/obvious solution that I've missed?
I created a simple sample app in gitHub which shows the basic functionality for people to play with if that's of help. https://github.com/jcnolan/PDFMarginTextView

Hide filter depending on sheet in dashboard

Hope you can help.
I have attached my workbook. Basically, I have made swapping sheets. The sheets have different filters, and I need the filters to disappear depending on the sheet showing.
I have no problem with the sheet swapping. I been going through the internet for hours, without finding a good solution. I did look into this: New series of videos on swapping and popping on a dashboard(https://vimeo.com/294170859), but did not find it that helpful since it is not very flexible and too difficult to use if you have many filters, that need to change.
I have some kind of an Idea, of putting my filters in each of their container, and then have the container showing depending the sheet but do not how either.
But in the end, the filters needs to appear in the same spots too.
But I really need your help - Simply can't find a good solution!
Thank you!
Without putting your filters in containers and swapping those I can't think of any alternative way to alter which filters appear on your dashboard.
I don't know the exact specifics of your task, however, having perhaps faced similar issues almost always the best solution is to simplify. If possible instead of swapping sheets consider a new dashboard and just "show sheets as tabs". Altering a parameter is a click, just as clicking a dashboard tab - so no difference to the user. Also changing filters may be confusing to a user - they generally get used to seeing things in a certain place.
Of course none of this may apply to your specific situation.

Dynamics AX Form Item Ordering

For the most part, AX forms seem to follow the AOT layout and appear in order. However, in some cases, the form items appear in seemingly arbitrary order, and in others, the items in the AOT won't even reorder. No matter how you drag and drop items in the AOT, they are always in the same order. This problem happened on occasion in AX 2009, but seems to be worse in AX 2012. The only way I've found to get around it is to drop the non-reordering items and recreate them.
Has anyone else had similar experiences? Anyone have a fix?
Ok, I've found that dragging and dropping only works part of the time. However, if you use ALT+the arrow keys to move items up and down in the hierarchy, that seems to work just fine.
The way I read your question it seems you are referring to control layout within a form. If your question is about something else please clarify.
To change form control layout you need to use AOT \Forms[FormName]\Designs\Design node. You can drag and drop controls and control groups.
If you drag a control (let's call it "dragControl") and drop it on top of another control (say "dropControl"), then dragControl will be placed after dropControl. This means that if you want to change the first control of a control group, you need to drag the first control, as dropping any control on top of the first one will place them after the first control.
Also make sure your form does not have changes is some higher layer that would override the changes you are making in a lower layer.
Does this answer your question?

GWT & IE8 cause a very laggy table-behavior

I've yet another question. I'm working with GWT 2.0.4 and IE8 as well as FireFox (the latter only for comparison purpose). My application needs to load data and show it inside a table. There are about 60 columns and 150 rows to show.
Since the loading is dynamic - as soon as a dataset has been fetched, it's added to the table - I'm fine with slowdowns during loading process. However: when the table is completely loaded, I'd expect it to be pretty snappy and let me scroll it without much lag.
While the loaded table reacts in FireFox pretty good - it stays very responsive - Internet Explorer 8 is causing me a lot of headaches. In particular: as soon as the table finished loading and I try to scroll around or highlight a row, IE8 becomes VERY laggy and highlighting a row makes IE8 consume 50+% of CPU power.
I am not using any 3rd-party libraries and even displaying empty cells in a FlexTable still gives me the same issue.
I found some probably related issue here: SmartGWT ListGrid is slow, but only in Internet Explorer . Unfortunately neither the issue there, nor the supplied links for SmartGWT solved my problem as I am not using SmartGWT. I do believe though that the problem is related.
I'd be happy to try any suggestions.
If it's possible (and your description of the problem suggests so), use Grid instead:
A rectangular grid that can contain
text, html, or a child Widget within
its cells. It must be resized
explicitly to the desired number of
rows and columns.
Have a look at bulk table renderers # GWT Incubator for a comparison of these approaches (it's a little dated, but the point that FlexTable is slower than Grid still holds ;)). The "bulk rendered" tables from the incubator are also an option, however keep in mind that those widgets might not be maintained any more (and for example, contain bugs) - or are rapidly maintained :D But looking at the source might at least point you in the right direction, if you wanted to roll out your own solution to this problem.
highlighting a row makes IE8 consume 50+% of CPU power.
Maybe it's because you added mouse listeners to every row in your table. If so you could use :hover-pseudo-class in your css-files.
This article maybe helpful if you need to handle Events from a bunch of widgets in your table: http://code.google.com/intl/en/webtoolkit/doc/latest/FAQ_UI.html#As_the_application_grows,_event_handlers_seem_to_fire_more_slowl

Arrange GUI elements in WPF in a similar way to the applications on the iPhone

I would like to arrange UIControls in WPF in a similar way to the applications on the iPhone. They should be positioned on a grid, but a user should be able to drag them somewhere else, after releasing the mouse button (or the finger in case of an iPhone) the selected UIControl should snap back to the next position in the grid. The other UIElements should be rearranged automatically.
Further the user should also be connect two elements with a line or something.
I'm not experienced with WPF. The first question is if there is a container which is suitable for something (System.Windows.Controls.Grid ?) or if I have to extend canvas or somethig else for this.
I would like to know which elements from the WPF framework can be used and which elements I have to write myself.
For people who do not own an iPhone: http://www.youtube.com/watch?v=3omhu2AUWC8
Update
I've looked at AnimatedTilePanel in the BangOTricks examples (see below), this one explains how to create your own Panel and how to let it arrange things there.. However I still need an idea how to implement drag and drop correctly in this example..
Unfortunately, you'll have to write a lot of things yourself, as WPF doesn't automatically do what you're looking for.
For positioning the controls, you can use either UniformGrid or Grid. Assuming it's much like the iPhone video you showed, you can just use the UniformGrid with 4 columns and however many rows you need.
For the dragging animation, layout-wise, you could start by manipulating the RenderTransform property on whatever is being dragged, but you'll have to set a handler to check once you've met whatever threshold necessary to move into the another "cell" -- and at that point, you'll have to changed the order of the items in the tree.
Take a look at AnimatedTilePanel from Kevin's Bag-o-Tricks at:
http://j832.com/bagotricks/
It doesn't do everything you want but it will show you how to write a panel that animates its children when changing size or order.
New input to this old post in 09. Earlier this year (2012) someone has wrote a FluidWrapPanel and open sourced it. I tried it and it works like a charm - just like that on the iPhone menu.
You can also apply to other UI Elements or UserControl.