本文整理汇总了C++中KIconLoader::insertDirectory方法的典型用法代码示例。如果您正苦于以下问题:C++ KIconLoader::insertDirectory方法的具体用法?C++ KIconLoader::insertDirectory怎么用?C++ KIconLoader::insertDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KIconLoader
的用法示例。
在下文中一共展示了KIconLoader::insertDirectory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fn
KDMConfigApplication::KDMConfigApplication(int &argc, char **argv, const char *name)
: KControlApplication(argc, argv, name)
{
appearance = 0;
font = 0;
background = 0;
users = 0;
sessions = 0;
pages = getPageList();
if (runGUI())
{
QString fn(CONFIGFILE);
QFileInfo fi(fn.data());
if(fi.isReadable() && fi.isWritable())
{
kimgioRegister();
KIconLoader *iconloader = kapp->getIconLoader();
if(iconloader)
{
QString idir(kapp->kde_datadir() + "/kdm/pics/users");
iconloader->insertDirectory(0, idir.data());
idir = kapp->kde_datadir() + "/kdm/pics";
iconloader->insertDirectory(0, idir.data());
idir = kapp->kde_wallpaperdir();
iconloader->insertDirectory(0, idir.data());
//idir = kapp->kde_icondir();
//iconloader->insertDirectory(0, idir.data());
}
if (!pages || pages->contains("appearance"))
addPage(appearance = new KDMAppearanceWidget(dialog, "appearance", FALSE),
klocale->translate("&Appearance"),
"kdm-appear.html");
if (!pages || pages->contains("font"))
addPage(font = new KDMFontWidget(dialog, "font", FALSE),
klocale->translate("&Fonts"),
"kdm-font.html");
if (!pages || pages->contains("background"))
addPage(background = new KDMBackgroundWidget(dialog, "background", FALSE),
klocale->translate("&Background"), "kdm-backgnd.html");
if (!pages || pages->contains("users"))
addPage(users = new KDMUsersWidget(dialog, "users", FALSE),
klocale->translate("&Users"), "kdm-users.html");
if (!pages || pages->contains("sessions"))
addPage(sessions = new KDMSessionsWidget(dialog, "sessions", FALSE),
klocale->translate("&Sessions"), "kdm-sess.html");
if (appearance || font || background || sessions || users)
dialog->show();
else
{
fprintf(stderr, klocale->translate("usage: kdmconfig [-init | {appearance,font,background,sessions,users}]\n"));
justInit = TRUE;
}
}
}
}