Sign in Join
Wiki copytemporary

Qt Interface/ja: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11## 概要
22
33Qt4ウィジェットセットは現在開発段階です。このインターフェイスはQt4.1.1をベースに開発されています。関連するドキュメントは[こちら](http://doc.trolltech.com/4.1/)
44
55### Linuxにおけるクイックスタートガイド
66
77まず始めに[オフィシャルサイト](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html)のbindingsを訪れ、バイナリ版のQt bindingsをダウンロードしてください。そしてlibqt4intf.soを/usr/lib/にコピーしてください。
88
99QtでLCLをコンパイルします。最初にノーマルなgtkによってコンパイルされたLazarusを起動して、メニューから"ツール"→"Lazarusのビルドの設定"を選びます。そしてLCLを"clean+build"に、他のものを"none"に設定します。続いて"Qt"を選択し"Ok"ボタンをクリックします。今度は"ツール"→"Lazarusのビルド"を選択します。すると、QtでLCLをコンパイルできます。
1010
1111プロジェクトをQtでコンパイルするにはターゲットウィジェットセットをコンパイラオプションダイアログで選択してください。
1212
1313At this moment the Lazarus IDE cannot be compiled for Qt because it uses features missing on this widgetset.
1414
1515### Mac OS Xにおけるクイックスタートガイド
1616
1717[[Qt Interface Mac/ja|MacにおけるQtインターフェイスをご]]覧下さい。
1818
1919### PDAやスマートフォンにおけるクイックスタートガイド
2020
2121誰か書いてください。
2222
2323## Qt 4 バインディング
2424
2525このインターフェイスはDen Jeanによって作られたQt4バインディングを使用します。このバインディングはQtオブジェクトと手続きのメソッドを出力するC++ライブラリです。このライブラリはLinux上で800kbの大きさがあり、あなたのLCLプログラムが必要とするただ一つの.soファイルで構成されます。
2626
2727あなたはより詳しい情報をこのバインディングの[オフィシャルサイト](http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html) や [[fpc:Qt4 binding|fpc:Qt4 bindingで]]探す事ができます。
2828
2929Is is being reported that it may be possible to link to Qt 4 directly, using some tricks. Many think it is not. This is yet to be tested. It is expected that any such binding will be compatible with the currently utilized one, so the interface code won´t have to be changed.
3030
3131### バインディングのコンパイル
3232
3333あなたがGPLでライセンスされたソフトウェアをリリースしようと考えているのなら、自分でバインディングをコンパイルする必要はありません。GPLによってライセンスされたバイナリはDen Jeanのウェブサイトで入手する事ができます。あなたがもし、GPL以外のライセンスでライセンスされたコードをリリースしようと考えているのならば、あなたは商用版のQtを使って自分でバインディングをコンパイルしなければなりません。
3434
3535**ステップ1** - バインディングのコンパイルを始めるにあたって、必要なすべてのファイルをダウンロードします
3636
3737- バインディングのソースコードをダウンロードします。バインディングのオフィシャルウェブサイトに行ってください。リンクは上にあります。
3838
3939- 必要とするプラットホーム向けのQt4.1.1のソースコードも入手します。ダウンロードページは[こちら](http://www.trolltech.com/download/opensource.html)
4040
4141**ステップ2** - ダウンロードしたすべてのファイルを解凍します。Qt4.1.1ソースコードのあるディレクトリにはいって次のコマンドを入力します。
4242
4343 ./configure
4444
4545**ステップ3** - ダウンロードして展開したqt4pasのソースコードがあるディレクトリにはいって、compile_lib.bashを編集します。パスをQt4.1.1のソースコードがある場所に変更してください。
4646
4747**ステップ4** - compile_lib.bashを実行してください。それであなたはlibqt4intf.soと呼ばれるファイルを手に入れる事ができます。
4848
4949## Qt 4 interfaceのロードマップ
5050
5151### 現在実装中のコンポーネント
5252
5353こちらに移動しました:[[Road To 1.0|1.0に向けて]]
5454
5555### 実装する予定だったコンポーネント
5656
5757- TPopUpMenu
5858- TBitmap - Needs a description of the internal format used by Qt
5959- TPixmap
6060- TIcon
6161
6262### currently implemented Windows API functions by group and with status
6363
6464**Mouse functions**
6565
6666SetCursorPos, GetCursorPos for TMouse - Fully working
6767
6868**GDI functions**
6969
7070BeginPaint, GetDC, EndPaint, ReleaseDC, Rectangle, MoveToEx, LineTo, Ellipse for TCanvas and OnPaint event- Fully working
7171
7272**Screen functions**
7373
7474GetSystemMetrics for Screen.Width and Screen.Height - Fully working
7575
7676### Coments
7777
7878It's really interesting.\
7979
8080Buy if will works also on Win32 OS?\
8181
8282
8383It will work for win32. It's just a question of recompiling the bindings. The code on the widgetset is completely platform independent, so the limiting factors are the bindings and Qt. However, there is little use for this on win32. There already exists a win32 native widgetset, you should use that one on Windows. The same code can be recompiled with any of the existing widgetsets on Lazarus. A more interresting place where this will work is: Linux powered PDAs.
8484
8585When do you think to can see the Lazarus IDE run full on QT4 Lib?\
8686
8787
8888No idea. If only I work on this, maybe 6 months. If others help, sooner.
8989
9090When do you think will be possible create full GUI applications using QT4?\
9191
9292
9393No idea. If only I work on this, maybe 6 months. If others help, sooner.
9494
9595## 寄贈
9696
9797### 新しいコントロールを追加する方法
9898
9999TButtonを例にとります。
100100
101101TButtonはlcl/buttons.ppで定義されています。これはLCLのプラットホームから独立した部分にあり、ここから通常のLCLプログラマーは使います。
102102
103103このウィジェットセットのクラスはlcl/widgetset/wsbuttons.ppにあります。これはプラットホームから独立していて、すべてのウィジェットセット(qt, carbon, gtk, win32,...)のためにあります。
104104
105105qtのインターフェイスクラスはlcl/interfaces/qt/qtwsbuttons.ppにあります。
106106
107-` TQtWSButton = class(TWSButton)`\
108-` private`\
109-` protected`\
110-` public`\
111-`   class function  CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;`\
112-` end;`
107+``` pascal
108+ TQtWSButton = class(TWSButton)
109+ private
110+ protected
111+ public
112+ class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
113+ end;
114+```
113115
114116WSクラスは、かならず登録(register)してやらなければなりません。qrwsXXX.ppというの名前のユニットの最後の方にあるinitializationセクションをご覧下さい。
115117
116-` RegisterWSComponent(TQtButton, TQtWSButton);`
118+```text
119+ RegisterWSComponent(TQtButton, TQtWSButton);
120+```
117121
118122TQtWSButtonはQtのQPushButtonを作成するためにCreateHandleをオーバーライドします。 コードは短くてTCheckBoxのように融通が利かなければなりません。 また、すべてのコントロールはqtprivate.ppにあるQtウィジェットセットのヘルパークラスによって成り立っているということを忘れないでください。また、このクラスを新しいコントロールに追加してください。それは難しい事ではありません。
119123
120124またDestroyHandleをコントロールによって使用されたメモリをクリーンアップするために実行する必要があるという事も覚えておいてください。
121125
122126---
123127*From the Free Pascal wiki, page "Qt Interface/ja", as it stood on 2006-08-06 after a change by Tooka, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history