PDA

View Full Version : application design questions



nikita
26th August 2006, 23:54
hi,
i have some questions about classes i would like to use if possible. i don't use designer as i prefer to hand code projects. first are there touch screen libraries in qt 4.1, other than qtopia? excluding elotouch, there doesn't seem to be any manufacturer which supports X11, so i was hoping to find something that would free me from vendor specific code. second i'd like to add vertical tabs to the left side of the window like amarok, 2 will contain views of text files, the other both files docked. next, i need to display the files as read only, non editable and be able to increase/decrease the font, no TextEdit (html maybe?). lastly, can anyone put me in contact with a theme/style howto or developer as i wish to create custom widgets for an application i'm building. i have been using the arthur widgets so far, and i have somewhat of an idea how to use the files in the image folder, but i'd like to create something original so i need some additional information. i have tried the web for resources, nothing relevant... right now the main answers i need are on the touch screen libraries,vertical tabs and text file handling. thanks in advance.

jacek
27th August 2006, 00:16
First of all, please, don't ask multiple unrelated questions in one thread.


i'd like to add vertical tabs to the left side of the window like amarok,
These tabs look like a custom widget (or a series of buttons in older versions). This might be a modified QListView or QTabBar, but the easiest way to find out is to look into Amarok sources.


i need to display the files as read only, non editable and be able to increase/decrease the font, no TextEdit (html maybe?).
Try QTextEdit::setReadOnly() or QTextBrowser.


can anyone put me in contact with a theme/style howto or developer as i wish to create custom widgets for an application i'm building.
So you need custom style or custom widgets? These are quite different things. Anyway more appropriate place for this question is our jobs section.

nikita
27th August 2006, 02:24
sorry about the poor forum etiquette, i usually go it alone... still, thanks i'll look at the material on QTextBrowser, and i take it you don't have a suggestion on the touch screen libraries? thanks again.

Brandybuck
27th August 2006, 06:05
i don't use designer as i prefer to hand code projects.
Designer is not stopping you from hand coding projects! :p

nikita
27th August 2006, 08:07
i took a look at QTextBrowser and QTextEdit::setReadOnly, i think i can use both for different aspects. i've been screwing around with the styles example. i was pretty frustrated with the way it was drawing the .png i was using until i realized that it was to big and the gradient too large, so i cut it down to a sliver and got the effect i wanted. so now all i have to do is create some custom buttons<yippee!>, lose a day or two of sleep tearing apart the arthurstyle source files and i have my own style. oh, and brandybuck, it's just a preference i have; nothing stops me from coding anymore<or any less>. :o

jacek
27th August 2006, 22:07
i'd like to add vertical tabs to the left side of the window like amarok
I've just noticed that similar tabs are in KDevelop, so it might be some KDE extension.

nikita
28th August 2006, 01:35
hi jacek,
i have a solution to the verticality issue. i did some further reading and came across setTabPosition <property?> in the documentation:

from the QTabWidget Class Reference page:

Member Type Documentation
enum QTabWidget::TabPosition
This enum type defines where QTabWidget draws the tab row

at first i kept trying to pass TabPosition, then i looked at the compiler error after the 5th time and:

tabdialog.cpp: In constructor `TabDialog::TabDialog(const QString&, QWidget*)':
tabdialog.cpp:34: error: `TabPosition' is not a class or namespace
tabdialog.cpp:34: error: no matching function for call to `QTabWidget::setTabPosition(TabDialog::TabPosition )'
../../include/QtGui/qtabwidget.h:91: note: candidates are: void QTabWidget::setTabPosition(QTabWidget::TabPosition )
*** Error code 1


realizing i'm an idiot and that TabPosition is an enum type i just rewrote the code and got it. here it is for anyone interested:

tabWidget = new QTabWidget;
tabWidget->setTabPosition(QTabWidget::West);
<addTab and stuff after above>

North is above, South is below, West is left, East is right. i assume you can do this with other stuff. now all i have to do is even up the tabs and draw them green. :cool: i think i'll read bruce eckel again, i'm getting sloppy. take care and thanks again.

http://www.qtcentre.org/forum/attachment.php?attachmentid=557&stc=1&d=1156725225