Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2007-02

Magnifier on OS X

39 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

Hello,

I am bringing the subject to the mailling list, as it probably interrests everyone.

Philip J wrote
I've attached a small program that displays screen dimensions. On Windows it displays 1024 x 768. On OS X it displays 768 x 1024, so it looks like the dimensions are reversed. That would explain the odd screen capture.

Ok, my Qt code is obviously the same on all platforms, so is that expected???

At a glance, it looks like a Qt bug to me.

A very good question is: Is that reversed on all Mac os x computers? Or your setup has something special (like libraries versions, don?t know), or maybe there is a reason I miss why the coordinates are inversed on mac os x?

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho

Ok, I just had an idea: PowerPC

Are you using PowerPC hardware?

A very good reason why the coordinates would be inversed is Endianess trouble somewhere.

I?m just not sure where.

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho
Philip J wrote
wndtray.lpi doesn't compile on OS X with GTK. Looking for wscarbontrayicon, which doesn't exist.

I know ... that is correct. A correct behavior for TTrayIcon on Mac OS X with Gtk can only be achieved creating a Carbon implementation for TTrayIcon which doesn?t exist. Maybe I could add a stub wscarbontrayicon. I even think I have this file somewhere here ... just never added it to svn

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: Ok, I just had an idea: PowerPC Are you using PowerPC hardware? A very good reason why…

Felipe,

Yes, I'm using PowerPC, but I doubt if endianness is the issue since the values are loaded into the TRect's Right and Bottom fields. If you look at my earlier pureqt.pas example, the cx and cy fields of the TSize return value for size hint appear to be as expected.

A quick google just now didn't turn up anything pertinent for screenGeometry.

Thanks.

-Phil

Earlier message 16 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Wed 2/14/2007 12:56 PM To: Items specific to the Qt widget set Subject: [Qt] Re: Magnifier on OS X Ok, I just had an idea: PowerPC Are you using PowerPC hardware? A very good reason why the coordinates would be inversed is Endianess trouble somewhere. I?m just not sure where. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: I know ... that is correct. A correct behavior for TTrayIcon on Mac OS X with Gtk can…

Felipe,

Right now, I don't see any evidence that the Qt tray icon works on OS X. I've attached a sample program.

On Windows, this adds a blank item to the tray. (For some reason, I can't get the icon to show up on the tray even if I hardwire the path to the file.) Right clicking the blank tray item shows the "Menu item" menu.

On OS X, this does nothing, just a normal window with a normal menu bar. The "System tray is present" message appears, so it's detecting the system tray. Nothing changes in the Menu extras area. Nothing is added to the app's menu.

I'm running 10.4.8, which is the latest version of OS X. Also running Qt 4.2.2.

Thanks.

-Phil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4762 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070214/4e18f8fe/attachment.bin>

Hess, Philip J
to Felipe Monteiro de Carvalho: I know ... that is correct. A correct behavior for TTrayIcon on Mac OS X with Gtk can…

Felipe,

MessageDlg doesn't work right with the Qt widgetset. On both Windows and OS X it's just a tall box that extends below the task bar/dock. On OS X, the buttons aren't accessible.

I noticed that Qt4.pas provides access to Qt's QMessageBox. Is there some way to use this in the Qt widgetset?

I tried to figure out how the LCL MessageDlg works, but it looks like kind of a mess. We would need to set PromptDialogFunction to point to a function of type TPromptDialogFunction. In the LCL, this is set to ShowPromptDialog, but that's where it starts to lose me. Have you looked at this?

Thanks.

-Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3340 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/qt/attachments/20070214/c9a464c1/attachment.bin>

Felipe Monteiro de Carvalho
to Hess, Philip J
Philip J wrote
MessageDlg doesn't work right with the Qt widgetset. On both Windows and OS X it's just a tall box that extends below the task bar/dock. On OS X, the buttons aren't accessible.

That is correct, it?s like that on Linux too. I tryed some time ago to implement it, but I got confused, so it?s better to ask on the main mailling list where Vincent, Mattias, etc should know better then I what needs to be done. Althougth I think I already asked without much answer, so one will probably have to dig lcl code to find out how this works.

I noticed that Qt4.pas provides access to Qt's QMessageBox. Is there some way to use this in the Qt widgetset?

I don?t think so. AFAIK lcl message box uses a normal form with some buttons.

As far as I remember, the current dialog is huge because Autosizing doesn?t work, and the dialog is based on autosizing stuff to set it?s size and the positions of buttons. I don?t remember where autosizing is implemented.

I tried to figure out how the LCL MessageDlg works, but it looks like kind of a mess. We would need to set PromptDialogFunction to point to a function of type TPromptDialogFunction. In the LCL, this is set to ShowPromptDialog, but that's where it starts to lose me. Have you looked at this?

Yes, but that?s all on LCL, and not where we must implement, the widgetset code. The key here is to create a trivial app that shows a message box, set a breakpoint and go with F7/F8 inside LCL code slowly. I think that on the end you will find some WinAPI functions which are missing, or only partially implemented. Then implementing those functions should fix message dlg.

Felipe Monteiro de Carvalho
Vincent Snijders
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 12 lines
On 2/15/07, Hess, Philip J wrote: > MessageDlg doesn't work right with the Qt widgetset. On both Windows > and OS X it's just a tall box that extends below the task bar/dock. On > OS X, the buttons aren't accessible. That is correct, it?s like that on Linux too. I tryed some time ago to implement it, but I got confused, so it?s better to ask on the main mailling list where Vincent, Mattias, etc should know better then I what needs to be done. Althougth I think I already asked without much answer, so one will probably have to dig lcl code to find out how this works.

To use QT's messagebox functions, the widgetset should override TWidgetSet.PromptUser.

Vincnet

Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

Just now I used the ttrayicon.xpm file. On Windows it shows up as very, very tiny in the lower-right corner of the icon position on the tray. Too small to tell what it is.

I'll see if using .xpm makes any difference on OS X.

Does anyone see anything that could be wrong in my sample code (qttesttray.pas)?

Thanks.

-Phil

Earlier message 19 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Thursday, February 15, 2007 4:02 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X On 2/14/07, Hess, Philip J wrote: > Right now, I don't see any evidence that the Qt tray icon works on OS X. I've attached a sample program. Ummm ... a quick google seams to show it should work. One guess is that Qt support for .ico files is buggy. I would try a .XPM file instead. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: Ummm ... a quick google seams to show it should work. One guess is that Qt support for…

Felipe,

You were right. It was the icon. With ttrayicon.xpm my dummy menu appears as a menu extra at the far right of the OS X menu bar, and is available even when the main program is minimized.

Now we just have to find an icon big enough to see. This .xpm is teeny, tiny on OS X too.

Thanks.

-Phil

Earlier message 16 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Thu 2/15/2007 4:01 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X On 2/14/07, Hess, Philip J wrote: > Right now, I don't see any evidence that the Qt tray icon works on OS X. I've attached a sample program. Ummm ... a quick google seams to show it should work. One guess is that Qt support for .ico files is buggy. I would try a .XPM file instead. -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Hess, Philip J
Philip J wrote
Now we just have to find an icon big enough to see. This .xpm is teeny, tiny on OS X too.

Don?t you have a image editor capable of drawing XPM? If not I can send one for you. Gimp and Pixel Image Editor both should be able to do it. I think Pixel is native on Mac OS X (and written with Free Pascal).

I think Qt expects a huge icon (128x128 ?), because that?s the largest icon utilized, and then it will stretch draw the icon to fit smaller areas.

It?s not yet clear which approach Lazarus will follow for cross-platform icons. Currently we just don?t have is just a descendent of TBitmap. It?s possible that we will end up using .ICO files, because Windows is the most used platform. The ico file can contain the same icon is various sizes.

Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Felipe Monteiro de Carvalho

Ok, it seams like it?s trivial to solve the wierd image problem. Just add a IFDEF for Darwin and invert the screen coordinates.

All my code to get the screensize is concentrated on one place, because I don?t use Screen.Width on Windows, I use more complex methods to support multiple monitors, so this should be very easy, only one place to change the code.

However, it would be nice to find out what is wrong here. Maybe a Qt bug?

Felipe Monteiro de Carvalho
Den Jean
to Felipe Monteiro de Carvalho: I am bringing the subject to the mailling list, as it probably interrests everyone. Ok,…
Felipe Monteiro de Carvalho wrote 11 lines
Hello, I am bringing the subject to the mailling list, as it probably interrests everyone. On 2/14/07, Hess, Philip J wrote: > I've attached a small program that displays screen dimensions. On > Windows it displays 1024 x 768. On OS X it displays 768 x 1024, so it > looks like the dimensions are reversed. That would explain the odd screen > capture.

snippet from Qt's qrect.h

#if defined(Q_OS_MAC)
    int y1;
    int x1;
    int y2;
    int x2;
#else
    int x1;
    int y1;
    int x2;
    int y2;
#endif

So if you use the pascalify trick, the pascal definition of rect should be different on Mac.

Show quoted text 9 lines
Ok, my Qt code is obviously the same on all platforms, so is that expected??? At a glance, it looks like a Qt bug to me. A very good question is: Is that reversed on all Mac os x computers? Or your setup has something special (like libraries versions, don?t know), or maybe there is a reason I miss why the coordinates are inversed on mac os x?
Hess, Philip J
to Den Jean

Den,

I'm not sure if I know what you mean.

My test code passes in a pointer to a TRect.

Thanks.

-Phil

Earlier message 48 lines
-----Original Message----- From: [mailto:] On Behalf Of Den Jean Sent: Friday, February 16, 2007 1:48 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Magnifier on OS X On Wednesday 14 February 2007 18:54, Felipe Monteiro de Carvalho wrote: > Hello, > > I am bringing the subject to the mailling list, as it probably > interrests everyone. > > On 2/14/07, Hess, Philip J wrote: > > I've attached a small program that displays screen dimensions. On > > Windows it displays 1024 x 768. On OS X it displays 768 x 1024, so it > > looks like the dimensions are reversed. That would explain the odd screen > > capture. > snippet from Qt's qrect.h #if defined(Q_OS_MAC) int y1; int x1; int y2; int x2; #else int x1; int y1; int x2; int y2; #endif So if you use the pascalify trick, the pascal definition of rect should be different on Mac. > Ok, my Qt code is obviously the same on all platforms, so is that > expected??? > > At a glance, it looks like a Qt bug to me. > > A very good question is: Is that reversed on all Mac os x computers? > Or your setup has something special (like libraries versions, don?t > know), or maybe there is a reason I miss why the coordinates are > inversed on mac os x?
Den Jean
to Hess, Philip J
Philip J wrote
Den, I'm not sure if I know what you mean.
LCL should use the correct Rect for Darwin
in FPC source dir:
./rtl/macos/macostp.inc:
  Rect = record
    case INTEGER of
     0: (
       top: INTEGER;
       left: INTEGER;
       bottom: INTEGER;
       right: INTEGER;
     );
     1: (
       topLeft: Point;
       botRight: Point;
     );
   end;
which is different from
./rtl/win32/wininc/struct.inc:
     RECT = record
          case Integer of
             0: (Left,Top,Right,Bottom : Longint);
             1: (TopLeft,BottomRight : TPoint);
       end;
Show quoted text 62 lines
My test code passes in a pointer to a TRect. Thanks. -Phil -----Original Message----- From: [mailto:] On Behalf Of Den Jean Sent: Friday, February 16, 2007 1:48 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Magnifier on OS X On Wednesday 14 February 2007 18:54, Felipe Monteiro de Carvalho wrote: > Hello, > > I am bringing the subject to the mailling list, as it probably > interrests everyone. > > On 2/14/07, Hess, Philip J wrote: > > I've attached a small program that displays screen dimensions. On > > Windows it displays 1024 x 768. On OS X it displays 768 x 1024, so it > > looks like the dimensions are reversed. That would explain the odd > > screen capture. snippet from Qt's qrect.h #if defined(Q_OS_MAC) int y1; int x1; int y2; int x2; #else int x1; int y1; int x2; int y2; #endif So if you use the pascalify trick, the pascal definition of rect should be different on Mac. > Ok, my Qt code is obviously the same on all platforms, so is that > expected??? > > At a glance, it looks like a Qt bug to me. > > A very good question is: Is that reversed on all Mac os x computers? > Or your setup has something special (like libraries versions, don?t > know), or maybe there is a reason I miss why the coordinates are > inversed on mac os x? _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt
Hess, Philip J
to Den Jean

Den,

Since the declarations are different in FPC RTL, the test code should have worked, right?

Or is TRect different from Rect?

Thanks.

-Phil

Earlier message 98 lines
-----Original Message----- From: [mailto:] On Behalf Of Den Jean Sent: Friday, February 16, 2007 2:10 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Magnifier on OS X On Friday 16 February 2007 19:49, Hess, Philip J wrote: > Den, > > I'm not sure if I know what you mean. LCL should use the correct Rect for Darwin in FPC source dir: ./rtl/macos/macostp.inc: Rect = record case INTEGER of 0: ( top: INTEGER; left: INTEGER; bottom: INTEGER; right: INTEGER; ); 1: ( topLeft: Point; botRight: Point; ); end; which is different from ./rtl/win32/wininc/struct.inc: RECT = record case Integer of 0: (Left,Top,Right,Bottom : Longint); 1: (TopLeft,BottomRight : TPoint); end; > > My test code passes in a pointer to a TRect. > > Thanks. > > -Phil > > > -----Original Message----- > From: > [mailto:] On Behalf Of Den Jean Sent: > Friday, February 16, 2007 1:48 PM > To: Items specific to the Qt widget set > Subject: Re: [Qt] Magnifier on OS X > > On Wednesday 14 February 2007 18:54, Felipe Monteiro de Carvalho wrote: > > Hello, > > > > I am bringing the subject to the mailling list, as it probably > > interrests everyone. > > > > On 2/14/07, Hess, Philip J wrote: > > > I've attached a small program that displays screen dimensions. On > > > Windows it displays 1024 x 768. On OS X it displays 768 x 1024, so it > > > looks like the dimensions are reversed. That would explain the odd > > > screen capture. > > snippet from Qt's qrect.h > > #if defined(Q_OS_MAC) > int y1; > int x1; > int y2; > int x2; > #else > int x1; > int y1; > int x2; > int y2; > #endif > > So if you use the pascalify trick, the pascal definition of rect > should be different on Mac. > > > Ok, my Qt code is obviously the same on all platforms, so is that > > expected??? > > > > At a glance, it looks like a Qt bug to me. > > > > A very good question is: Is that reversed on all Mac os x computers? > > Or your setup has something special (like libraries versions, don?t > > know), or maybe there is a reason I miss why the coordinates are > > inversed on mac os x? > > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt > _______________________________________________ > Qt mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/qt
Vicnent Snijders
to Den Jean: LCL should use the correct Rect for Darwin in FPC source dir: ./rtl/macos/macostp.inc:…
Den Jean wrote 7 lines
On Friday 16 February 2007 19:49, Hess, Philip J wrote: > Den, > > I'm not sure if I know what you mean. LCL should use the correct Rect for Darwin in FPC source dir: ./rtl/macos/macostp.inc:

I am not sure, but this is not used on Darwin, but on macos version 9 and earlier.

Show quoted text 23 lines
Rect = record case INTEGER of 0: ( top: INTEGER; left: INTEGER; bottom: INTEGER; right: INTEGER; ); 1: ( topLeft: Point; botRight: Point; ); end; which is different from ./rtl/win32/wininc/struct.inc: RECT = record case Integer of 0: (Left,Top,Right,Bottom : Longint); 1: (TopLeft,BottomRight : TPoint); end;
Felipe Monteiro de Carvalho
to Den Jean: snippet from Qt's qrect.h #if defined(Q_OS_MAC) int y1; int x1; int y2; int x2; #else int…
Den Jean wrote 13 lines
snippet from Qt's qrect.h #if defined(Q_OS_MAC) int y1; int x1; int y2; int x2; #else int x1; int y1; int x2; int y2; #endif

What is the point of this invertion? Is this utilized on Carbon too? If so, then free pascal should also change the rect.

If not, it would be nice if the Qt bindings could put things in correct order for us, se we always see a TRect.

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

The question is where the translation should go. If that's the way it's defined in Qt, I'm not sure we want to change the meaning of what's returned by Qt4.pas. Perhaps a small utility routine could be added to the Qt widgetset that is called immediately after every call that returns a PRect:

procedure PascalizeTRect;
{$IFNDEF DARWIN}
//Do nothing
{$ELSE}
  swap y1 with x1 and y2 with x2
{$ENDIF}
end;

Den, what do you think about the place where this should go?

Thanks.

-Phil

Earlier message 29 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Sat 2/17/2007 12:41 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Magnifier on OS X On 2/16/07, Den Jean wrote: > snippet from Qt's qrect.h > > #if defined(Q_OS_MAC) > int y1; > int x1; > int y2; > int x2; > #else > int x1; > int y1; > int x2; > int y2; > #endif What is the point of this invertion? Is this utilized on Carbon too? If so, then free pascal should also change the rect. If not, it would be nice if the Qt bindings could put things in correct order for us, se we always see a TRect. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Vincent Snijders: To use QT's messagebox functions, the widgetset should override TWidgetSet.PromptUser.…

Felipe,

I took Vincent's suggestion and overrode TWidgetSet.PromptUser. MessageDlg now appears to work okay but probably needs additional testing. Please feel free to change capitalization, etc. to fit the Qt widgetset style.

Thanks, Vincent, for the suggestion.

-Phil

Earlier message 23 lines
-----Original Message----- From: on behalf of Vincent Snijders Sent: Thu 2/15/2007 4:48 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Qt widgetset MessageDlg Felipe Monteiro de Carvalho schreef: > On 2/15/07, Hess, Philip J wrote: >> MessageDlg doesn't work right with the Qt widgetset. On both Windows >> and OS X it's just a tall box that extends below the task bar/dock. On >> OS X, the buttons aren't accessible. > > That is correct, it?s like that on Linux too. I tryed some time ago to > implement it, but I got confused, so it?s better to ask on the main > mailling list where Vincent, Mattias, etc should know better then I > what needs to be done. Althougth I think I already asked without much > answer, so one will probably have to dig lcl code to find out how this > works. > To use QT's messagebox functions, the widgetset should override TWidgetSet.PromptUser. Vincnet
Hess, Philip J
to Felipe Monteiro de Carvalho: Don?t you have a image editor capable of drawing XPM? If not I can send one for you. Gimp…

Felipe,

I created a 128 x 128 icon. That's also the size that OS X wants for the icon it uses for the app in the Dock and in Finder.

Problem: When I try to save it to an .xpm file, Gimp 2.2 fails with a "Plug-in could not save image" error, so I'm stuck for now. I would attach it to this message but it's too big for the Qt list (>40 kb).

Thanks.

-Phil

Earlier message 26 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Fri 2/16/2007 1:13 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X On 2/16/07, Hess, Philip J wrote: > Now we just have to find an icon big enough to see. This .xpm is teeny, tiny on OS X too. Don?t you have a image editor capable of drawing XPM? If not I can send one for you. Gimp and Pixel Image Editor both should be able to do it. I think Pixel is native on Mac OS X (and written with Free Pascal). I think Qt expects a huge icon (128x128 ?), because that?s the largest icon utilized, and then it will stretch draw the icon to fit smaller areas. It?s not yet clear which approach Lazarus will follow for cross-platform icons. Currently we just don?t have is just a descendent of TBitmap. It?s possible that we will end up using .ICO files, because Windows is the most used platform. The ico file can contain the same icon is various sizes. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: the files came with wierd names, like qtlcli~1.inc Can you create a Diff using…

That's odd.

The two files I sent are qtlclintfh.inc and qtlclintf.inc. Try renaming them.

Thanks.

-Phil

Earlier message 15 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Sun 2/18/2007 1:00 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Qt widgetset MessageDlg Hello, the files came with wierd names, like qtlcli~1.inc Can you create a Diff using subversion?? thanks, -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: You could try Pixel Image Editor. The demo version is free. Anyway, I'm sending a icon in…

Felipe,

The .xpm you sent me works great with my qttesttray.pas program, but not with Magnifier. SystrayIcon.Icon.LoadFromFile loads without error, but I'm still getting the error message:

QSystemTrayIcon::setVisible: No Icon set

I'm making changes to the code so it works properly on OS X. Will send you diff files when I'm done.

Also, the rectangle around non-focused TEdit's is visible now on OS X. Did you do something to the Qt widgetset code to fix this?

Thanks.

-Phil

Earlier message 14 lines
-----Original Message----- From: on behalf of Felipe Monteiro de Carvalho Sent: Sun 2/18/2007 2:12 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X You could try Pixel Image Editor. The demo version is free. Anyway, I'm sending a icon in private because it's too big. Ok, I think it's time to increase the attachment limits .... I will try to contact Michael Hess -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho

Thank you very much,

May I will add your name on the contributors list of the magnifier?

The OS X .dmg can also be "localized" if you want to translate these 3 .rtf's into other languages.

Very interresting. It looks like a dmg is a complete install system, is it? On the screenshot it also looks very good.

I'm not sure if I understand your build directory. To create the .app bundle and .dmg a Mac will be needed.

Yes, I know. But I decided to put all build scripts on the build directory because the root directory was getting crowded =)

Also, does the tray icon image show with a very big icon image?

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

Sure, you can include me as a contributor, although I haven't really contributed much code.

On OS X, a .dmg file is what's known as a "disk image". Double-clicking it "mounts" the file on the desktop and opens the image, where there will be one or more packages (.pkg) to install. Double-clicking a package invokes the OS X Installer, which is what you see in the screenshot I sent you.

Package Maker is used to create the .pkg file and can include all sorts of things about privileges, destination, scripts, welcome, readme and license screens, etc. Disk Utility is used to create a .dmg file from the .pkg file.

Package Maker also has a command line mode, but I haven't used that yet, just the interactive mode.

In my qttesttray.pas example, the 128 x 128 icon looks fine on the menu bar. However, the icon does not appear in Magnifier - there must be something wrong with the Magnifier or Qt widgetset code. However, even though there is no icon, the drop down menu still works in Magnifier when I click on the tray where the icon should be.

Thanks.

-Phil

Earlier message 28 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Monday, February 19, 2007 9:31 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X Thank you very much, May I will add your name on the contributors list of the magnifier? > The OS X .dmg can also be "localized" if you want to translate these 3 > .rtf's into other languages. Very interresting. It looks like a dmg is a complete install system, is it? On the screenshot it also looks very good. > I'm not sure if I understand your build directory. To create the .app > bundle and .dmg a Mac will be needed. Yes, I know. But I decided to put all build scripts on the build directory because the root directory was getting crowded =) Also, does the tray icon image show with a very big icon image? -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Hess, Philip J
Philip J wrote
there must be something wrong with the Magnifier or Qt widgetset code.

Indeed, I almost forgot I commented the icon setting code because it was giving wierd problems. I should get back to you once I fix this.

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

I wonder if the reversed TRect dimensions also explains why TStringGrid is just a jumble of lines on OS X with the Qt widgetset.

A question about my TQtWidgetSet.PromptUser code: I wasn't sure what to pass as a parent to QMessageBox_warning, etc. so I just passed nil, which seems to work. Should something from the application or main or current window be used instead?

Thanks.

-Phil

Earlier message 17 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Monday, February 19, 2007 1:00 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X On 2/19/07, Hess, Philip J wrote: > there must be > something wrong with the Magnifier or Qt widgetset code. Indeed, I almost forgot I commented the icon setting code because it was giving wierd problems. I should get back to you once I fix this. -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
Philip J wrote
I looked at the Carbon widgetset a couple times before and couldn't figure out where to get started with the canvas, fonts, etc. things that need to be added. Maybe I was starting at the wrong place.

Canvas and fonts are essentially implemented using winapi functions, like GetObject, SelectObject, CreateCompatibleDC, GetDC, ReleaseDC, CreateIndirectFont, etc...

And there are of course the drawing functions, like Rectangle, Circle, Draw3DFrame, etc

Here is a example of how the dc interacts with a bitmap, and all functions utilized on the process:

http://wiki.lazarus.freepascal.org/LCL_Internals#Implementing_TBitmap

I think the Carbon widgetset could really get going if there was somebody who wanted to tackle the next level (canvas, etc.). This is where I was thinking about a bounty a month or so back.

I am thinking about buying a 13' mac (the cheapest), so maybe I can help in the future (at least 2 months from now).

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

Felipe,

Are you looking at the MacBook laptop? I've been thinking about getting one of those too. My old Cube is still perfectly functional and even runs the latest Tiger, but sometimes it's just too slow (450 MHz G4).

That would be great if you could direct some of your apparently endless energy towards the Carbon widgetset.

Thanks.

-Phil

Earlier message 35 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Thursday, February 22, 2007 1:09 AM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X On 2/22/07, Hess, Philip J wrote: > I looked at the Carbon widgetset a couple times before and couldn't > figure out where to get started with the canvas, fonts, etc. things that > need to be added. Maybe I was starting at the wrong place. Canvas and fonts are essentially implemented using winapi functions, like GetObject, SelectObject, CreateCompatibleDC, GetDC, ReleaseDC, CreateIndirectFont, etc... And there are of course the drawing functions, like Rectangle, Circle, Draw3DFrame, etc Here is a example of how the dc interacts with a bitmap, and all functions utilized on the process: http://wiki.lazarus.freepascal.org/LCL_Internals#Implementing_TBitmap > I think the Carbon widgetset could really get going if there was > somebody who wanted to tackle the next level (canvas, etc.). This is > where I was thinking about a bounty a month or so back. I am thinking about buying a 13' mac (the cheapest), so maybe I can help in the future (at least 2 months from now). -- Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho
to Hess, Philip J
Philip J wrote
Are you looking at the MacBook laptop? I've been thinking about getting one of those too. My old Cube is still perfectly functional and even runs the latest Tiger, but sometimes it's just too slow (450 MHz G4).

I looked at the Macbook prices, but the cheapest model is 1000 euros. That's far too much for me. I am thinking now about buying something used.

How does a cube work? It's a notebook or a desktop? Desktop is a little problematic for me due to having to space and transportation issues.

Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho

A Cube is just a desktop in the shape of a cube.

I noticed that the Euro prices were higher than the prices here in the U.S. Maybe the 19% tax.

If you'll always have access to a monitor, keyboard and mouse, you might look at the Mac mini. Much cheaper than a laptop and also much smaller even than a laptop. I believe any USB keyboard and mouse works and probably pretty much any type of standard monitor.

Also, I would think that you could find a used G4 machine for pretty cheap. One "problem" with Macs is that they tend to last longer than PCs and thus people hang onto them longer. Note that a 6-year-old Mac still runs Tiger. Try running XP or Vista on a 6-year-old PC.

Thanks.

-Phil

Earlier message 24 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Thursday, February 22, 2007 2:00 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X On 2/22/07, Hess, Philip J wrote: > Are you looking at the MacBook laptop? I've been thinking about getting > one of those too. My old Cube is still perfectly functional and even > runs the latest Tiger, but sometimes it's just too slow (450 MHz G4). I looked at the Macbook prices, but the cheapest model is 1000 euros. That's far too much for me. I am thinking now about buying something used. How does a cube work? It's a notebook or a desktop? Desktop is a little problematic for me due to having to space and transportation issues. -- Felipe Monteiro de Carvalho
Hess, Philip J
to Felipe Monteiro de Carvalho: Is there much difference for being a G3? I found this add:…

Felipe,

We also have an 800 MHz iBook at home and it's certainly much faster than my Cube even with only a G3.

Note that the one you're looking at doesn't have the Airport (wireless) card - don't know if that's important to you. You might be able to find one of these cheap somewhere - Apple doesn't make them anymore for that older model (new ones have the faster "Airport Extreme" card).

And you'll probably want to boost the RAM. I usually order memory from this place (has good information on type and amount of memory each model of iBook can use):

http://www.transintl.com/macupgrades/index.cfm

It also has only Panther (10.3), not Tiger. Do you have access to Apple's educational prices? OS X 10.4 Tiger is much cheaper that way if you want to upgrade.

You can use any USB mouse if you prefer that to the trackpad. We bought a $15 Kensington "PocketMouse" recently - very nice and small for use with a laptop.

Thanks.

-Phil

Earlier message 23 lines
-----Original Message----- From: [mailto:] On Behalf Of Felipe Monteiro de Carvalho Sent: Thursday, February 22, 2007 3:28 PM To: Items specific to the Qt widget set Subject: Re: [Qt] Re: Magnifier on OS X Hello, Is there much difference for being a G3? I found this add: http://www.macofalltrades.com/G3_800MHz_iBook_12_256_30GB_CD_p/g3800ib12 10.htm It's a G3 iBook, but it has 800Mhz, so it shouldn't be too slow. I don't know how much it costs to ship the computer, but 350 dolars is a excelent price =) That is about how much I am willing to expend on this. -- Felipe Monteiro de Carvalho