コード例 #1
0
void CStatusBar::OnPrefChanged()
{
	m_bBackgrWinDefault = GETTHEMEBOOL(_T("StatusBar"), _T("BackgrWindowsDefault"));
	m_clrBackgrT = GETTHEMECOLOR(_T("StatusBar"), _T("BackgrTopColor"));
	m_clrBackgrB = GETTHEMECOLOR(_T("StatusBar"), _T("BackgrBottomColor"));
	m_clrBackgrLine = GETTHEMECOLOR(_T("StatusBar"), _T("BackgrLineColor"));
	m_clrText = GETTHEMECOLOR(_T("StatusBar"), _T("TextColor"));
	SetText(GETSTR(IDS_READY));

	OnScaleChanged();
}
コード例 #2
0
void ENT_GeometryOutln::InitTransformationTab() {
    QVBoxLayout* vbox = NULL;

    _grpPosition = new QGroupBox("position");
    _grpPosition->setObjectName("vectorGroup");

    vbox = new QVBoxLayout;
    for(int i = 0; i < 3; ++i) {
        _sbPosition[i] = new NBW_SpinBox;
        _sbPosition[i]->setText(QString("%1: ").arg(static_cast<char>('x' + i)));
        // TODO: actually, it's not good that these values are bounded
        _sbPosition[i]->setMinimum(-100);
        _sbPosition[i]->setMaximum( 100);
        _sbPosition[i]->setSingleStep(leda::rational(1, 10));
        _sbPosition[i]->setValue(_subject.GetPosition().vec[i]);
        connect(_sbPosition[i], SIGNAL(SigValueChanged(leda::rational)), this, SLOT(OnPositionChanged(leda::rational)));
        vbox->addWidget(_sbPosition[i]);
    }
    _grpPosition->setLayout(vbox);

    _grpScale = new QGroupBox("scale");
    _grpScale->setObjectName("vectorGroup");

    vbox = new QVBoxLayout;
    for(int i = 0; i < 3; ++i) {
        _sbScale[i] = new NBW_SpinBox;
        _sbScale[i]->setText(QString("%1: ").arg(static_cast<char>('x' + i)));
        // TODO: actually, it's not good that these values are bounded
        _sbScale[i]->setMinimum(-100);
        _sbScale[i]->setMaximum( 100);
        _sbScale[i]->setSingleStep(leda::rational(1, 10));
        _sbScale[i]->setValue(_subject.GetScale().vec[i]);
        connect(_sbScale[i], SIGNAL(SigValueChanged(leda::rational)), this, SLOT(OnScaleChanged(leda::rational)));
        vbox->addWidget(_sbScale[i]);
    }
    _grpScale->setLayout(vbox);

    vbox = new QVBoxLayout;
    vbox->addWidget(_grpPosition);
    vbox->addWidget(_grpScale);
    vbox->addStretch();

    _vectors = new QWidget;
    _vectors->setLayout(vbox);

    vbox = new QVBoxLayout;
    vbox->addWidget(_vectors);

    _tabTransformation = new QWidget;
    _tabTransformation->setLayout(vbox);
}
コード例 #3
0
ファイル: LogWnd.cpp プロジェクト: anlarke/MovieExplorer
void CLogWnd::OnPrefChanged()
{
	DeleteObject(m_hbrBackgr);
	m_hbrBackgr = CreateSolidBrush(GETTHEMECOLOR(_T("LogWnd"), _T("BackgrColor")));
	m_clrBackgrLine = GETTHEMECOLOR(_T("LogWnd"), _T("BackgrLineColor"));
	m_clrText = GETTHEMECOLOR(_T("LogWnd"), _T("TextColor"));
	
	DWORD dwStyle = (DWORD)GetWindowLong(m_edit, GWL_STYLE);
	if (GETTHEMEBOOL(_T("LogWnd"), _T("ShowScrollBar")))
		dwStyle |= WS_VSCROLL;
	else
		dwStyle &= ~WS_VSCROLL;
	SetWindowLong(m_edit, GWL_STYLE, (LONG)dwStyle);

	OnScaleChanged();
}
コード例 #4
0
ファイル: ReBar.cpp プロジェクト: lipse/MovieExplorer
void CReBar::OnPrefChanged()
{
	m_bBackgrWinDefault = GETTHEMEBOOL(_T("ReBar"), _T("BackgrWindowsDefault"));
	m_clrBackgrT = GETTHEMECOLOR(_T("ReBar"), _T("BackgrTopColor"));
	m_clrBackgrB = GETTHEMECOLOR(_T("ReBar"), _T("BackgrBottomColor"));
	m_clrBackgrLine = GETTHEMECOLOR(_T("ReBar"), _T("BackgrLineColor"));
	
	m_bInstantSearch = GETPREFBOOL(_T("Search"), _T("Instantly"));
	m_bLiteralSearch = GETPREFBOOL(_T("Search"), _T("Literally"));

	m_mdcToolsBtn.Create(48, 48);
	DrawAlphaMap(m_mdcToolsBtn, 0, 0, IDA_WRENCH, 48, 48, 
			GETTHEMECOLOR(_T("ToolBarButton"), _T("IconColor")),
			GETTHEMEALPHA(_T("ToolBarButton"), _T("IconAlpha")));

	m_mdcSeenBtn.Create(48, 48);
	DrawAlphaMap(m_mdcSeenBtn, 0, 0, IDA_SEEN, 48, 48, 
			GETTHEMECOLOR(_T("ToolBarButton"), _T("IconColor")),
			GETTHEMEALPHA(_T("ToolBarButton"), _T("IconAlpha")));

	m_mdcViewBtn.Create(48, 48);
	DrawAlphaMap(m_mdcViewBtn, 0, 0, IDA_VIEW, 48, 48,
		GETTHEMECOLOR(_T("ToolBarButton"), _T("IconColor")),
		GETTHEMEALPHA(_T("ToolBarButton"), _T("IconAlpha")));

	m_mdcSortBtn.Create(48, 48);
	DrawAlphaMap(m_mdcSortBtn, 0, 0, IDA_SORT, 48, 48, 
			GETTHEMECOLOR(_T("ToolBarButton"), _T("IconColor")),
			GETTHEMEALPHA(_T("ToolBarButton"), _T("IconAlpha")));

	// Search box

	//GETTHEMEFONT(&m_fntSearch, _T("SearchBox"), _T("Font"));
	//m_eSearch.SetFont(m_fntSearch);
	m_strSearchBoxFont = GETTHEMESTR(_T("SearchBox"),  _T("Font"));
	m_fSearchBoxFontSize = GETTHEMEFLOAT(_T("SearchBox"),  _T("FontSize"));

	m_eSearch.SetHint(GETSTR(IDS_SEARCH));
	m_eSearch.SetHintColor(GETTHEMECOLOR(_T("SearchBox"), _T("HintColor")));
	m_eSearch.SetTextColor(GETTHEMECOLOR(_T("SearchBox"), _T("TextColor")));
	m_eSearch.SetBackgrColor(GETTHEMECOLOR(_T("SearchBox"), _T("BackgrColor")));

	int r = SCX(GETTHEMEINT(_T("SearchBox"), _T("BorderRadius")));
	m_sprSearchBox.Create(SCX(23), SCX(23), r+1, r+1, r+1, r+1);
	DrawRoundedRect(m_sprSearchBox, 0, 0, SCX(23), SCX(23), r,
			GETTHEMECOLOR(_T("SearchBox"), _T("BorderColor")),
			GETTHEMEALPHA(_T("SearchBox"), _T("BorderAlpha")), false);
	DrawRoundedRect(m_sprSearchBox, SCX(1), SCX(1), SCX(23) - 2 * SCX(1), SCX(23) - 2 * SCX(1), 
			(r > 0 ? r - SCX(1) : 0),
			GETTHEMECOLOR(_T("SearchBox"), _T("BackgrColor")));

	// Tools menu

	DestroyMenu(m_hToolsMenu);

	m_hToolsMenu = CreatePopupMenu();
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_ZOOMIN, GETSTR(ID_TOOLS_ZOOMIN));
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_ZOOMOUT, GETSTR(ID_TOOLS_ZOOMOUT));
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_ZOOMRESET, GETSTR(ID_TOOLS_ZOOMRESET));
	AppendMenu(m_hToolsMenu, MF_SEPARATOR, 0, NULL);
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_STATUSBAR, GETSTR(ID_TOOLS_STATUSBAR));
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_LOG, GETSTR(ID_TOOLS_LOG));
	AppendMenu(m_hToolsMenu, MF_SEPARATOR, 0, NULL);
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_OPTIONS, GETSTR(ID_TOOLS_OPTIONS));
	AppendMenu(m_hToolsMenu, MF_SEPARATOR, 0, NULL);
	AppendMenu(m_hToolsMenu, MF_STRING, ID_TOOLS_EXIT, GETSTR(ID_TOOLS_EXIT));

	if (GETPREFBOOL(_T("MainWnd"), _T("ShowStatusBar")))
		CheckMenuItem(m_hToolsMenu, ID_TOOLS_STATUSBAR, MF_CHECKED);
	if (GETPREFBOOL(_T("MainWnd"), _T("ShowLog")))
		CheckMenuItem(m_hToolsMenu, ID_TOOLS_LOG, MF_CHECKED);

	// Check seen button and view button

	m_btnSeen.SetCheck(GETPREFBOOL(_T("ShowSeenMovies")));
	m_btnView.SetCheck(GETPREFBOOL(_T("ViewType")));

	// Sort menu

	m_hSortMenu = CreatePopupMenu();
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_TITLEASC, GETSTR(ID_SORT_TITLEASC));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_TITLEDES, GETSTR(ID_SORT_TITLEDES));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_YEARASC, GETSTR(ID_SORT_YEARASC));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_YEARDES, GETSTR(ID_SORT_YEARDES));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_RATINGASC, GETSTR(ID_SORT_RATINGASC));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_RATINGDES, GETSTR(ID_SORT_RATINGDES));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_FILETIMEASC, GETSTR(ID_SORT_FILETIMEASC));
	AppendMenu(m_hSortMenu, MF_STRING, ID_SORT_FILETIMEDES, GETSTR(ID_SORT_FILETIMEDES));

	CheckMenuRadioItem(m_hSortMenu, ID_SORT_TITLEASC, ID_SORT_FILETIMEDES, 
			GETPREFINT(_T("SortBy")) + ID_SORT_TITLEASC, MF_CHECKED);

	OnScaleChanged();
}
コード例 #5
0
ファイル: op_delaunay3d.cpp プロジェクト: plainoldcj/nubuck
Delaunay3DPanel::Delaunay3DPanel() {
    _ui.setupUi(GetWidget());

    _ui.sbScale->setObjectName("nbw_spinBox"); // important for stylesheet.
    _ui.sbScale->showProgressBar(true);
    _ui.sbScale->setMinimum(0.0);
    _ui.sbScale->setMaximum(1.0);
    _ui.sbScale->setSingleStep(0.025);
    _ui.sbScale->setValue(0.0);

    QObject::connect(_ui.sbScale, SIGNAL(SigValueChanged(leda::rational)), this, SLOT(OnScaleChanged(leda::rational)));
}