Beispiel #1
0
//add icons according to the icon list mode
void addIconsByListMode(const ICONLIST_MODE iListMode)
{
    addIcon( iconID_pen );//normal
    
    //to keep the icons order.
    if( ICONLIST_UNFLDSIZE==iListMode )
    {
        addIcons(s_PenList[LIST_INDEX_ICONLOW], ARRAYSIZE(s_PenList[LIST_INDEX_ICONLOW]));
    }
    else
    {
        addIcon( getIconfromPenSize(getPenSize(), LIST_INDEX_ICON) );  
    }
        
    if( ICONLIST_UNFLDCOLOR==iListMode )
    {
        addIcons(s_ColorList[LIST_INDEX_ICONLOW], ARRAYSIZE(s_ColorList[LIST_INDEX_ICONLOW]));
    }
    else
    {
        addIcon( getIconfromPenColor(getPenColor(), LIST_INDEX_ICON) );
    }
    
    addIcons(s_InitIcons,ARRAYSIZE(s_InitIcons));
    //always disable keyboard and tagging currently
    disableIcon(iconID_keyboard);
    disableIcon(iconID_tagging);
}
Beispiel #2
0
ThemeSetup::ThemeSetup(QWidget *parent)
        : ThemeSetupBase(parent)
{
    lblPict->setPixmap(Pict("style"));
    lstThemes->clear();
    pMain->themes->fillList(lstThemes);
    for (unsigned i = 0; i < lstThemes->count(); i++){
        if (lstThemes->text(i) != pMain->themes->getTheme()) continue;
        lstThemes->setCurrentItem(i);
        break;
    }
    connect(btnAddIcons, SIGNAL(clicked()), this, SLOT(addIcons()));
    connect(lstThemes, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(apply(QListBoxItem*)));
    connect(lstIcons, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(apply(QListBoxItem*)));
    if (TransparentTop::bCanTransparent){
        chkTransparent->setChecked(pMain->UseTransparent());
        sldTransparent->setMinValue(0);
        sldTransparent->setMaxValue(100);
        sldTransparent->setValue(pMain->Transparent);
        sldTransparent->setTickmarks(QSlider::Below);
        sldTransparent->setTickInterval(5);
        connect(chkTransparent, SIGNAL(toggled(bool)), this, SLOT(checkedTransparent(bool)));
        chkTransparentContainer->setChecked(pMain->UseTransparentContainer());
        sldTransparentContainer->setMinValue(0);
        sldTransparentContainer->setMaxValue(100);
        sldTransparentContainer->setValue(pMain->TransparentContainer);
        sldTransparentContainer->setTickmarks(QSlider::Below);
        sldTransparentContainer->setTickInterval(5);
        connect(chkTransparentContainer, SIGNAL(toggled(bool)), this, SLOT(checkedTransparent(bool)));
        checkedTransparent(pMain->UseTransparent());
    }else{
Beispiel #3
0
int ModulesLoaded(WPARAM wParam,LPARAM lParam)
{
	// Register menu item
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 1900000001;
	mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT));
	mi.pszPopupName = "Database";
	mi.pszName = modFullname;
	mi.pszService = "DBEditorpp/MenuCommand";
	Menu_AddMainMenuItem(&mi);

	ZeroMemory(&mi, sizeof(mi));
	mi.cbSize = sizeof(mi);
	mi.position = 1900000001;
	mi.flags = db_get_b(NULL, modname, "UserMenuItem", 0) ? 0 : CMIF_HIDDEN;
	mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGUSER));
	mi.pszName = LPGEN("Open user tree in DBE++");
	mi.pszService = "DBEditorpp/MenuCommand";
	hUserMenu = Menu_AddContactMenuItem(&mi);

	// Register hotkeys
	HOTKEYDESC hkd = { sizeof(hkd) };
	hkd.pszName = "hk_dbepp_open";
	hkd.pszService = "DBEditorpp/MenuCommand";
	hkd.ptszDescription = LPGEN("Open Database Editor");
	hkd.ptszSection = modFullname;
	hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_EXT, 'D');
	Hotkey_Register(&hkd);

	// icons
	TCHAR szModuleFileName[MAX_PATH];
	if (GetModuleFileName(hInst, szModuleFileName, MAX_PATH))
		addIcons(szModuleFileName);

	UnhookEvent(hModulesLoadedHook);

	usePopups = db_get_b(NULL, modname, "UsePopUps", 0);

	// Load the name order
	for (int i = 0; i < NAMEORDERCOUNT; i++)
		nameOrder[i] = i;

	DBVARIANT dbv;
	if (!db_get(NULL, "Contact", "NameOrder", &dbv)) {
		CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
		db_free(&dbv);
	}

	HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);

	if (bServiceMode)
		CallService("DBEditorpp/MenuCommand", 0, 0);

	return 0;
}
Beispiel #4
0
//add one icon
static void addIcon(const int iconID)
{
    addIcons(&iconID,1);
}