コード例 #1
0
ファイル: LoginDlg.cpp プロジェクト: Omgan/code4me
CLoginDlg::CLoginDlg(CWnd* parent) 
	: QnSkinDialog(CLoginDlg::IDD, parent)
{
	SetTheme(theApp.m_pTheme);
	CString strPath = theApp.GetAppResPath() + _T("\\title_logo.png");
	m_pIconImage = LoadPngImage(strPath);
}
コード例 #2
0
LRESULT CXTPShortcutListBox::OnSetTheme(WPARAM wParam, LPARAM /*lParam*/)
{
    XTPControlTheme eTheme = (XTPControlTheme)wParam;

    SetTheme(eTheme);

    return 0;
}
コード例 #3
0
ファイル: GridDisplay.cpp プロジェクト: ultimatepp/mirror
void GridDisplay::SetDefault()
{
	SetTextAlign();
	SetHorzMargin();
	SetVertMargin();
	SetTheme();
	ReverseSortIcon(false);
}
コード例 #4
0
LRESULT CXTPHeaderCtrl::OnSetTheme(WPARAM wParam, LPARAM /*lParam*/)
{
	XTPControlTheme eTheme = (XTPControlTheme)wParam;

	SetTheme(eTheme);

	return 0;
}
コード例 #5
0
CXTPShortcutListBox::CXTPShortcutListBox()
    : m_bNoBorder(false)
    , m_bHilight(true)
    , m_bNoUnderline(true)
    , m_hCursor(NULL)
    , m_bHilightItemID(-1)
    , m_bTimerActive(false)
    , m_nPrevIndex(-1)
    , m_pTheme(NULL)
{
    VERIFY(SetTheme(xtpControlThemeDefault));
}
コード例 #6
0
void CXTPPopupControl::SetTheme(XTPPopupPaintTheme theme)
{
	//set new theme
	switch (theme)
	{
		case xtpPopupThemeMSN:
			SetTheme(new CXTPPopupThemeMSN());
			break;
		case xtpPopupThemeOffice2003:
			SetTheme(new CXTPPopupThemeOffice2003());
			break;
		case xtpPopupThemeResource:
			SetTheme(new CXTPPopupThemeResource());
			break;
		case xtpPopupThemeOfficeXP:
			SetTheme(new CXTPPopupThemeOfficeXP());
			break;
		case xtpPopupThemeOffice2000:
			SetTheme(new CXTPPopupThemeOffice2000());
			break;
		case xtpPopupThemeCustom:
		default:
			//error case!!!
			SetTheme(new CXTPPopupPaintManager());
			break;
	}
	m_paintTheme = theme;
}
コード例 #7
0
void CXTPControlTheme::SetTheme(HWND hWnd, XTPControlTheme nTheme)
{
	for (HWND hWndChild = ::GetTopWindow(hWnd); hWndChild != NULL;
		hWndChild = ::GetNextWindow(hWndChild, GW_HWNDNEXT))
	{
		::PostMessage(hWndChild, WM_XTP_SETCONTROLTHEME, (WPARAM)nTheme, (LPARAM)(nTheme == xtpControlThemeResource));

		if (::GetTopWindow(hWndChild) != NULL)
		{
			SetTheme(hWndChild, nTheme);
		}
	}
}
コード例 #8
0
CXTPHeaderCtrl::CXTPHeaderCtrl()
: m_iMinSize(0)
, m_nPos(0)
, m_iOverIndex(-1)
, m_nSortedCol(-1)
, m_bRTL(DetermineRTL())
, m_bAutoSize(false)
, m_bEnableMenus(TRUE)
, m_bAscending(TRUE)
, m_bLBtnDown(FALSE)
, m_bPainted(FALSE)
, m_popupMenuID(0)
, m_pt(CPoint(0, 0))
, m_pTheme(NULL)
{
	m_pImageManager = NULL;
	VERIFY(SetTheme(xtpControlThemeDefault));
}
コード例 #9
0
void KinotifyWidget::CreateWidget ()
{
    SetTheme (":/plugins/kinotify/resources/notification/commie");
    setStyleSheet ("background: transparent");
    page ()->mainFrame ()->setScrollBarPolicy (Qt::Horizontal, Qt::ScrollBarAlwaysOff);
    page ()->mainFrame ()->setScrollBarPolicy (Qt::Vertical, Qt::ScrollBarAlwaysOff);

    setWindowFlags (Qt::ToolTip | Qt::FramelessWindowHint );
    setAttribute(Qt::WA_DeleteOnClose,true);

    QPalette pal = palette ();
    pal.setBrush (QPalette::Base, Qt::transparent);
    page ()->setPalette (pal);
    setAttribute (Qt::WA_OpaquePaintEvent, false);
    settings ()->setAttribute (QWebSettings::AutoLoadImages, true);
    setAttribute (Qt::WA_TranslucentBackground);

    resize (DefaultSize_);
    setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
    page ()->setPreferredContentsSize (size ());
}
コード例 #10
0
ファイル: MainWindow.cpp プロジェクト: HaikuArchives/BeMines
void
MainWindow::MessageReceived(BMessage *msg)
{
	switch (msg->what)
	{
		case B_ABOUT_REQUESTED:
		{
			AboutRequested();
			break;
		}
		case M_SHOW_HELP:
		{
			HelpWindow *helpwin = new HelpWindow();
			helpwin->Show();
			break;
		}
		case M_SHOW_CUSTOM:
		{
			CustomWindow *cswin = new CustomWindow();
			cswin->Show();
			break;
		}
		case M_NEW_GAME:
		{
			SetFace(FACE_NORMAL);
			SetupGame();
			break;
		}
		case M_SHOW_SCORES:
		{
			ScoreWindow *scorewin = new ScoreWindow();
			scorewin->Show();
			break;
		}
		case M_PAUSE_GAME:
		{
			BMenuItem *item = fMenuBar->FindItem(M_PAUSE_GAME);
			if (fTimerView->GetState() == TIMER_START)
			{
				fTimerView->SetState(TIMER_STOP);
				if (item)
					item->SetMarked(true);
				fFieldView->SetPauseMode(true);
			}
			else
			{
				if (item->IsMarked())
				{
					fTimerView->SetState(TIMER_START);
					if (item)
						item->SetMarked(false);
					fFieldView->SetPauseMode(false);
				}
			}
			break;
		}
		case M_SET_DIFFICULTY:
		{
			int32 level;
			if (msg->FindInt32("level",&level) != B_OK)
				break;

			BMenuItem *item = fMenuBar->FindItem(M_SET_DIFFICULTY);
			BMenu *menu = item ? item->Menu() : NULL;

			item = menu->FindMarked();
			if (item)
				item->SetMarked(false);
			menu->ItemAt(level)->SetMarked(true);

			gDifficulty = level;
			SetupGame();
			fFieldView->SetPauseMode(false);
			break;
		}
		case M_UPDATE_COUNT:
		{
			fCounterView->SetCount(fFieldView->MineCount() - fFieldView->FlagCount());
			break;
		}
		case M_START_TIMER:
		{
			fTimerView->SetState(TIMER_RESET);
			fTimerView->SetState(TIMER_START);
			gGameState = GAME_STARTED;
			break;
		}
		case M_SONAR_PENALTY:
		{
			fTimerView->SetState(TIMER_STOP);
			if (fTimerView->GetTime() < 979)
				fTimerView->SetTime(fTimerView->GetTime() + 20);
			else
				fTimerView->SetTime(999);
			fTimerView->SetState(TIMER_START);
			if (fFieldView->CheckWin())
				fFieldView->DoWin();
			break;
		}
		case M_SIZE_CHANGED:
		{
			ResizeTo(fFieldView->Frame().right + 10,fFieldView->Frame().bottom + 10);
			break;
		}
		case M_SET_THEME:
		{
			BString name;
			if (msg->FindString("name",&name) == B_OK)
				SetTheme(name.String());

			break;
		}
		case M_TOGGLE_SOUNDS:
		{
			gPlaySounds = gPlaySounds ? false : true;
			BMenuItem *item = fMenuBar->FindItem(M_TOGGLE_SOUNDS);
			if (item)
				item->SetMarked(!item->IsMarked());
			break;
		}
		default:
		{
			BWindow::MessageReceived(msg);
			break;
		}
	}
}
コード例 #11
0
void CXTThemeManagerStyleHost::SetTheme (XTThemeStyle theme)
{
    SetTheme(m_pDefaultFactory->CreateTheme(theme));
}
コード例 #12
0
void CXTThemeManagerStyleFactory::SetTheme(XTThemeStyle theme)
{
    SetTheme(CreateTheme(theme));
}