View Single Post
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#4
Originally Posted by RobbieThe1st View Post
@noobmonkey:
Thanks.

1. Yea, I have QTextBrowser code working, but I'm not sure it will let me do what I want(especially #2).
2. Thing is, some comics and images look fine scaled down to the resolution of the screen. Some don't.
I intend to have an back-end option that will allow the user to select between scrolling(full-size) and scaled to the screen-size.
Making it match the width, that's easily done. Its getting access to a function that allows me to scale the image onscreen to whatever dimensions I choose that's the issue. More importantly, I need to be able to scale the image [i]using a good[/url] scaling algorithm, just like with the image viewer. Nearest-neighbor etc. just won't do.
Now, last I checked, I could add a pixel-width to the img in the HTML code I'm sending to QTextBrowser, but I'm not sure I could externally change it without reloading the whole code etc. This may be the best option, but I'm really wondering if there's a better widget.

With 3, thanks for that. However, do you know of any -manual- rotation function? I'd like to be able to lock it in portrait mode based on a setting or two.

4. Alright, but there's got to be some sort of library for doing this; it seems kludgy to simply poll the cursor whenever the mouse "button" is down, and then try to extrapolate motion from that.

5. Yes, that's what I mean - I'm just slightly worried about content inside the QTextView(etc) overriding my menu - I'm trying to make the menu appear anywhere, not just where there's no image.

6. Alright, I'll see what I can do...
3) you can set the rotation as you wish using very similar examples.
This one is in python so you can just translate the others (In c++ i think)
self.setAttribute(QtCore.Qt.WA_Maemo5AutoOrientati on, True)

setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);

An example in c .....
Code:
  QRect screenGeometry = QApplication::desktop()->screenGeometry();
         if (screenGeometry.width() > screenGeometry.height())
             label->setText("<p align=\"center\">In Landscape Mode</p>");
         else
             label->setText("<p align=\"center\">In Portrait Mode</p>");
4) Get on IRC - and have a chat with someone like W00t or frals - they should be able to help or point you in the right way (Not everyone comes in the forums!)

5) Took me a while to get a normal menu working! I know you can position it depending on where they press , but i have no experience, if you come up with a good example post it for all to see in the wiki!
But i'd definitley hunt through the repos for some example python apps that do it already!

As soon as i get a bit of time i'll try and do some proper examples - just got back from hols and back to work monday, so frantically washing, cleaning etc! :P
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -