Ejemplo n.º 1
0
CString CSySkin::GetSrandPath()
{
	CString strResult, strTmp;
	CTime mTime = CTime::GetCurrentTime();
	strResult = mTime.Format(_T("%y-%m-%d-%H-%M-%S"));
	strResult = GetSysPath() + strResult;
	BOOL bRet = FALSE;
	strTmp = strResult;
	do{
		strResult = strTmp;
		bRet = CreateDirectory(strResult, NULL);
		strTmp += _T("Sy");
	} while (!bRet);
	strResult += _T("\\");
	HideFolder(strResult);
	return strResult;
}
	UnhideListViewBase::UnhideListViewBase (ICoreProxy_ptr proxy, QWidget *parent)
	: QDeclarativeView (parent)
	, Model_ (new UnhideListModel (this))
	{
		new UnhoverDeleteMixin (this);

		const auto& file = GetSysPath (SysPath::QML, "common", "UnhideListView.qml");
		if (file.isEmpty ())
		{
			qWarning () << Q_FUNC_INFO
					<< "file not found";
			deleteLater ();
			return;
		}

		setStyleSheet ("background: transparent");
		setWindowFlags (Qt::ToolTip);
		setAttribute (Qt::WA_TranslucentBackground);

		for (const auto& cand : GetPathCandidates (SysPath::QML, ""))
			engine ()->addImportPath (cand);

		rootContext ()->setContextProperty ("unhideListModel", Model_);
		rootContext ()->setContextProperty ("colorProxy",
				new Util::ColorThemeProxy (proxy->GetColorThemeManager (), this));
		engine ()->addImageProvider ("ThemeIcons", new Util::ThemeImageProvider (proxy));
		setSource (QUrl::fromLocalFile (file));

		connect (rootObject (),
				SIGNAL (closeRequested ()),
				this,
				SLOT (deleteLater ()));
		connect (rootObject (),
				SIGNAL (itemUnhideRequested (QString)),
				this,
				SIGNAL (itemUnhideRequested (QString)));
	}
Ejemplo n.º 3
0
	QUrl GetSysPathUrl (SysPath path, const QString& subfolder, const QString& filename)
	{
		return QUrl::fromLocalFile (GetSysPath (path, subfolder, filename));
	}
Ejemplo n.º 4
0
bool CLibrary::Load(LPCWSTR fileName)
{
  if (g_IsNT)
    return LoadOperations(::LoadLibraryW(fileName));
  return Load(GetSysPath(fileName));
}
Ejemplo n.º 5
0
bool CLibrary::LoadEx(LPCWSTR fileName, DWORD flags)
{
  if (g_IsNT)
    return LoadOperations(::LoadLibraryExW(fileName, NULL, flags));
  return LoadEx(GetSysPath(fileName), flags);
}