Beispiel #1
0
PlayerWidget::PlayerWidget(QWidget *parent) : QWidget(parent), ui(new Ui::PlayerWidget()){
  ui->setupUi(this); //load the designer form
  PLAYER = new QMediaPlayer(this);
    PLAYER->setVolume(100);
    PLAYER->setNotifyInterval(1000); //1 second interval (just needs to be a rough estimate)
  PLAYLIST = new QMediaPlaylist(this);
    PLAYLIST->setPlaybackMode(QMediaPlaylist::Sequential);
    PLAYER->setPlaylist(PLAYLIST);
	
  configMenu = new QMenu(this);
    ui->tool_config->setMenu(configMenu);
  addMenu = new QMenu(this);
    ui->tool_add->setMenu(addMenu);
	
  updatinglists = false; //start off as false
	
  LoadIcons();
  playerStateChanged(); //update button visibility
  currentSongChanged();
  //Connect all the signals/slots
  //connect(infoTimer, SIGNAL(timeout()), this, SLOT(rotateTrackInfo()) );
  connect(PLAYER, SIGNAL(positionChanged(qint64)),this, SLOT(updateProgress(qint64)) );
  connect(PLAYER, SIGNAL(durationChanged(qint64)), this, SLOT(updateMaxProgress(qint64)) );
  connect(PLAYLIST, SIGNAL(mediaChanged(int, int)), this, SLOT(playlistChanged()) );
  connect(PLAYER, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(playerStateChanged()) );
  connect(PLAYLIST, SIGNAL(currentMediaChanged(const QMediaContent&)), this, SLOT(currentSongChanged()) );
  connect(ui->combo_playlist, SIGNAL(currentIndexChanged(int)), this, SLOT(userlistSelectionChanged()) );
  connect(ui->tool_play, SIGNAL(clicked()), this, SLOT(playClicked()) );
  connect(ui->tool_pause, SIGNAL(clicked()), this, SLOT(pauseClicked()) );
  connect(ui->tool_stop, SIGNAL(clicked()), this, SLOT(stopClicked()) );
  connect(ui->tool_next, SIGNAL(clicked()), this, SLOT(nextClicked()) );
  connect(ui->tool_prev, SIGNAL(clicked()), this, SLOT(prevClicked()) );
  
}
Beispiel #2
0
extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
	char text[_MAX_PATH];
	char *p, *q;
	GetModuleFileName(hInst, text, sizeof(text));
	p = strrchr(text, '\\');
	p++;
	q = strrchr(p, '.');
	*q = '\0';
	muccModuleName = _strdup(p);
	_strupr(muccModuleName);

	pluginLink = link;
	/*
	**	HookEvent(ME_OPT_INITIALISE, TlenOptInit);
	*/
	HookEvent(ME_OPT_INITIALISE, MUCCOptInit);
	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);

	CreateServiceFunction(MS_MUCC_QUERY_RESULT, MUCCQueryResult);
	CreateServiceFunction(MS_MUCC_NEW_WINDOW, MUCCNewWindow);
	CreateServiceFunction(MS_MUCC_EVENT, MUCCEvent);
	hHookEvent = CreateHookableEvent(ME_MUCC_EVENT);

	LoadIcons();
	return 0;
}
Beispiel #3
0
int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam)
{
	char* mods[3] = { "Chat", "ChatFonts" };
	CallService( "DBEditorpp/RegisterModule", (WPARAM)mods, 2 );
	RegisterChatFonts();
	OptionsInit();
	LoadIcons();
	{
		CLISTMENUITEM mi = { 0 };
		mi.cbSize = sizeof(mi);
		mi.position = -2000090001;
		mi.flags = CMIF_DEFAULT | CMIF_ICONFROMICOLIB;
		mi.icolibItem = LoadSkinnedIconHandle( SKINICON_CHAT_JOIN );
		mi.pszName = LPGEN("&Join");
		mi.pszService = "GChat/JoinChat";
		hJoinMenuItem = ( HANDLE )CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) & mi);

		mi.position = -2000090000;
		mi.flags = CMIF_NOTOFFLINE | CMIF_ICONFROMICOLIB;
		mi.icolibItem = LoadSkinnedIconHandle( SKINICON_CHAT_LEAVE );
		mi.pszName = LPGEN("&Leave");
		mi.pszService = "GChat/LeaveChat";
		hLeaveMenuItem = ( HANDLE )CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) & mi);
	}
	CList_SetAllOffline(TRUE, NULL);
 	return 0;
}
EXPORT_C void JuikIcons::LoadIconsL(CArrayPtrFlat<CGulIcon> * aIconList, const TIconID* aIconDefs, TInt aNbIcons)
	{
		CALLSTACKITEMSTATIC_N(_CL("JuikIcons"), _CL("LoadIconsL(multiple files)"));
#ifdef __SCALABLEUI_VARIANT__
		TRAPD(err, LoadScalableIconsL( aIconList, aIconDefs, aNbIcons ) );
		if ( err )
			{
				// Hack to retry
				aIconList->ResetAndDestroy();
				LoadIcons(aIconList, aIconDefs, aNbIcons);
			}

#else // not __SCALABLEUI_VARIANT__
		LoadIcons(aIconList, aIconDefs, aNbIcons);
#endif // __SCALABLEUI_VARIANT__
	} 
Beispiel #5
0
/**
**  Load all.
**
**  Call each module to load additional files (graphics,sounds).
*/
void LoadModules()
{
	LoadFonts();
	LoadIcons();
	LoadCursors(PlayerRaces.Name[ThisPlayer->Race]);
	UI.Load();
#ifndef DYNAMIC_LOAD
	LoadMissileSprites();
#endif
	LoadConstructions();
	LoadDecorations();
	LoadUnitTypes();

	InitPathfinder();

	LoadUnitSounds();
	MapUnitSounds();
	if (SoundEnabled()) {
		InitSoundClient();
	}

	SetPlayersPalette();
	UI.Minimap.Create();

	SetDefaultTextColors(UI.NormalFontColor, UI.ReverseFontColor);
}
tcAltitudeBarControl::tcAltitudeBarControl(float x, float y, float width, float height)
:   barRect(x, x+width, y, y+height),
    fontSize(10.0f),
    fontSizeLarge(14.0f),
    increaseScaleThresh(0.5f),
    decreaseScaleThresh(0.25f),
    mouseOverBar(false),
    mouseOverUp(false),
    mouseOverDown(false),
    currentScale(800),
    color(0.4f, 1, 0.4f, 1),
    colorDim(0.2f, 0.5f, 0.2f, 1),
    neutralColor(0.8f, 0.8f, 0.8f, 1),
    dangerColor(0.8f, 0.3f, 0.3f, 1),
    warnColor(0.8f, 0.8f, 0.3f, 1),
    overColor(1, 1, 1, 0.5f)
{
    float iconSize = 12;
    upRect.Set(barRect.GetRight() + 20, barRect.GetRight() + 20 + iconSize, 
        barRect.YCenter(), barRect.YCenter() + iconSize);
    upRect.Offset(-0.5*iconSize, 0);
    downRect = upRect;

    upRect.Offset(0, 0.35*(barRect.Height()-iconSize));
    downRect.Offset(0, -0.35*(barRect.Height()-iconSize));

    LoadIcons();

    if (units == 0) // lazy init units
    {
        units = tcUnits::Get();
    }
}
Beispiel #7
0
void MainDialog::OnWindowInitialized(TNotifyUI& msg)
{
    module::getScreenCaptureModule()->initCapture(m_hWnd);
	module::getLoginModule()->addObserver(this, BIND_CALLBACK_2(MainDialog::MKOForLoginModuleCallBack));
	module::getUserListModule()->addObserver(this, BIND_CALLBACK_2(MainDialog::MKOForUserListModuleCallBack));
	module::getSessionModule()->addObserver(this, BIND_CALLBACK_2(MainDialog::MKOForSessionModuleCallBack));

	m_pbtnSysConfig = (CButtonUI*)m_PaintManager.FindControl(_T("sysconfig"));
	m_pbtnOnlineStatus = (CButtonUI*)m_PaintManager.FindControl(_T("onlineStatus"));
	m_pbtnMyFace = (CButtonUI*)m_PaintManager.FindControl(_T("myfacebtn"));
    m_pEditSignature = (CEditUI*)m_PaintManager.FindControl(_T("signature"));
	m_ptxtUname = (CTextUI*)m_PaintManager.FindControl(_T("unametxt"));
	m_pbtnClose = (CButtonUI*)m_PaintManager.FindControl(_T("closebtn"));
	m_pbtnMinMize = (CButtonUI*)m_PaintManager.FindControl(_T("minbtn"));

    m_pTextUnreadMsgCount = static_cast<CTextUI*>(m_PaintManager.FindControl(_T("msgCount")));
    PTR_VOID(m_pTextUnreadMsgCount);

    _FreshMySignature();

	if (m_ptxtUname)
	{
		CString strVersion;
		strVersion.Format(_T("V.%d"), TEAMTALK_VERSION);
		m_ptxtUname->SetToolTip(strVersion);
	}
	//加载图标
	LoadIcons();
	//创建系统托盘
	CreateTrayIcon();
	//初始化
	Initilize();
}
Beispiel #8
0
BOOL fsTrayIconMgr::Create(HWND hWnd, UINT *pIcons, UINT cIcons, LPCSTR pszTooltip, UINT uCallbackMsg)
{
	LoadIcons (pIcons, cIcons);
	m_hWnd = hWnd;
	m_uCallbackMsg = uCallbackMsg;
	m_strTip = pszTooltip;
	
	return InitializeTrayIcon ();
}
Beispiel #9
0
QPixmap
IconShack::icon( QPixmap icons[], MooseEnums::UserIconColour c )
{
    if (!mbIconsLoaded)
        LoadIcons();

    if (c == MooseEnums::eNone || icons[c].isNull())
        return icons[ MooseEnums::eRed ];
    else
        return icons[c];
}
Beispiel #10
0
BOOL CIconImgList::LoadExtIconData( void)
{
    // 通常アイコンの読み込み
    m_hBmpDefault = ::LoadBitmap( AfxGetResourceHandle(), MAKEINTRESOURCE( IDB_ICONIMG));

    TCHAR szFilePath[ MAX_PATH];
    int nLength = GetModuleFileName( NULL, szFilePath, MAX_PATH);
    for( int nIndex = nLength; nIndex >= 0; nIndex--)
    {
        if( TEXT( '\\') == szFilePath[ nIndex])
        {
            lstrcpy( &szFilePath[ nIndex + 1], TEXT( "GetIcon.xml"));
            break;
        }
    }


    BOOL blResult = FALSE;
    MSXML2::IXMLDOMDocumentPtr piDocument;
    if( SUCCEEDED( piDocument.CreateInstance( _T( "Microsoft.XMLDOM"))))
    {
        piDocument->PutvalidateOnParse( VARIANT_TRUE);
        if( VARIANT_FALSE != piDocument->load( _variant_t( _bstr_t( szFilePath))))
        {
            if( LoadIcons( piDocument))
            {
                blResult = LoadGroups( piDocument);
            }
        }
        else
        {
            MSXML2::IXMLDOMParseErrorPtr piError;

            piError = piDocument->GetparseError();
            long lCode = piError->GeterrorCode();
            TRACE( _T( "0x%08X\n"), lCode);	// 0x800C0005

            if( NULL != piError && 0 != lCode && 0x800C0005/*INET_E_RESOURCE_NOT_FOUND*/ != lCode)
            {
                long lRaw = piError->Getline();
                long lCol = piError->Getlinepos();

                _bstr_t cBstr = piError->Getreason();
                _bstr_t cBstrSrc = piError->GetsrcText();

                CString cStr;

                cStr.Format( _T( "拡張アイコンデータファイルを解析できませんでした。\n%s\n\nソース:%s\n位置:%d行 %d文字"), ( ( char*)cBstr), ( ( char*)cBstrSrc), lRaw, lCol);
                MessageBox( NULL, cStr, NULL, MB_OK | MB_ICONEXCLAMATION);
            }
        }
    }
    return blResult;
}
BOOL CXTPRibbonBuilder::BuildCategories(CXTPPropExchange* pPX, CXTPRibbonBar* pRibbonBar)
{
	CXTPPropExchangeEnumeratorPtr pEnumerator(pPX->GetEnumerator(_T("CATEGORY")));

	POSITION pos = pEnumerator->GetPosition(0);
	while (pos)
	{
		CXTPPropExchangeSection pxTab(pEnumerator->GetNext(pos));

		CString strElementName;
		PX_String(&pxTab, _T("ELEMENT_NAME"), strElementName);

		CCmdTarget* pElement = CreateElement(strElementName);
		if (pElement == NULL)
			continue;

		CXTPRibbonTab* pTab = DYNAMIC_DOWNCAST(CXTPRibbonTab, pElement);

		if (!pTab)
		{
			delete pElement;
			continue;
		}


		CString strName;
		PX_String(&pxTab, _T("NAME"), strName);

		pTab->SetCaption(strName);


		CString strKeys;
		PX_String(&pxTab, _T("KEYS"), strKeys);
		pTab->SetKeyboardTip(strKeys);


		pRibbonBar->InsertTab(pRibbonBar->GetTabCount(), pTab);


		m_arrImageLarge.RemoveAll();
		m_arrImageSmall.RemoveAll();

		CXTPPropExchangeSection pxPanels(pxTab->GetSection(_T("PANELS")));
		BuildGroups(&pxPanels, pTab);

		LoadIcons(&pxTab);
	}


	return TRUE;
}
void CXTPRibbonBuilder::LoadIcons(CXTPPropExchange* pPX)
{
	CXTPPropExchangeSection pxImage(pPX->GetSection(_T("IMAGE")));
	CXTPPropExchangeSection pxImageId(pxImage->GetSection(_T("ID")));

	int nId = -1;
	PX_Int(&pxImageId, _T("VALUE"), nId);

	if (nId != -1)
	{
		LoadIcons(nId, m_arrImageSmall);
	}


	CXTPPropExchangeSection pxImageSmall(pPX->GetSection(_T("IMAGE_SMALL")));
	CXTPPropExchangeSection pxImageSmallId(pxImageSmall->GetSection(_T("ID")));

	nId = -1;
	PX_Int(&pxImageSmallId, _T("VALUE"), nId);

	if (nId != -1)
	{
		LoadIcons(nId, m_arrImageSmall);
	}


	CXTPPropExchangeSection pxImageLarge(pPX->GetSection(_T("IMAGE_LARGE")));
	CXTPPropExchangeSection pxImageLargeId(pxImageLarge->GetSection(_T("ID")));

	nId = -1;
	PX_Int(&pxImageLargeId, _T("VALUE"), nId);

	if (nId != -1)
	{
		LoadIcons(nId, m_arrImageLarge);
	}
}
Beispiel #13
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	AddIcons();
	RegisterFonts();

	CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Chat module"), FONTMODE_SKIP };
	mir_getCI(&data);
	saveCI = *pci;

	pci->OnAddUser = OnAddUser;
	pci->OnNewUser = OnNewUser;
	pci->OnRemoveUser = OnRemoveUser;

	pci->OnAddStatus = OnAddStatus;
	pci->OnSetStatus = OnSetStatus;
	pci->OnSetTopic = OnSetTopic;

	pci->OnAddLog = OnAddLog;
	pci->OnClearLog = OnClearLog;

	pci->OnCreateModule = OnCreateModule;
	pci->OnOfflineSession = OnOfflineSession;
	pci->OnRemoveSession = OnRemoveSession;
	pci->OnRenameSession = OnRenameSession;
	pci->OnReplaceSession = OnReplaceSession;
	pci->OnDblClickSession = OnDblClickSession;

	pci->OnEventBroadcast = OnEventBroadcast;
	pci->OnLoadSettings = OnLoadSettings;
	pci->OnSetStatusBar = OnSetStatusBar;
	pci->OnFlashWindow = OnFlashWindow;
	pci->OnFlashHighlight = OnFlashHighlight;
	pci->ShowRoom = ShowRoom;

	pci->DoPopup = DoPopup;
	pci->DoTrayIcon = DoTrayIcon;
	pci->ReloadSettings();

	g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU));
	LoadIcons();
	TabsInit();

	HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
	HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
	return 0;
}
Beispiel #14
0
void MainDialog::OnWindowInitialized(TNotifyUI& msg)
{
	m_pbtnSysConfig = (CButtonUI*)m_PaintManager.FindControl(_T("sysconfig"));
	m_pbtnOnlineStatus = (CButtonUI*)m_PaintManager.FindControl(_T("onlineStatus"));
	m_pbtnMyFace = (CButtonUI*)m_PaintManager.FindControl(_T("myfacebtn"));
	m_ptxtUname = (CTextUI*)m_PaintManager.FindControl(_T("unametxt"));
	m_pbtnClose = (CButtonUI*)m_PaintManager.FindControl(_T("closebtn"));
	m_pbtnMinMize = (CButtonUI*)m_PaintManager.FindControl(_T("minbtn"));
	//加载图标
	LoadIcons();
	//创建系统托盘
	CreateTrayIcon();
	//初始化
	Initilize();
}
Beispiel #15
0
ctConfigTreeCtrl::ctConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
                                   const wxSize& sz, long style):
wxTreeCtrl(parent, id, pt, sz, style)
{
    LoadIcons();

    m_contextMenu = NULL;
    m_contextMenu = new wxMenu;

    m_contextMenu->Append(ctID_TREE_PASTE_BEFORE, _("Paste &before this option"));
    m_contextMenu->Append(ctID_TREE_PASTE_AFTER, _("Paste &after this option"));
    m_contextMenu->Append(ctID_TREE_PASTE_AS_CHILD, _("Paste as &child of this option"));
    m_contextMenu->AppendSeparator();
    m_contextMenu->Append(ctID_TREE_COPY, _("C&opy"));
    m_contextMenu->Append(ctID_TREE_CUT, _("Cu&t"));

    SetHelpText(_("This shows configuration settings that you can enable and disable."));
}
Beispiel #16
0
CWidget::CWidget(QWidget *parent){
	resize(500,500);
	SetGeometry(0,0,500,500);
	QPointF workspaceExplorerPos(0,this->height()-Settings::imageExplorerSize);
	QPointF workspaceExplorerSize(this->width(),Settings::imageExplorerSize);
	iWorkspaceExplorer = CWorkspaceExplorer::InitInstance(this, workspaceExplorerPos,workspaceExplorerSize);
	
	CWorkspaceManager::InitInstance(this);
	CWorkspace *workspace = new CWorkspace(this,QPointF(0,0),QPointF(this->width()-Settings::imageExplorerSize,this->height()-Settings::imageExplorerSize));
	//CWorkspaceManager::GetInstance()->SetActiveWorkspace(workspace);
	CWorkspaceManager::GetInstance()->AddWorkspace(workspace);

	QPointF imageExplorerPos(this->width()-Settings::imageExplorerSize,0);
	QPointF imageExplorerSize(150,this->height()-Settings::imageExplorerSize);
	CImageExplorer::InitInstance(this, imageExplorerPos,imageExplorerSize);
	iImageExplorer = CImageExplorer::GetInstance();
	LoadIcons();
	iActiveObject=NULL;

}
Beispiel #17
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	LoadIcons();

	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged);
	HookEvent(ME_OPT_INITIALISE, NudgeOptInit);

	// Create function for plugins
	CreateServiceFunction(MS_SHAKE_CLIST, ShakeClist);
	CreateServiceFunction(MS_SHAKE_CHAT, ShakeChat);
	CreateServiceFunction(MS_NUDGE_SEND, NudgeSend);
	CreateServiceFunction(MS_NUDGE_SHOWMENU, NudgeShowMenu);

	// Add contact menu entry
	CMenuItem mi;
	SET_UID(mi, 0xd617db26, 0x22ba, 0x4205, 0x9c, 0x3e, 0x53, 0x10, 0xbc, 0xcf, 0xce, 0x19);
	mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR;
	mi.position = -500050004;
	mi.hIcolibItem = iconList[0].hIcolib;
	mi.name.t = LPGENT("Send &Nudge");
	mi.pszService = MS_NUDGE_SEND;
	g_hContactMenu = Menu_AddContactMenuItem(&mi);

	// register special type of event
	// there's no need to declare the special service for getting text
	// because a blob contains only text
	DBEVENTTYPEDESCR evtype = { sizeof(evtype) };
	evtype.module = MODULENAME;
	evtype.eventType = 1;
	evtype.descr = LPGEN("Nudge");
	evtype.eventIcon = iconList[0].hIcolib;
	evtype.flags = DETF_HISTORY | DETF_MSGWINDOW;
	CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&evtype);
	return 0;
}
BOOL CXTPRibbonBuilder::Build(CXTPRibbonBar* pRibbonBar)
{
	if (!m_pPX)
		return FALSE;

	m_pCommandBars = pRibbonBar->GetCommandBars();

	CXTPPropExchangeSection pxRibbonBar(m_pPX->GetSection(_T("RIBBON_BAR")));

	CString strElementName;
	PX_String(&pxRibbonBar, _T("ELEMENT_NAME"), strElementName);
	if (strElementName != _T("RibbonBar"))
		return FALSE;

	CXTPPropExchangeSection pxButtonMain(pxRibbonBar->GetSection(_T("BUTTON_MAIN")));
	BuildMainButton(&pxButtonMain, pRibbonBar);

	CXTPPropExchangeSection pxCategoryMain(pxRibbonBar->GetSection(_T("CATEGORY_MAIN")));
	BuildMainButtonPopupBar(&pxCategoryMain, pRibbonBar);

	CXTPPropExchangeSection pxQATElements(pxRibbonBar->GetSection(_T("QAT_ELEMENTS")));
	BuildQATElements(&pxQATElements, pRibbonBar);


	m_arrImageLarge.RemoveAll();
	m_arrImageSmall.RemoveAll();

	CXTPPropExchangeSection pxTabElements(pxRibbonBar->GetSection(_T("TAB_ELEMENTS")));
	BuildTabElements(&pxTabElements, pRibbonBar);

	LoadIcons(&pxRibbonBar);

	CXTPPropExchangeSection pxCategories(pxRibbonBar->GetSection(_T("CATEGORIES")));
	BuildCategories(&pxCategories, pRibbonBar);



	return TRUE;
}
Beispiel #19
0
ecConfigTreeCtrl::ecConfigTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
                                   const wxSize& sz, long style):
wxRemotelyScrolledTreeCtrl(parent, id, pt, sz, style)
{
    LoadIcons();
    
    m_propertiesMenu = new wxMenu;
    
    m_propertiesMenu->Append(ecID_WHATS_THIS, _("&What's This?"));
    m_propertiesMenu->AppendSeparator();
    m_propertiesMenu->Append(ecID_TREE_PROPERTIES, _("P&roperties"));
    m_propertiesMenu->Append(ecID_TREE_RESTORE_DEFAULTS, _("Restore &Defaults"));
    m_propertiesMenu->Append(ecID_TREE_VISIT_DOC, _("Visit Documentation"));
    m_propertiesMenu->Append(ecID_TREE_VIEW_HEADER, _("View Header"));
    m_propertiesMenu->AppendSeparator();
    m_propertiesMenu->Append(ecID_TREE_UNLOAD_PACKAGE, _("&Unload Package..."));

    if (!wxGetApp().GetSettings().GetWindowSettings().GetUseDefaults() &&
         wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Configuration")).Ok())
    {
        SetFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Configuration")));
    }
}
Beispiel #20
0
PanelWidget::PanelWidget(QWidget *parent, QWidget *Main, LPlugins *Pinfo) : QWidget(parent), ui(new Ui::PanelWidget){
  ui->setupUi(this);
  mainui = Main;
  PINFO = Pinfo;
  //Fill up the menu's with the valid entries
  ui->combo_align->addItem(tr("Top/Left"), "left");
  ui->combo_align->addItem(tr("Center"), "center");
  ui->combo_align->addItem(tr("Bottom/Right"), "right");
  ui->combo_edge->addItem(tr("Top"), "top");
  ui->combo_edge->addItem(tr("Bottom"), "bottom");
  ui->combo_edge->addItem(tr("Left"), "left");
  ui->combo_edge->addItem(tr("Right"), "right");
	
  LoadIcons();
  //Now connect any other signals/slots
  connect(ui->combo_edge, SIGNAL(currentIndexChanged(int)), this, SLOT(ItemChanged()) );
  connect(ui->combo_align, SIGNAL(currentIndexChanged(int)), this, SLOT(ItemChanged()) );
  connect(ui->spin_plength, SIGNAL(valueChanged(int)), this, SLOT(ItemChanged()) );
  connect(ui->spin_pxthick, SIGNAL(valueChanged(int)), this, SLOT(ItemChanged()) );
  connect(ui->check_autohide, SIGNAL(stateChanged(int)), this, SLOT(ItemChanged()) );
  connect(ui->group_customcolor, SIGNAL(toggled(bool)), this, SLOT(ItemChanged()) );
	
}
int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam)
{
	char* mods[3] = { "Chat", "ChatFonts" };
	CallService( "DBEditorpp/RegisterModule", (WPARAM)mods, 2 );

	AddIcons();
	RegisterFonts();
	LoadIcons();

//	g_hIconsChanged2 =	HookEvent(ME_SKIN2_ICONSCHANGED, Chat_IconsChanged);

	if ( ServiceExists( MS_SMILEYADD_SHOWSELECTION )) {
		SmileyAddInstalled = TRUE;
		g_hSmileyOptionsChanged = HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
	}
	if ( ServiceExists( MS_POPUP_ADDPOPUPEX ))
		PopUpInstalled = TRUE;

	if ( ServiceExists( MS_IEVIEW_WINDOW ))
		IEviewInstalled = TRUE;

	CList_SetAllOffline(TRUE);
 	return 0;
}
Beispiel #22
0
int CUIHandler::Initialize()
{
    LoadIcons();
    return 0;
}
wxCheckListCtrl::wxCheckListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt,
const wxSize& sz, long style):
wxListCtrl(parent, id, pt, sz, style)
{
  LoadIcons();
}
Beispiel #24
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);

	YAMN_STATUS = ID_STATUS_OFFLINE;

	//	we get the Miranda Root Path
	PathToAbsoluteT( _T("."), szMirandaDir);

	// retrieve the current profile name
	CallService(MS_DB_GETPROFILENAMET, (WPARAM)_countof(ProfileName), (LPARAM)ProfileName);	//not to pass entire array to fcn
	TCHAR *fc = _tcsrchr(ProfileName, '.');
	if ( fc != NULL ) *fc = 0;

	//	we get the user path where our yamn-account.book.ini is stored from mirandaboot.ini file
	GetProfileDirectory(UserDirectory, _countof(UserDirectory));

	// Enumerate all the code pages available for the System Locale
	EnumSystemCodePages(EnumSystemCodePagesProc, CP_INSTALLED);
	CodePageNamesSupp = new _tcptable[CPLENSUPP];
	for (int i = 0, k = 0; i < CPLENALL; i++) {
		if (CodePageNamesAll[i].isValid) {
			CodePageNamesSupp[k] = CodePageNamesAll[i];
			k++;
	}	}

	// Registering YAMN as protocol
	PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
	pd.szName = YAMN_DBMODULE;
	pd.type = PROTOTYPE_VIRTUAL;
	Proto_RegisterModule(&pd);

	InitializeCriticalSection(&AccountStatusCS);
	InitializeCriticalSection(&FileWritingCS);
	InitializeCriticalSection(&PluginRegCS);

	if (NULL == (NoWriterEV = CreateEvent(NULL, TRUE, TRUE, NULL)))
		return 1;
	if (NULL == (WriteToFileEV = CreateEvent(NULL, FALSE, FALSE, NULL)))
		return 1;
	if (NULL == (ExitEV = CreateEvent(NULL, TRUE, FALSE, NULL)))
		return 1;

	PosX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBPOSX, 0);
	PosY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBPOSY, 0);
	SizeX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBSIZEX, 800);
	SizeY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBSIZEY, 200);

	HeadPosX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSX, 0);
	HeadPosY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSY, 0);
	HeadSizeX = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGSIZEX, 690);
	HeadSizeY = db_get_dw(NULL, YAMN_DBMODULE, YAMN_DBMSGSIZEY, 300);
	HeadSplitPos = db_get_w(NULL, YAMN_DBMODULE, YAMN_DBMSGPOSSPLIT, 250);

	optDateTime = db_get_b(NULL, YAMN_DBMODULE, YAMN_DBTIMEOPTIONS, optDateTime);

	// Create new window queues for broadcast messages
	YAMNVar.MessageWnds = WindowList_Create();
	YAMNVar.NewMailAccountWnd = WindowList_Create();
	YAMNVar.Shutdown = FALSE;

	hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
	hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);

#ifdef _DEBUG
	InitDebug();
#endif

	CreateServiceFunctions();

	SkinAddNewSoundEx(YAMN_NEWMAILSOUND, YAMN_DBMODULE, YAMN_NEWMAILSNDDESC);
	SkinAddNewSoundEx(YAMN_CONNECTFAILSOUND, YAMN_DBMODULE, YAMN_CONNECTFAILSNDDESC);

	HookEvents();

	LoadIcons();
	LoadPlugins();

	HOTKEYDESC hkd = {0};
	hkd.cbSize = sizeof(hkd);
	hkd.pszName = "YAMN_hotkey";
	hkd.pszService = MS_YAMN_FORCECHECK;
	hkd.pszSection = YAMN_DBMODULE;
	hkd.pszDescription = LPGEN("Check mail");
	hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F11);
	Hotkey_Register(&hkd);

	//Create thread that will be executed every second
	if (!(SecTimer = SetTimer(NULL, 0, 1000, TimerProc)))
		return 1;

	return 0;
}
BOOL CXTPRibbonBuilder::BuildMainButtonPopupBar(CXTPPropExchange* pPX, CXTPRibbonBar* pRibbonBar)
{
	if (!pRibbonBar->GetSystemButton())
		return FALSE;

	CXTPCommandBar* pPopupBar = pRibbonBar->GetSystemButton()->GetCommandBar();


	CString strElementName;
	PX_String(pPX, _T("ELEMENT_NAME"), strElementName);

	if (strElementName != _T("Category_Main"))
		return FALSE;

	CString strCaption;
	PX_String(pPX, _T("NAME"), strCaption);

	pRibbonBar->GetSystemButton()->SetCaption(strCaption);


	pPopupBar->SetIconSize(CSize(32, 32));

	m_arrImageLarge.RemoveAll();
	m_arrImageSmall.RemoveAll();

	CXTPPropExchangeSection pxElements(pPX->GetSection(_T("ELEMENTS")));

	CXTPPropExchangeEnumeratorPtr pEnumerator(pxElements->GetEnumerator(_T("ELEMENT")));

	BOOL bBeginGroup = FALSE;

	POSITION pos = pEnumerator->GetPosition(0);
	while (pos)
	{
		CXTPPropExchangeSection pxControl(pEnumerator->GetNext(pos));

		CString strElementName;
		PX_String(&pxControl, _T("ELEMENT_NAME"), strElementName);

		if (strElementName == _T("Separator"))
		{
			bBeginGroup = TRUE;
			continue;
		}


		CCmdTarget* pElement = CreateElement(strElementName);
		if (pElement == NULL)
			continue;

		CXTPControl* pControl = DYNAMIC_DOWNCAST(CXTPControl, pElement);

		if (!pControl)
		{
			delete pElement;
			continue;
		}

		CXTPPropExchangeSection pxElements(pxControl->GetSection(_T("ELEMENTS")));
		BuildControlPopupBar(&pxElements, pControl, RUNTIME_CLASS(CXTPRibbonSystemPopupBarPage));

		BuildControl(&pxControl, pControl);

		pPopupBar->GetControls()->Add(pControl, pControl->GetID());

		pControl->SetBeginGroup(bBeginGroup);
		bBeginGroup = FALSE;

	}

	CXTPPropExchangeSection pxRecentFileList(pPX->GetSection(_T("RECENT_FILE_LIST")));

	CString strEnabled;
	PX_String(&pxRecentFileList, _T("ENABLE"), strEnabled);
	if (strEnabled == _T("TRUE"))
	{
		CXTPControl* pControl = pPopupBar->GetControls()->Add(new CXTPRibbonControlSystemRecentFileList());

		CString strLabel;
		PX_String(&pxRecentFileList, _T("LABEL"), strLabel);
		pControl->SetCaption(strLabel);
	}


	LoadIcons(pPX);


	return TRUE;
}
EXPORT_C void LoadIcons(CArrayPtrFlat<CGulIcon> * aIconList)
{
    LoadIcons(aIconList, iconId, KNbIcons);
}
EXPORT_C void LoadIcons(CArrayPtrFlat<CGulIcon> * aIconList, const TIconID* aIconDefs, 
			TInt aNbIcons)
{
	LoadIcons(aIconList, aIconDefs, aNbIcons, 1);
}
Beispiel #28
0
/**
**  CreateGame.
**
**  Load map, graphics, sounds, etc
**
**  @param filename  map filename
**  @param map       map loaded
**
**  @todo FIXME: use in this function InitModules / LoadModules!!!
*/
void CreateGame(const char *filename, CMap *map)
{
	int i;

	if (SaveGameLoading) {
		SaveGameLoading = 0;
		// Load game, already created game with Init/LoadModules
		CommandLog(NULL, NoUnitP, FlushCommands, -1, -1, NoUnitP, NULL, -1);
		return;
	}

	InitVisionTable(); // build vision table for fog of war
	InitPlayers();
	
	if (Map.Info.Filename.empty() && filename) {
		char path[PATH_MAX];
		
		Assert(filename);
		LibraryFileName(filename, path, sizeof(path));
		if(strcasestr(filename, ".smp")) {
			LuaLoadFile(path);
		}
	}

	for (i = 0; i < PlayerMax; ++i) {
		int playertype = Map.Info.PlayerType[i];
		// Network games only:
		if (GameSettings.Presets[i].Type != SettingsPresetMapDefault) {
			playertype = GameSettings.Presets[i].Type;
		}
		CreatePlayer(playertype);
	}

	if (filename) {
		if (CurrentMapPath != filename) {
			strcpy_s(CurrentMapPath, sizeof(CurrentMapPath), filename);
		}

		//
		// Load the map.
		//
		InitUnitTypes(1);
		LoadMap(filename, map);
		
		// HARDCODING FOG OF WAR TRUE.  It doesn't currently use preferences on a game restart - Should be changed 
		map->NoFogOfWar = true;
		Map.Reveal();
	}

	GameCycle = 0;
	FastForwardCycle = 0;
	SyncHash = 0;
	InitSyncRand();

	if (IsNetworkGame()) { // Prepare network play
		DebugPrint("Client setup: Calling InitNetwork2\n");
		InitNetwork2();
	} else {
		if (LocalPlayerName && strcmp(LocalPlayerName, "Anonymous")) {
		  ThisPlayer->SetName(LocalPlayerName);
		}
	}

	CallbackMusicOn();

#if 0
	GamePaused = true;
#endif

	if (FlagRevealMap) {
		Map.Reveal();
	}

	//
	// Setup game types
	//
	// FIXME: implement more game types
	if (GameSettings.GameType != SettingsGameTypeMapDefault) {
		switch (GameSettings.GameType) {
			case SettingsGameTypeMelee:
				break;
			case SettingsGameTypeFreeForAll:
				GameTypeFreeForAll();
				break;
			case SettingsGameTypeTopVsBottom:
				GameTypeTopVsBottom();
				break;
			case SettingsGameTypeLeftVsRight:
				GameTypeLeftVsRight();
				break;
			case SettingsGameTypeManVsMachine:
				GameTypeManVsMachine();
				break;
			case SettingsGameTypeManTeamVsMachine:
				GameTypeManTeamVsMachine();

			// Future game type ideas
#if 0
			case SettingsGameTypeOneOnOne:
				break;
			case SettingsGameTypeCaptureTheFlag:
				break;
			case SettingsGameTypeGreed:
				break;
			case SettingsGameTypeSlaughter:
				break;
			case SettingsGameTypeSuddenDeath:
				break;
			case SettingsGameTypeTeamMelee:
				break;
			case SettingsGameTypeTeamCaptureTheFlag:
				break;
#endif
		}
	}

	//
	// Graphic part
	//
	SetPlayersPalette();
	InitIcons();
	LoadIcons();

	LoadCursors(PlayerRaces.Name[ThisPlayer->Race]);
	UnitUnderCursor = NoUnitP;

	InitMissileTypes();
#ifndef DYNAMIC_LOAD
	LoadMissileSprites();
#endif
	InitConstructions();
	LoadConstructions();
	LoadUnitTypes();
	LoadDecorations();

	InitSelections();

	InitUserInterface();
	UI.Load();

	UI.Minimap.Create();
	Map.Init();
	PreprocessMap();

	//
	// Sound part
	//
	LoadUnitSounds();
	MapUnitSounds();
	if (SoundEnabled()) {
		InitSoundClient();
	}

	//
	// Spells
	//
	InitSpells();

	//
	// Init units' groups
	//
	InitGroups();

	//
	// Init players?
	//
	DebugPlayers();
	PlayersInitAi();

	//
	// Upgrades
	//
	InitUpgrades();

	//
	// Dependencies
	//
	InitDependencies();

	//
	// Buttons (botpanel)
	//
	InitButtons();

	//
	// Triggers
	//
	InitTriggers();

	SetDefaultTextColors(UI.NormalFontColor, UI.ReverseFontColor);

#if 0
	if (!UI.SelectedViewport) {
		UI.SelectedViewport = UI.Viewports;
	}
#endif
	UI.SelectedViewport->Center(
		ThisPlayer->StartX, ThisPlayer->StartY, TileSizeX / 2, TileSizeY / 2);

	//
	// Various hacks wich must be done after the map is loaded.
	//
	// FIXME: must be done after map is loaded
	InitAStar();
	//
	// FIXME: The palette is loaded after the units are created.
	// FIXME: This loops fixes the colors of the units.
	//
	for (i = 0; i < NumUnits; ++i) {
		// I don't really think that there can be any rescued
		// units at this point.
		if (Units[i]->RescuedFrom) {
			Units[i]->Colors = &Units[i]->RescuedFrom->UnitColors;
		} else {
			Units[i]->Colors = &Units[i]->Player->UnitColors;
		}
	}

	GameResult = GameNoResult;

	CommandLog(NULL, NoUnitP, FlushCommands, -1, -1, NoUnitP, NULL, -1);
	Video.ClearScreen();
}