硬质合金 / Symbian C++ - 更改应用程序图标

发布于 2024-07-10 22:48:51 字数 251 浏览 5 评论 0原文

我正在使用 Carbide(刚刚升级到 2.0)来开发 S60 第三版应用程序。

我想知道更改图标(设备菜单上的应用程序图标和主视图左上角的图标)的最简单方法,因为我需要将我的应用程序换肤尽可能轻松地采用多种不同的方式。

到目前为止,我所有处理 .mif 文件的努力都失败了。 我有一个用 Illustrator 制作的 44x44 .svg 图标,有人可以帮助我找到正确的方向吗?

谢谢!

I am using Carbide (just upgraded to 2.0) to develop an S60 3rd Edition application.

I would like to know the easiest way to change the icon (both the application icon on the device menu and the icon at the top left of the main view) because I have the need to skin my application in many different ways as easily as possible.

All my efforts with messing around with .mif files have so far failed. I have a 44x44 .svg icon I made with Illustrator, could someone please help me in the right direction?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

若水微香 2024-07-17 22:48:51

要在运行应用程序时更改应用程序图标(在状态栏中):

CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
CAknContextPane* cp=(CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));
_LIT(KContextBitMapFile, "my_bitmap_file.mbm");
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmap);
CleanupStack::PushL(bitmap);
CFbsBitmap*  bitmapmask = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmapMask);
CleanupStack::PushL(bitmapmask);
cp->SetPicture(bitmap, bitmapmask);
CleanupStack::Pop(); // bitmapmask
CleanupStack::Pop(); // bitmap
DrawNow();

除了使用不同的 mif 文件重新安装应用程序之外,我不知道以编程方式更改菜单列表中的应用程序图标的任何可能性。

To change the app icon when you run your app use (in the status bar):

CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
CAknContextPane* cp=(CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));
_LIT(KContextBitMapFile, "my_bitmap_file.mbm");
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmap);
CleanupStack::PushL(bitmap);
CFbsBitmap*  bitmapmask = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmapMask);
CleanupStack::PushL(bitmapmask);
cp->SetPicture(bitmap, bitmapmask);
CleanupStack::Pop(); // bitmapmask
CleanupStack::Pop(); // bitmap
DrawNow();

I'm not aware of any possibility of changing the app icon in the menu list programmatically, other than reinstalling the app with different mif file.

青朷 2024-07-17 22:48:51

如果您想更改 SIS 文件中的图标,然后在设备上重新安装它,那么您可能必须在安装后重新启动设备 - 应用程序图标位于 Symbian 缓存中并且不会更新。

If you want to change the icon in your SIS file and then overinstall it on device then you may have to reboot your device after installation - the application icon is in the Symbian cache and is not updated.

等待我真够勒 2024-07-17 22:48:51

使用最新的 QMake 和 Qt SDK (4.6.2),您不需要自己创建任何 .mif 文件。 SVG 文件就可以了。

有关更详细的说明,请参阅:如何在Symbian S60中设置Qt应用程序图标和标题

虽然文章使用的是Qt Creator,但是只要你使用QMake那就是一样的。

With latest QMake and Qt SDK (4.6.2) you don't need to create any .mif file yourself. An SVG file will do.

For more detailed instructions see: How to Set Qt Application Icon and Title in Symbian S60.

Although the article uses Qt Creator, as long as you use QMake then it's the same thing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文