コード例 #1
0
EXPORT_C MAknIconFileProvider* JuikIcons::LoadIconsViaFileProviderL(CArrayPtrFlat<CGulIcon> * aIconList, 
																	const TDesC& aIconFile, 
																	const TIconID2* aIconDefs, TInt aNbIcons)
{
	CALLSTACKITEMSTATIC_N(_CL("JuikIcons"), _CL("LoadIconsViaFileProviderL"));
#ifdef __SCALABLEUI_VARIANT__
	
	CEikonEnv* env=CEikonEnv::Static();
	RFs& fs=env->FsSession();
	
	CWsScreenDevice* screen=CEikonEnv::Static()->ScreenDevice();
			
	TFileName real; 
	FigureOutRealPathL( aIconFile, real, fs);				
	
	auto_ptr<CIconFileProvider> iconProvider( CIconFileProvider::NewL( real ) );

	// Loop through icon ids
	for (int i = 0; i<aNbIcons;i++)
		{
			iconProvider->AddRefCount();
			auto_ptr<CGulIcon> icon( LoadScalableIconL( *iconProvider, 
														aIconDefs[i].iBitmap, 
														aIconDefs[i].iMask, screen) );
			aIconList->AppendL(icon.get()); 
			icon.release();
			}
#endif 
	return iconProvider.release();
}
コード例 #2
0
int QFileInfoGatherer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QThread::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: updates((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QList<QPair<QString,QFileInfo> >(*)>(_a[2]))); break;
        case 1: newListOfFiles((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QStringList(*)>(_a[2]))); break;
        case 2: nameResolved((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break;
        case 3: list((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 4: fetchExtendedInformation((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QStringList(*)>(_a[2]))); break;
        case 5: updateFile((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 6: setResolveSymlinks((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 7: { bool _r = resolveSymlinks();
            if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
        case 8: setIconProvider((*reinterpret_cast< QFileIconProvider*(*)>(_a[1]))); break;
        case 9: { QFileIconProvider* _r = iconProvider();
            if (_a[0]) *reinterpret_cast< QFileIconProvider**>(_a[0]) = _r; }  break;
        }
        _id -= 10;
    }
    return _id;
}