• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ icons函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中icons函数的典型用法代码示例。如果您正苦于以下问题:C++ icons函数的具体用法?C++ icons怎么用?C++ icons使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了icons函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CommonUser

User::User( const wxString& nick, const wxString& country, const int& cpu )
    : CommonUser( nick,country,cpu ) ,
    m_serv(0),
    m_battle(0),
    m_flagicon_idx( icons().GetFlagIcon( country ) ),
    m_rankicon_idx( icons().GetRankIcon( 0 ) ),
    m_statusicon_idx( icons().GetUserListStateIcon( m_status, false, false ) )
{}
开发者ID:tvo,项目名称:springlobby,代码行数:8,代码来源:user.cpp


示例2: icons

void BattleroomListCtrl::UpdateUser( User& user )
{
    if ( !user.BattleStatus().spectator )
		icons().SetColourIcon( user.BattleStatus().colour );
    wxArrayString sides = LSL::Util::vectorToArrayString(LSL::usync().GetSides(STD_STRING(m_battle->GetHostModName())));
    ASSERT_EXCEPTION( user.BattleStatus().side < (long)sides.GetCount(), _T("Side index too high") );
    user.SetSideiconIndex( icons().GetSideIcon( m_battle->GetHostModName(), user.BattleStatus().side ) );
    int index = GetIndexFromData( &user );
    UpdateUser( index );
}
开发者ID:tizbac,项目名称:springlobby,代码行数:10,代码来源:battleroomlistctrl.cpp


示例3: CommonUser

User::User(const std::string& nick, IServer& serv)
    : CommonUser(nick, "", 0)
    , m_serv(&serv)
    , m_battle(0)
    , m_flagicon_idx(icons().GetFlagIcon(""))
    , m_rankicon_idx(icons().GetRankIcon(0))
    , m_statusicon_idx(icons().GetUserListStateIcon(GetStatus(), false, false))
    , m_sideicon_idx(icons().ICON_NONE)
{
}
开发者ID:jpcordovae,项目名称:springlobby,代码行数:10,代码来源:user.cpp


示例4: icons

void ChatPanel::UserStatusUpdated( User& who )
{
  if ( ( m_type == CPT_User ) && ( m_user == &who ) )
  {
	m_chan_opts_button->SetBitmapLabel( icons().GetBitmap(icons().GetUserListStateIcon(who.GetStatus(),false, who.GetBattle() != 0 ) ) );

  }
  if ( !m_show_nick_list || ( m_nicklist == 0 ) ) return;
  try
  {
		m_nicklist->UserUpdated( who );
  } catch (...) { return; }
}
开发者ID:mallyvai,项目名称:springlobby,代码行数:13,代码来源:chatpanel.cpp


示例5: icons

void BattleroomListCtrl::UpdateUser(User& user)
{
	if (!user.BattleStatus().spectator)
		icons().SetColourIcon(user.BattleStatus().colour);
	try {
		wxArrayString sides = lslTowxArrayString(LSL::usync().GetSides(m_battle->GetHostModName()));
		if (user.BattleStatus().side < (long)sides.GetCount()) {
			user.SetSideiconIndex(icons().GetSideIcon(m_battle->GetHostModName(), user.BattleStatus().side));
		}
	} catch (...) {
	}
	int index = GetIndexFromData(&user);
	UpdateUser(index);
}
开发者ID:spike-spb,项目名称:springlobby,代码行数:14,代码来源:battleroomlistctrl.cpp


示例6: CALLSTACKITEM_N

void CJuikIconManagerImpl::LoadIconsL(TInt aProviderId, const TIconID* aIconDefs, TInt aNbIcons)
{
	CALLSTACKITEM_N(_CL("CJuikIconManagerImpl"), _CL("LoadIconsL"));
	auto_ptr<CAknIconArray> icons( new (ELeave) CAknIconArray(aNbIcons) );
	JuikIcons::LoadIconsL( icons.get(), aIconDefs, aNbIcons );
	SetIconsL( aProviderId, *icons );
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:7,代码来源:juik_iconmanager.cpp


示例7: icons

int BattleListCtrl::GetItemImage(long item) const
{
    if ( m_data[item] == NULL )
        return -1;

    return icons().GetBattleStatusIcon( *m_data[item] );
}
开发者ID:tulipe7,项目名称:springlobby,代码行数:7,代码来源:battlelistctrl.cpp


示例8: main

int main(int argc, char *argv[])
{
    QGuiApplication a(argc, argv);

    QStringList arguments = QCoreApplication::arguments();
    arguments.pop_front();
    const bool large = !arguments.isEmpty() && arguments.front() == "-l";
    if (large)
        arguments.pop_front();
    if (arguments.size() < 1) {
        std::cout << "Usage: iconextractor [OPTIONS] FILE [IMAGE_FILE_FOLDER]\n\n"
                     "Extracts Windows icons from executables, DLL or icon files\n"
                     "and writes them out as numbered .png-files.\n\n"
                     "Options: -l    Extract large icons.\n\n"
                     "Based on Qt " << QT_VERSION_STR << "\n";
        return 1;
    }
    const QString sourceFile = arguments.at(0);
    QString imageFileRoot = arguments.size() > 1 ? arguments.at(1) : QDir::currentPath();
    const QFileInfo imageFileRootInfo(imageFileRoot);
    if (!imageFileRootInfo.isDir()) {
        std::cerr << imageFileRoot.toStdString() << " is not a directory.\n";
        return 1;
    }

    const UINT iconCount = ExtractIconEx((wchar_t *)sourceFile.utf16(), -1, 0, 0, 0);
    if (!iconCount) {
        std::cerr << sourceFile.toStdString() << " does not appear to contain icons.\n";
        return 1;
    }

    QScopedArrayPointer<HICON> icons(new HICON[iconCount]);
    const UINT extractedIconCount = large ?
        ExtractIconEx((wchar_t *)sourceFile.utf16(), 0, icons.data(), 0, iconCount) :
        ExtractIconEx((wchar_t *)sourceFile.utf16(), 0, 0, icons.data(), iconCount);
    if (!extractedIconCount) {
        qErrnoWarning("Failed to extract icons from %s", qPrintable(sourceFile));
        return 1;
    }

    std::cout << sourceFile.toStdString() << " contains " << extractedIconCount << " icon(s).\n";

    imageFileRoot = imageFileRootInfo.absoluteFilePath() + QLatin1Char('/') + QFileInfo(sourceFile).baseName();
    for (UINT i = 0; i < extractedIconCount; ++i) {
        const QPixmap pixmap = QtWin::fromHICON(icons[i]);
        if (pixmap.isNull()) {
            std::cerr << "Error converting icons.\n";
            return 1;
        }
        const QString fileName = QString::fromLatin1("%1%2.png").arg(imageFileRoot)
            .arg(i, 3, 10, QLatin1Char('0'));
        if (!pixmap.save(fileName)) {
            std::cerr << "Error writing image file " << fileName.toStdString() << ".\n";
            return 1;
        }
        std::cout << "Wrote image file "
                  << QDir::toNativeSeparators(fileName).toStdString() << ".\n";
    }
    return 0;
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:60,代码来源:main.cpp


示例9: GetColumn

void CustomVirtListCtrl<T,L>::OnColClick( wxListEvent& event )
{
	if ( event.GetColumn() == -1 )
		return;

	const int evt_col = event.GetColumn();


	m_sort_timer.Stop();//otherwise sorting will be way delayed

	int old_sort_col = m_sortorder[0].col;

	wxListItem col;
	GetColumn( m_sortorder[0].col, col );
	col.SetImage( icons().ICON_NONE );
	SetColumn( m_sortorder[0].col, col );

	unsigned int i = 0;
	SortOrder::const_iterator it = m_sortorder.begin();
	for ( ; it != m_sortorder.begin(); ++i, ++it ) {
		if ( m_sortorder[i].col == evt_col )
			break;
	}

//    for ( ; m_sortorder[i].col != event.GetColumn() && i < 4; ++i ) {}

	i = LSL::Util::Clamp( i, (unsigned int)0, m_sort_criteria_count );

	for ( ; i > 0; i--) {
		m_sortorder[i] = m_sortorder[i-1];
	}

	m_sortorder[0].col = evt_col;
	m_sortorder[0].direction *= -1;


	GetColumn( m_sortorder[0].col, col );
	//col.SetImage( ( m_sortorder[0].direction )?ICON_UP:ICON_DOWN );
	col.SetImage( ( m_sortorder[0].direction > 0 )?icons().ICON_UP:icons().ICON_DOWN );
	SetColumn( m_sortorder[0].col, col );

	if ( (old_sort_col != m_sortorder[0].col) || m_dirty_sort) {
		SortList( true );
	} else { // O(n) instead of guaranteed worst case O(n*n)
		ReverseOrder();
	}
}
开发者ID:jgleesawn,项目名称:springlobby,代码行数:47,代码来源:customvirtlistctrl.cpp


示例10: catch

void User::SetStatus(const UserStatus& status)
{
	CommonUser::SetStatus(status);
	// If user is host of a game, then his in_game status tells if the game is on!
	if (m_battle != 0) {
		try {
			User& user = m_battle->GetFounder();
			if (user.GetNick() == GetNick()) {
				m_battle->Update("");
			}
		} catch (...) {
		}
	}

	m_statusicon_idx = icons().GetUserListStateIcon(GetStatus(), false, m_battle != 0);
	m_rankicon_idx = icons().GetRankIcon(GetStatus().rank);
}
开发者ID:jpcordovae,项目名称:springlobby,代码行数:17,代码来源:user.cpp


示例11: switch

int BattleListCtrl::GetItemColumnImage(long item, long column) const
{
    if ( m_data[item] == NULL )
        return -1;

    const IBattle& battle= *m_data[item];

    switch ( column ) {
        default: return -1;

        case 0: return icons().GetBattleStatusIcon( battle );
        case 1:
        {
        	try
        	{
        	 return icons().GetFlagIcon( battle.GetFounder().GetCountry() );
        	}catch(...){}
					break;
        }
		case 2: return icons().GetRankLimitIcon( battle.GetRankNeeded(), false );
        case 4: return battle.MapExists() ? icons().ICON_EXISTS : icons().ICON_NEXISTS;
        case 5: return battle.ModExists() ? icons().ICON_EXISTS : icons().ICON_NEXISTS;
    }
    return -1; // simply to avoid compiler warning
}
开发者ID:tulipe7,项目名称:springlobby,代码行数:25,代码来源:battlelistctrl.cpp


示例12: ASSERT_LOGIC

void ChatPanel::SetUser( const User* usr )
{
	ASSERT_LOGIC( m_type == CPT_User, _T( "Not of type user" ) );

	if (( usr == 0 ) && ( m_user != 0 ) )
	{
	  StatusMessage( _( "Chat closed." ) );
	  m_user->uidata.panel = 0;
	  m_chan_opts_button->SetBitmapLabel( icons().GetBitmap(icons().ICON_EMPTY) );
	}
	else if ( usr != 0 ) usr->uidata.panel = this;
	m_user = usr;
	if ( m_user )
	{
		m_chan_opts_button->SetBitmapLabel( icons().GetBitmap(icons().GetUserListStateIcon(m_user->GetStatus(),false, m_user->GetBattle() != 0 ) ) );
	}
//	if ( m_user )
//        m_chat_log.SetTarget( sett().GetDefaultServer(), usr->GetNick() );
}
开发者ID:mallyvai,项目名称:springlobby,代码行数:19,代码来源:chatpanel.cpp


示例13: ASSERT_LOGIC

void ChatPanel::SetUser(const User* usr)
{
	ASSERT_LOGIC(m_type == CPT_User, "Not of type user");

	if (usr == NULL) {
		if (m_user != NULL) {
			m_user->uidata.panel = 0;
			if (m_chan_opts_button != NULL) {
				m_chan_opts_button->SetBitmapLabel(icons().GetBitmap(icons().ICON_EMPTY));
			}
		}
	} else {
		usr->uidata.panel = this;
		if (m_chan_opts_button != NULL) {
			const wxBitmap icon = icons().GetBitmap(icons().GetUserListStateIcon(usr->GetStatus(), false, usr->GetBattle() != 0));
			m_chan_opts_button->SetBitmapLabel(icon);
		}
	}
	m_user = usr;
}
开发者ID:jpcordovae,项目名称:springlobby,代码行数:20,代码来源:chatpanel.cpp


示例14: _

void BattleRoomTab::RegenerateOptionsList()
{
	long pos = 0;
	m_opts_list->DeleteAllItems();
	m_opts_list->InsertItem(pos, _("Size"));
	m_opt_list_map.clear();
	m_opt_list_map[_("Size")] = pos;
	pos++;
	m_opts_list->InsertItem(pos, _("Windspeed"));
	m_opt_list_map[_("Windspeed")] = pos;
	pos++;
	m_opts_list->InsertItem(pos, _("Tidal strength"));
	m_opt_list_map[_("Tidal strength")] = pos;
	pos++;
	m_opts_list->InsertItem(pos, wxEmptyString);
	pos++;
	pos = AddMMOptionsToList(pos, LSL::Enum::EngineOption);
	// AddMMOptionsToList already increments pos by itself
	m_opts_list->InsertItem(pos, wxEmptyString);
	pos++;
	m_mod_opts_index = pos;
	pos = AddMMOptionsToList(m_mod_opts_index, LSL::Enum::ModOption);
	// AddMMOptionsToList already increments pos by itself
	m_opts_list->InsertItem(pos, wxEmptyString);
	pos++;
	m_map_opts_index = pos;
	pos = AddMMOptionsToList(m_map_opts_index, LSL::Enum::MapOption);
	m_side_sel->Clear();
	if (m_battle != NULL) {
		try {
			const wxArrayString sides = lslTowxArrayString(LSL::usync().GetSides(m_battle->GetHostModName()));
			for (unsigned int i = 0; i < sides.GetCount(); i++) {
				m_side_sel->Append(sides[i], icons().GetBitmap(icons().GetSideIcon(m_battle->GetHostModName(), i)));
			}
			wxSize s = m_side_sel->GetEffectiveMinSize();
			s.SetWidth(s.GetWidth() + 16); // HACK without this additional place, the image overflows the text on wxGtk
			m_side_sel->SetMinSize(s);
		} catch (...) {
		}
	}
}
开发者ID:spike-spb,项目名称:springlobby,代码行数:41,代码来源:battleroomtab.cpp


示例15: builtin_object_size

/*
 * Get size of object, if possible.
 * Currently does nothing,
 */
static NODE *
builtin_object_size(NODE *f, NODE *a, TWORD rt)
{
	CONSZ v = icons(a->n_right);
	if (v < 0 || v > 3)
		uerror("arg2 must be between 0 and 3");

	tfree(f);
	f = buildtree(COMOP, a->n_left, xbcon(v < 2 ? -1 : 0, NULL, rt));
	nfree(a);
	return f;
}
开发者ID:MoochMcGee,项目名称:pcc-optimized,代码行数:16,代码来源:builtins.c


示例16: setaarg

static void
setaarg(int str, union aarg *aa, NODE *p)
{
    if (str) {
        if (((str & (A1_STR|A2_STR|A3_STR)) && p->n_op != STRING) ||
                ((str & (A1_NAME|A2_NAME|A3_NAME)) && p->n_op != NAME))
            uerror("bad arg to attribute");
        aa->sarg = p->n_op == STRING ? p->n_name : (char *)p->n_sp;
        nfree(p);
    } else
        aa->iarg = (int)icons(eve(p));
}
开发者ID:pauley,项目名称:pcc,代码行数:12,代码来源:gcc_compat.c


示例17: wxDialog

PasteDialog::PasteDialog(wxWindow* parent, const wxString& message)
    : wxDialog(parent, -1, _("Flood warning"), wxDefaultPosition, wxDefaultSize, wxFRAME_FLOAT_ON_PARENT | wxDEFAULT_DIALOG_STYLE)
{
	SetIcon(icons().GetIcon(icons().ICON_SPRINGLOBBY));

	//******** copied from wxsource/generic/msgdlgg.cpp with small modifications***********************************************************
	wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);

	wxBoxSizer* icon_text = new wxBoxSizer(wxHORIZONTAL);

	wxBitmap bitmap = wxArtProvider::GetIcon(wxART_QUESTION, wxART_MESSAGE_BOX);

	wxStaticBitmap* info_icon = new wxStaticBitmap(this, wxID_ANY, bitmap);
	icon_text->Add(info_icon, 0, wxCENTER);

	// 2) text
	icon_text->Add(CreateTextSizer(message), 0, wxALIGN_TOP | wxLEFT, 10);

	topsizer->Add(icon_text, 1, wxCENTER | wxLEFT | wxRIGHT | wxTOP, 10);
	topsizer->Add(0, 10);

	// 3) buttons
	wxSizer* sizerBtn = CreateButtonSizer(wxYES_NO);
	if (sizerBtn) {
		wxButton* but = new wxButton(this, ID_PASTE_BUTTON, _("Use pastebin"));
		sizerBtn->Add(but, 0, wxALL, 10);
		topsizer->Add(sizerBtn, 0, wxALIGN_CENTRE | wxALL, 10);
		but->SetFocus();
	}


	SetAutoLayout(true);
	SetSizer(topsizer);

	topsizer->SetSizeHints(this);
	topsizer->Fit(this);

	Centre(wxBOTH | wxCENTER_FRAME);
	/***************************************************************************************************/
}
开发者ID:spike-spb,项目名称:springlobby,代码行数:40,代码来源:pastedialog.cpp


示例18: wxListCtrl

CustomVirtListCtrl<T,L>::CustomVirtListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt, const wxSize& sz,
		long style, const wxString& name, unsigned int sort_criteria_count,
		CompareFunction func, bool highlight, UserActions::ActionType hlaction, bool periodic_sort, unsigned int periodic_sort_interval  ):
	wxListCtrl(parent, id, pt, sz, style | wxLC_VIRTUAL),
	m_tiptimer(this, IDD_TIP_TIMER),
	m_sort_timer(this, IDD_SORT_TIMER),
	m_tiptext(wxEmptyString),
#if wxUSE_TIPWINDOW
	m_tipwindow( 0 ),
	m_controlPointer( 0 ),
#endif
	m_columnCount( 0 ),
	m_selected_index(-1),
	m_prev_selected_index(-1),
	m_last_mouse_pos( wxPoint(-1,-1) ),
	m_name(name),
	m_highlight(highlight),
	m_highlightAction(hlaction),
	m_bg_color( GetBackgroundColour() ),
	m_dirty_sort(false),
	m_sort_criteria_count( sort_criteria_count ),
	m_comparator( this,m_sortorder, func ),
	m_periodic_sort_timer_id( wxNewId() ),
	m_periodic_sort_timer( this, m_periodic_sort_timer_id ),
	m_periodic_sort( periodic_sort ),
	m_periodic_sort_interval( periodic_sort_interval )
{
	//dummy init , will later be replaced with loading from settings
	for ( unsigned int i = 0; i < m_columnCount; ++i) {
		m_column_map[i] = i;

	}

	SetImageList( &icons(), wxIMAGE_LIST_NORMAL );
	SetImageList( &icons(), wxIMAGE_LIST_SMALL );
	m_sortorder = sett().GetSortOrder( name );

	StartTimer();
	Connect( ListctrlDoSortEventType, wxCommandEventHandler( ThisType::OnSortEvent ), NULL, this );
}
开发者ID:jgleesawn,项目名称:springlobby,代码行数:40,代码来源:customvirtlistctrl.cpp


示例19: SHRestricted

void NotifyArea::read_config()
{
	bool clock_visible = true;

	 // read notification icon settings from XML configuration
	XMLPos cfg_pos = g_Globals.get_cfg();

#ifndef __MINGW32__	// SHRestricted() missing in MinGW (as of 29.10.2003)
	if (!g_Globals._SHRestricted || !SHRestricted(REST_HIDECLOCK))
#endif
	{
		if (cfg_pos.go_down("desktopbar")) {
			clock_visible = XMLBoolRef(XMLPos(cfg_pos,"options"), "show-clock", !get_hide_clock_from_registry());
			cfg_pos.back();
		}
	}

	if (cfg_pos.go_down("notify-icons")) {
		XMLPos options(cfg_pos, "options");

		_hide_inactive = XMLBool(options, "hide-inactive", true);	///@todo read default setting from registry
		_show_hidden = XMLBool(options, "show-hidden", false);	///@todo read default setting from registry
		_show_button = XMLBool(options, "show-button", true);

		XMLChildrenFilter icons(cfg_pos, "icon");

		for(XMLChildrenFilter::iterator it=icons.begin(); it!=icons.end(); ++it) {
			const XMLNode& node = **it;

			NotifyIconConfig cfg;

			cfg._name = node.get("name").c_str();
			cfg._tipText = node.get("text").c_str();
			cfg._windowTitle = node.get("window").c_str();
			cfg._modulePath = node.get("module").c_str();
			const string& mode = node.get("show");

			if (mode == "show")
				cfg._mode = NIM_SHOW;
			else if (mode == "hide")
				cfg._mode = NIM_HIDE;
			else //if (mode == "auto")
				cfg._mode = NIM_HIDE;

			_cfg.push_back(cfg);
		}

		cfg_pos.back();
	}

	show_clock(clock_visible);
}
开发者ID:RareHare,项目名称:reactos,代码行数:52,代码来源:traynotify.cpp


示例20: builtin_object_size

/*
 * Get size of object, if possible.
 * Currently does nothing,
 */
static NODE *
builtin_object_size(const struct bitable *bt, NODE *a)
{
    CONSZ v = icons(a->n_right);
    NODE *f;

    if (v < 0 || v > 3)
        uerror("arg2 must be between 0 and 3");

    f = buildtree(COMOP, a->n_left, xbcon(v < 2 ? -1 : 0, NULL, bt->rt));
    nfree(a);
    return f;
}
开发者ID:repos-holder,项目名称:openbsd-patches,代码行数:17,代码来源:builtins.c



注:本文中的icons函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ iconv函数代码示例发布时间:2022-05-30
下一篇:
C++ iconSize函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap