Displaying Multiple Images using labelProvider - eclipse-plugin

We have been working in a Tree Editor. We are displaying icons below the file names. Now, we have a need to display another icons below this already displayed icon. This icon will be displayed based on some parameters. Hence, it is not necessary that always multiple icons will be displayed.
We have our own LabelProvider which correctly returns a single image.
Please, let me know how can I customise my LabelProvider to return multiple images ?

The normal LabelProvider only supports returning a single image per row.
There are some classes available which let you make a composite image from several separate images. The abstract base class for these is CompositeImageDescriptor. The DecorationOverlayIcon class is a concrete class based in this which supports a main image with up to four overlay images (this is what views like Package Explorer use).
If those classes are not enough you can use a label provider based on OwnerDrawLabelProvider - which allows you to draw what you like in the row.
Note: All rows in a tree (or table) are always the same height. A deep image in one row will force all the other rows to be the same depth.

Related

Determine the size of chart bar in flutter

I am trying to create a chart that displays the data that came from the api that is supposed to be like this image
as for the date and the size of the columns, no matter how many data are coming
I have two problems:
1- I don't know Make the widget flexible so that the column always appears the same size
2- I don’t know. Make the date the same as what is needed. It is displayed in the same form in the API
how can I fix it
For making a widget flexible and appear the same size you can use BoxConstraints by adding Container or SizedBox as parent widget and defining height and width.

What class does Qt designer use to edit the properties of UI elements?

At the moment I'm writing a tool to extract parts of frames of mp4-video files. You draw rectangles on the video and the tool extracts .png-images at regular intervals. Now I want to give the user the ability to edit the properties of individual rectangles they have drawn on the video (exact position, frequency of frame extraction, time frame, etc.). I like the approach that QtDesigner takes for editing ui elements. You can see what I mean in this screenshot i found on the internet
The yellow and green table contains name value pairs for the different properties of the selected ui element. The table is devided into section depending on what class the property was inherented from. In the Screenshot the green part is inherented from MarbleWidget. The yellow part is inherented form a different class. I want each division to refer to a different rectangle and the color to match the colour the rectangle is drawn in on the screen.
I've tried using QTreeView, QTableView, QToolBox and QTableWidget but none of these - to my knowledge - offer putting QWidgets in the "value" part of the table. In the screenshot you can see tick boxes for example. In my case I would want to use a range slider. Does anyone know what class is used to Implement this table?
I think you'll find it difficult to use the designer classes in a normal application.
See qtpropertybrowser for a properties editor.
See setIndexWidget for a static widget. As it says, use QItemDelegate for dynamic widgets. Note that the specific item subclasses have their own methods like QTableWidget.setCellWidget.

Use more QGraphicsScenes

I want to display multiple QML Files on a QWidget. Because every Display should be an unique Object/Widget, I plan to use for every display an own QGraphicsView with an unique QGraphicsScene. These views can be added to a layout witch will be placed on a widget.
So I will have about 50-100 QGraphicsScenes and GraphicsViews.
I want to set a background for the Displays which will not be updated when you repaint the object. That is why I want to use an own scene for each display.
Is this recommended or should I use only one GraphicsScene in a project?
It's not good idea, 50-100 scenes is not optimal. Why not drawing all QML files in same QML View ? Using Loader foreach file.

live tiles in Windows Phone and Grids

I'm trying to create a live tile for my application, using a user control.
The user control contains a grid, an image and a rectangle filled with color.
Now here comes the funny part.
I want the rectangle to act as a background for the tile's title, and the image to fill the rest of the tile. And i said to myself, well, lets put some rows in that grid and set the like you usually set them in a WPF/SL application.
I then write the entire thing in a WBM and save it to isostore.
The problem is, the parser seems to ignore the presence of grid's rows. regardless of what I try, the rectangle is not shown, and the image covers the full tile, when it should only cover the first row. It is as if the grid didn't even existed.
Another funny aspect is that it doesn't matter if I use rows or columns, the result is the same.
Any ideas?
Are you using the following method?
Dynamic LiveTile - adding background image?
I recently implemented a Live Tile using a Grid with Rows and Columns for layout of some TextBlocks. I encountered similar challenges, so I placed the control that I was using for my Live Tile on a blank page in my app to better see what was happening. Does the control render correctly when displayed on a page (versus being rendered to a WriteableBitmap)?
Another idea. Instead of trying to position the Rectangle relative to the tile's Title, why not leave the Title property blank and put the same text in a TextBlock within the user control?
If you are careful about the font and positioning of the TextBlock, the text on the resulting background image can appear indistinguishable from text displayed from the Title property. I decided to follow this strategy myself. I found the font information in the following answer:
Font size and family for a tile's title
Otherwise, could you post an example of the XAML you are using?

Cocoa one row table view or a horizontal list view

Is it posible to use table view to show just one row of a big amount of elements? What I'm looking for is for some kind of horizontal list, like we have in XCode preferences or Aperture image list.
It would behave just like a one columnt table view, but instead of showing the elements vertically, it should be horizontally.
Can you point me to where should I start from?
If you're okay with Leopard-only, The new NSCollectionView supports horizontal display. Just set the collection view's number of rows to 1 in Interface Builder; it'll even handle the horizontal scroll bar for you. The IconCollection sample code provides a simple demonstration of how it works. It's bindings work similarly to a table view's, except instead of rows and columns, each object represented gets an 'item' (an object of type NSCollectionViewItem) that displays it, and those items will be laid out in a grid. The sample code above demonstrates how to set up these 'items' in Interface Builder, which is definitely the easiest way.
With a table view? No. If I'm understanding correctly what you want, in the past I've created my own NSView subclass for this type of control. Define a data source protocol similar to NSTableView, and in your NSView drawRect method, draw the elements in order one by one from left to right. You can either keep track of paging in your control, or put it in a scroll view and resize yourself whenever the number of items changes.
Usually this type of thing starts off pretty simple, and gets a bit complex once you start handling caching, paging, selection, mouse and keyboard input and so on. My advice, start as simple as possible and add new features one by one, only after you've finished the previous task.