Merge pull request #4 from Lo-X/master

Font Awesome 4.0.3, enum classes
This commit is contained in:
Rick Blommers 2014-05-07 19:56:40 +02:00
commit 2841b6ba8d
8 changed files with 762 additions and 827 deletions

View File

@ -167,7 +167,7 @@ bool QtAwesome::initFontAwesome( )
Q_INIT_RESOURCE(QtAwesome); Q_INIT_RESOURCE(QtAwesome);
// load the font file // load the font file
QFile res(":/fonts/fontawesome.ttf"); QFile res(":/fonts/fontawesome-4.0.3.ttf");
if(!res.open(QIODevice::ReadOnly)) { if(!res.open(QIODevice::ReadOnly)) {
qDebug() << "Font awesome font could not be loaded!"; qDebug() << "Font awesome font could not be loaded!";
return false; return false;
@ -189,415 +189,381 @@ bool QtAwesome::initFontAwesome( )
} }
// intialize the map // intialize the map
QHash<QString, int>& m = namedCodepoints_; QHash<QString, fa>& m = namedCodepoints_;
m.insert( "glass", icon_glass ); m.insert("glass", fa::glass);
m.insert( "music", icon_music ); m.insert("music", fa::music);
m.insert( "search", icon_search ); m.insert("search", fa::search);
m.insert( "envelope", icon_envelope ); m.insert("envelopeo", fa::envelopeo);
m.insert( "heart", icon_heart ); m.insert("heart", fa::heart);
m.insert( "star", icon_star ); m.insert("star", fa::star);
m.insert( "star-empty", icon_star_empty ); m.insert("staro", fa::staro);
m.insert( "user", icon_user ); m.insert("user", fa::user);
m.insert( "film", icon_film ); m.insert("film", fa::film);
m.insert( "th-large", icon_th_large ); m.insert("thlarge", fa::thlarge);
m.insert( "th", icon_th ); m.insert("th", fa::th);
m.insert( "th-list", icon_th_list ); m.insert("thlist", fa::thlist);
m.insert( "ok", icon_ok ); m.insert("check", fa::check);
m.insert( "remove", icon_remove ); m.insert("times", fa::times);
m.insert( "zoom-in", icon_zoom_in ); m.insert("searchplus", fa::searchplus);
m.insert("searchminus", fa::searchminus);
m.insert( "zoom-out", icon_zoom_out ); m.insert("poweroff", fa::poweroff);
m.insert( "off", icon_off ); m.insert("signal", fa::signal);
m.insert( "signal", icon_signal ); m.insert("cog", fa::cog);
m.insert( "cog", icon_cog ); m.insert("trasho", fa::trasho);
m.insert( "gear", icon_gear ); m.insert("home", fa::home);
m.insert( "trash", icon_trash ); m.insert("fileo", fa::fileo);
m.insert( "home", icon_home ); m.insert("clocko", fa::clocko);
m.insert( "file_alt", icon_file_alt ); m.insert("road", fa::road);
m.insert( "time", icon_time ); m.insert("download", fa::download);
m.insert( "road", icon_road ); m.insert("arrowcircleodown", fa::arrowcircleodown);
m.insert( "download-alt", icon_download_alt ); m.insert("arrowcircleoup", fa::arrowcircleoup);
m.insert( "download", icon_download ); m.insert("inbox", fa::inbox);
m.insert( "upload", icon_upload ); m.insert("playcircleo", fa::playcircleo);
m.insert( "inbox", icon_inbox ); m.insert("repeat", fa::repeat);
m.insert( "play-circle", icon_play_circle ); m.insert("refresh", fa::refresh);
m.insert( "repeat", icon_repeat ); m.insert("listalt", fa::listalt);
m.insert("lock", fa::lock);
/* \f020 doesn't work in Safari. all shifted one down */ m.insert("flag", fa::flag);
m.insert("headphones", fa::headphones);
m.insert("volumeoff", fa::volumeoff);
m.insert( "refresh", icon_refresh ); m.insert("volumedown", fa::volumedown);
m.insert( "list-alt", icon_list_alt ); m.insert("volumeup", fa::volumeup);
m.insert( "lock", icon_lock ); m.insert("qrcode", fa::qrcode);
m.insert( "flag", icon_flag ); m.insert("barcode", fa::barcode);
m.insert( "headphones", icon_headphones ); m.insert("tag", fa::tag);
m.insert( "volume-off", icon_volume_off ); m.insert("tags", fa::tags);
m.insert( "volume-down", icon_volume_down ); m.insert("book", fa::book);
m.insert( "volume-up", icon_volume_up ); m.insert("bookmark", fa::bookmark);
m.insert( "qrcode", icon_qrcode ); m.insert("print", fa::print);
m.insert( "barcode", icon_barcode ); m.insert("camera", fa::camera);
m.insert( "tag", icon_tag ); m.insert("font", fa::font);
m.insert( "tags", icon_tags ); m.insert("bold", fa::bold);
m.insert( "book", icon_book ); m.insert("italic", fa::italic);
m.insert( "bookmark", icon_bookmark ); m.insert("textheight", fa::textheight);
m.insert( "print", icon_print ); m.insert("textwidth", fa::textwidth);
m.insert("alignleft", fa::alignleft);
m.insert( "camera", icon_camera ); m.insert("aligncenter", fa::aligncenter);
m.insert( "font", icon_font ); m.insert("alignright", fa::alignright);
m.insert( "bold", icon_bold ); m.insert("alignjustify", fa::alignjustify);
m.insert( "italic", icon_italic ); m.insert("list", fa::list);
m.insert( "text-height", icon_text_height ); m.insert("outdent", fa::outdent);
m.insert( "text-width", icon_text_width ); m.insert("indent", fa::indent);
m.insert( "align-left", icon_align_left ); m.insert("videocamera", fa::videocamera);
m.insert( "align-center", icon_align_center ); m.insert("pictureo", fa::pictureo);
m.insert( "align-right", icon_align_right ); m.insert("pencil", fa::pencil);
m.insert( "align-justify", icon_align_justify ); m.insert("mapmarker", fa::mapmarker);
m.insert( "list", icon_list ); m.insert("adjust", fa::adjust);
m.insert( "indent-left", icon_indent_left ); m.insert("tint", fa::tint);
m.insert( "indent-right", icon_indent_right ); m.insert("pencilsquareo", fa::pencilsquareo);
m.insert( "facetime-video", icon_facetime_video ); m.insert("sharesquareo", fa::sharesquareo);
m.insert( "picture", icon_picture ); m.insert("checksquareo", fa::checksquareo);
m.insert("arrows", fa::arrows);
m.insert( "pencil", icon_pencil ); m.insert("stepbackward", fa::stepbackward);
m.insert( "map-marker", icon_map_marker ); m.insert("fastbackward", fa::fastbackward);
m.insert( "adjust", icon_adjust ); m.insert("backward", fa::backward);
m.insert( "tint", icon_tint ); m.insert("play", fa::play);
m.insert( "edit", icon_edit ); m.insert("pause", fa::pause);
m.insert( "share", icon_share ); m.insert("stop", fa::stop);
m.insert( "check", icon_check ); m.insert("forward", fa::forward);
m.insert( "move", icon_move ); m.insert("fastforward", fa::fastforward);
m.insert( "step-backward", icon_step_backward ); m.insert("stepforward", fa::stepforward);
m.insert( "fast-backward", icon_fast_backward ); m.insert("eject", fa::eject);
m.insert( "backward", icon_backward ); m.insert("chevronleft", fa::chevronleft);
m.insert( "play", icon_play ); m.insert("chevronright", fa::chevronright);
m.insert( "pause", icon_pause ); m.insert("pluscircle", fa::pluscircle);
m.insert( "stop", icon_stop ); m.insert("minuscircle", fa::minuscircle);
m.insert( "forward", icon_forward ); m.insert("timescircle", fa::timescircle);
m.insert("checkcircle", fa::checkcircle);
m.insert( "fast-forward", icon_fast_forward ); m.insert("questioncircle", fa::questioncircle);
m.insert( "step-forward", icon_step_forward ); m.insert("infocircle", fa::infocircle);
m.insert( "eject", icon_eject ); m.insert("crosshairs", fa::crosshairs);
m.insert( "chevron-left", icon_chevron_left ); m.insert("timescircleo", fa::timescircleo);
m.insert( "chevron-right", icon_chevron_right ); m.insert("checkcircleo", fa::checkcircleo);
m.insert( "plus-sign", icon_plus_sign ); m.insert("ban", fa::ban);
m.insert( "minus-sign", icon_minus_sign ); m.insert("arrowleft", fa::arrowleft);
m.insert( "remove-sign", icon_remove_sign ); m.insert("arrowright", fa::arrowright);
m.insert( "ok-sign", icon_ok_sign ); m.insert("arrowup", fa::arrowup);
m.insert( "question-sign", icon_question_sign ); m.insert("arrowdown", fa::arrowdown);
m.insert( "info-sign", icon_info_sign ); m.insert("share", fa::share);
m.insert( "screenshot", icon_screenshot ); m.insert("expand", fa::expand);
m.insert( "remove-circle", icon_remove_circle ); m.insert("compress", fa::compress);
m.insert( "ok-circle", icon_ok_circle ); m.insert("plus", fa::plus);
m.insert( "ban-circle", icon_ban_circle ); m.insert("minus", fa::minus);
m.insert("asterisk", fa::asterisk);
m.insert( "arrow-left", icon_arrow_left ); m.insert("exclamationcircle", fa::exclamationcircle);
m.insert( "arrow-right", icon_arrow_right ); m.insert("gift", fa::gift);
m.insert( "arrow-up", icon_arrow_up ); m.insert("leaf", fa::leaf);
m.insert( "arrow-down", icon_arrow_down ); m.insert("fire", fa::fire);
m.insert( "share-alt", icon_share_alt ); m.insert("eye", fa::eye);
m.insert( "resize-full", icon_resize_full ); m.insert("eyeslash", fa::eyeslash);
m.insert( "resize-small", icon_resize_small ); m.insert("exclamationtriangle", fa::exclamationtriangle);
m.insert( "plus", icon_plus ); m.insert("plane", fa::plane);
m.insert( "minus", icon_minus ); m.insert("calendar", fa::calendar);
m.insert( "asterisk", icon_asterisk ); m.insert("random", fa::random);
m.insert( "exclamation-sign", icon_exclamation_sign ); m.insert("comment", fa::comment);
m.insert( "gift", icon_gift ); m.insert("magnet", fa::magnet);
m.insert( "leaf", icon_leaf ); m.insert("chevronup", fa::chevronup);
m.insert( "fire", icon_fire ); m.insert("chevrondown", fa::chevrondown);
m.insert( "eye-open", icon_eye_open ); m.insert("retweet", fa::retweet);
m.insert("shoppingcart", fa::shoppingcart);
m.insert( "eye-close", icon_eye_close ); m.insert("folder", fa::folder);
m.insert( "warning-sign", icon_warning_sign ); m.insert("folderopen", fa::folderopen);
m.insert( "plane", icon_plane ); m.insert("arrowsv", fa::arrowsv);
m.insert( "calendar", icon_calendar ); m.insert("arrowsh", fa::arrowsh);
m.insert( "random", icon_random ); m.insert("barcharto", fa::barcharto);
m.insert( "comment", icon_comment ); m.insert("twittersquare", fa::twittersquare);
m.insert( "magnet", icon_magnet ); m.insert("facebooksquare", fa::facebooksquare);
m.insert( "chevron-up", icon_chevron_up ); m.insert("cameraretro", fa::cameraretro);
m.insert( "chevron-down", icon_chevron_down ); m.insert("key", fa::key);
m.insert( "retweet", icon_retweet ); m.insert("cogs", fa::cogs);
m.insert( "shopping-cart", icon_shopping_cart ); m.insert("comments", fa::comments);
m.insert( "folder-close", icon_folder_close ); m.insert("thumbsoup", fa::thumbsoup);
m.insert( "folder-open", icon_folder_open ); m.insert("thumbsodown", fa::thumbsodown);
m.insert( "resize-vertical", icon_resize_vertical ); m.insert("starhalf", fa::starhalf);
m.insert( "resize-horizontal", icon_resize_horizontal ); m.insert("hearto", fa::hearto);
m.insert("signout", fa::signout);
m.insert( "bar-chart", icon_bar_chart ); m.insert("linkedinsquare", fa::linkedinsquare);
m.insert( "twitter-sign", icon_twitter_sign ); m.insert("thumbtack", fa::thumbtack);
m.insert( "facebook-sign", icon_facebook_sign ); m.insert("externallink", fa::externallink);
m.insert( "camera-retro", icon_camera_retro ); m.insert("signin", fa::signin);
m.insert( "key", icon_key ); m.insert("trophy", fa::trophy);
m.insert( "cogs", icon_cogs ); m.insert("githubsquare", fa::githubsquare);
m.insert( "gears", icon_gears ); m.insert("upload", fa::upload);
m.insert( "comments", icon_comments ); m.insert("lemono", fa::lemono);
m.insert( "thumbs-up-alt", icon_thumbs_up_alt ); m.insert("phone", fa::phone);
m.insert( "thumbs-down-alt", icon_thumbs_down_alt ); m.insert("squareo", fa::squareo);
m.insert( "star-half", icon_star_half ); m.insert("bookmarko", fa::bookmarko);
m.insert( "heart-empty", icon_heart_empty ); m.insert("phonesquare", fa::phonesquare);
m.insert( "signout", icon_signout ); m.insert("twitter", fa::twitter);
m.insert( "linkedin-sign", icon_linkedin_sign ); m.insert("facebook", fa::facebook);
m.insert( "pushpin", icon_pushpin ); m.insert("github", fa::github);
m.insert( "external-link", icon_external_link ); m.insert("unlock", fa::unlock);
m.insert("creditcard", fa::creditcard);
m.insert( "signin", icon_signin ); m.insert("rss", fa::rss);
m.insert( "trophy", icon_trophy ); m.insert("hddo", fa::hddo);
m.insert( "github-sign", icon_github_sign ); m.insert("bullhorn", fa::bullhorn);
m.insert( "upload-alt", icon_upload_alt ); m.insert("bell", fa::bell);
m.insert( "lemon", icon_lemon ); m.insert("certificate", fa::certificate);
m.insert( "phone", icon_phone ); m.insert("handoright", fa::handoright);
m.insert( "check-empty", icon_check_empty ); m.insert("handoleft", fa::handoleft);
m.insert( "bookmark-empty", icon_bookmark_empty ); m.insert("handoup", fa::handoup);
m.insert( "phone-sign", icon_phone_sign ); m.insert("handodown", fa::handodown);
m.insert( "twitter", icon_twitter ); m.insert("arrowcircleleft", fa::arrowcircleleft);
m.insert( "facebook", icon_facebook ); m.insert("arrowcircleright", fa::arrowcircleright);
m.insert( "github", icon_github ); m.insert("arrowcircleup", fa::arrowcircleup);
m.insert( "unlock", icon_unlock ); m.insert("arrowcircledown", fa::arrowcircledown);
m.insert( "credit-card", icon_credit_card ); m.insert("globe", fa::globe);
m.insert( "rss", icon_rss ); m.insert("wrench", fa::wrench);
m.insert("tasks", fa::tasks);
m.insert( "hdd", icon_hdd ); m.insert("filter", fa::filter);
m.insert( "bullhorn", icon_bullhorn ); m.insert("briefcase", fa::briefcase);
m.insert( "bell", icon_bell ); m.insert("arrowsalt", fa::arrowsalt);
m.insert( "certificate", icon_certificate ); m.insert("users", fa::users);
m.insert( "hand-right", icon_hand_right ); m.insert("link", fa::link);
m.insert( "hand-left", icon_hand_left ); m.insert("cloud", fa::cloud);
m.insert( "hand-up", icon_hand_up ); m.insert("flask", fa::flask);
m.insert( "hand-down", icon_hand_down ); m.insert("scissors", fa::scissors);
m.insert( "circle-arrow-left", icon_circle_arrow_left ); m.insert("fileso", fa::fileso);
m.insert( "circle-arrow-right", icon_circle_arrow_right ); m.insert("paperclip", fa::paperclip);
m.insert( "circle-arrow-up", icon_circle_arrow_up ); m.insert("floppyo", fa::floppyo);
m.insert( "circle-arrow-down", icon_circle_arrow_down ); m.insert("square", fa::square);
m.insert( "globe", icon_globe ); m.insert("bars", fa::bars);
m.insert( "wrench", icon_wrench ); m.insert("listul", fa::listul);
m.insert( "tasks", icon_tasks ); m.insert("listol", fa::listol);
m.insert("strikethrough", fa::strikethrough);
m.insert( "filter", icon_filter ); m.insert("underline", fa::underline);
m.insert( "briefcase", icon_briefcase ); m.insert("table", fa::table);
m.insert( "fullscreen", icon_fullscreen ); m.insert("magic", fa::magic);
m.insert("truck", fa::truck);
m.insert( "group", icon_group ); m.insert("pinterest", fa::pinterest);
m.insert( "link", icon_link ); m.insert("pinterestsquare", fa::pinterestsquare);
m.insert( "cloud", icon_cloud ); m.insert("googleplussquare", fa::googleplussquare);
m.insert( "beaker", icon_beaker ); m.insert("googleplus", fa::googleplus);
m.insert( "cut", icon_cut ); m.insert("money", fa::money);
m.insert( "copy", icon_copy ); m.insert("caretdown", fa::caretdown);
m.insert( "paper-clip", icon_paper_clip ); m.insert("caretup", fa::caretup);
m.insert( "save", icon_save ); m.insert("caretleft", fa::caretleft);
m.insert( "sign-blank", icon_sign_blank ); m.insert("caretright", fa::caretright);
m.insert( "reorder", icon_reorder ); m.insert("columns", fa::columns);
m.insert( "list-ul", icon_list_ul ); m.insert("sort", fa::sort);
m.insert( "list-ol", icon_list_ol ); m.insert("sortasc", fa::sortasc);
m.insert( "strikethrough", icon_strikethrough ); m.insert("sortdesc", fa::sortdesc);
m.insert( "underline", icon_underline ); m.insert("envelope", fa::envelope);
m.insert( "table", icon_table ); m.insert("linkedin", fa::linkedin);
m.insert("undo", fa::undo);
m.insert( "magic", icon_magic ); m.insert("gavel", fa::gavel);
m.insert( "truck", icon_truck ); m.insert("tachometer", fa::tachometer);
m.insert( "pinterest", icon_pinterest ); m.insert("commento", fa::commento);
m.insert( "pinterest-sign", icon_pinterest_sign ); m.insert("commentso", fa::commentso);
m.insert( "google-plus-sign", icon_google_plus_sign ); m.insert("bolt", fa::bolt);
m.insert( "google-plus", icon_google_plus ); m.insert("sitemap", fa::sitemap);
m.insert( "money", icon_money ); m.insert("umbrella", fa::umbrella);
m.insert( "caret-down", icon_caret_down ); m.insert("clipboard", fa::clipboard);
m.insert( "caret-up", icon_caret_up ); m.insert("lightbulbo", fa::lightbulbo);
m.insert( "caret-left", icon_caret_left ); m.insert("exchange", fa::exchange);
m.insert( "caret-right", icon_caret_right ); m.insert("clouddownload", fa::clouddownload);
m.insert( "columns", icon_columns ); m.insert("cloudupload", fa::cloudupload);
m.insert( "sort", icon_sort ); m.insert("usermd", fa::usermd);
m.insert( "sort-down", icon_sort_down ); m.insert("stethoscope", fa::stethoscope);
m.insert( "sort-up", icon_sort_up ); m.insert("suitcase", fa::suitcase);
m.insert("bello", fa::bello);
m.insert( "envelope-alt", icon_envelope_alt ); m.insert("coffee", fa::coffee);
m.insert( "linkedin", icon_linkedin ); m.insert("cutlery", fa::cutlery);
m.insert( "undo", icon_undo ); m.insert("filetexto", fa::filetexto);
m.insert( "legal", icon_legal ); m.insert("buildingo", fa::buildingo);
m.insert( "dashboard", icon_dashboard ); m.insert("hospitalo", fa::hospitalo);
m.insert( "comment-alt", icon_comment_alt ); m.insert("ambulance", fa::ambulance);
m.insert( "comments-alt", icon_comments_alt ); m.insert("medkit", fa::medkit);
m.insert( "bolt", icon_bolt ); m.insert("fighterjet", fa::fighterjet);
m.insert( "sitemap", icon_sitemap ); m.insert("beer", fa::beer);
m.insert( "umbrella", icon_umbrella ); m.insert("hsquare", fa::hsquare);
m.insert( "paste", icon_paste ); m.insert("plussquare", fa::plussquare);
m.insert( "lightbulb", icon_lightbulb ); m.insert("angledoubleleft", fa::angledoubleleft);
m.insert( "exchange", icon_exchange ); m.insert("angledoubleright", fa::angledoubleright);
m.insert( "cloud-download", icon_cloud_download ); m.insert("angledoubleup", fa::angledoubleup);
m.insert( "cloud-upload", icon_cloud_upload ); m.insert("angledoubledown", fa::angledoubledown);
m.insert("angleleft", fa::angleleft);
m.insert( "user-md", icon_user_md ); m.insert("angleright", fa::angleright);
m.insert( "stethoscope", icon_stethoscope ); m.insert("angleup", fa::angleup);
m.insert( "suitcase", icon_suitcase ); m.insert("angledown", fa::angledown);
m.insert( "bell-alt", icon_bell_alt ); m.insert("desktop", fa::desktop);
m.insert( "coffee", icon_coffee ); m.insert("laptop", fa::laptop);
m.insert( "food", icon_food ); m.insert("tablet", fa::tablet);
m.insert( "file-text-alt", icon_file_text_alt ); m.insert("mobile", fa::mobile);
m.insert( "building", icon_building ); m.insert("circleo", fa::circleo);
m.insert( "hospital", icon_hospital ); m.insert("quoteleft", fa::quoteleft);
m.insert( "ambulance", icon_ambulance ); m.insert("quoteright", fa::quoteright);
m.insert( "medkit", icon_medkit ); m.insert("spinner", fa::spinner);
m.insert( "fighter-jet", icon_fighter_jet ); m.insert("circle", fa::circle);
m.insert( "beer", icon_beer ); m.insert("reply", fa::reply);
m.insert( "h-sign", icon_h_sign ); m.insert("githubalt", fa::githubalt);
m.insert( "plus-sign-alt", icon_plus_sign_alt ); m.insert("foldero", fa::foldero);
m.insert("folderopeno", fa::folderopeno);
m.insert( "double-angle-left", icon_double_angle_left ); m.insert("smileo", fa::smileo);
m.insert( "double-angle-right", icon_double_angle_right ); m.insert("frowno", fa::frowno);
m.insert( "double-angle-up", icon_double_angle_up ); m.insert("meho", fa::meho);
m.insert( "double-angle-down", icon_double_angle_down ); m.insert("gamepad", fa::gamepad);
m.insert( "angle-left", icon_angle_left ); m.insert("keyboardo", fa::keyboardo);
m.insert( "angle-right", icon_angle_right ); m.insert("flago", fa::flago);
m.insert( "angle-up", icon_angle_up ); m.insert("flagcheckered", fa::flagcheckered);
m.insert( "angle-down", icon_angle_down ); m.insert("terminal", fa::terminal);
m.insert( "desktop", icon_desktop ); m.insert("code", fa::code);
m.insert( "laptop", icon_laptop ); m.insert("replyall", fa::replyall);
m.insert( "tablet", icon_tablet ); m.insert("mailreplyall", fa::mailreplyall);
m.insert( "mobile-phone", icon_mobile_phone ); m.insert("starhalfo", fa::starhalfo);
m.insert( "circle-blank", icon_circle_blank ); m.insert("locationarrow", fa::locationarrow);
m.insert( "quote-left", icon_quote_left ); m.insert("crop", fa::crop);
m.insert( "quote-right", icon_quote_right ); m.insert("codefork", fa::codefork);
m.insert("chainbroken", fa::chainbroken);
m.insert( "spinner", icon_spinner ); m.insert("question", fa::question);
m.insert( "circle", icon_circle ); m.insert("info", fa::info);
m.insert( "reply", icon_reply ); m.insert("exclamation", fa::exclamation);
m.insert( "mail_reply", icon_mail_reply ); m.insert("superscript", fa::superscript);
m.insert("subscript", fa::subscript);
m.insert( "github-alt", icon_github_alt ); m.insert("eraser", fa::eraser);
m.insert( "folder-close-alt", icon_folder_close_alt ); m.insert("puzzlepiece", fa::puzzlepiece);
m.insert( "folder-open-alt", icon_folder_open_alt ); m.insert("microphone", fa::microphone);
m.insert("microphoneslash", fa::microphoneslash);
m.insert( "expand_alt", icon_expand_alt ); m.insert("shield", fa::shield);
m.insert( "collapse_alt", icon_collapse_alt ); m.insert("calendaro", fa::calendaro);
m.insert( "smile", icon_smile ); m.insert("fireextinguisher", fa::fireextinguisher);
m.insert( "frown", icon_frown ); m.insert("rocket", fa::rocket);
m.insert( "meh", icon_meh ); m.insert("maxcdn", fa::maxcdn);
m.insert( "gamepad", icon_gamepad ); m.insert("chevroncircleleft", fa::chevroncircleleft);
m.insert( "keyboard", icon_keyboard ); m.insert("chevroncircleright", fa::chevroncircleright);
m.insert( "flag_alt", icon_flag_alt ); m.insert("chevroncircleup", fa::chevroncircleup);
m.insert( "flag_checkered", icon_flag_checkered ); m.insert("chevroncircledown", fa::chevroncircledown);
m.insert("html5", fa::html5);
m.insert( "terminal", icon_terminal ); m.insert("css3", fa::css3);
m.insert( "code", icon_code ); m.insert("anchor", fa::anchor);
m.insert( "reply_all", icon_reply_all ); m.insert("unlockalt", fa::unlockalt);
m.insert( "mail_reply_all", icon_mail_reply_all ); m.insert("bullseye", fa::bullseye);
m.insert( "star_half_full", icon_star_half_full ); m.insert("ellipsish", fa::ellipsish);
m.insert( "star_half_empty", icon_star_half_empty ); m.insert("ellipsisv", fa::ellipsisv);
m.insert( "location_arrow", icon_location_arrow ); m.insert("rsssquare", fa::rsssquare);
m.insert( "crop", icon_crop ); m.insert("playcircle", fa::playcircle);
m.insert( "code_fork", icon_code_fork ); m.insert("ticket", fa::ticket);
m.insert( "unlink", icon_unlink ); m.insert("minussquare", fa::minussquare);
m.insert( "question", icon_question ); m.insert("minussquareo", fa::minussquareo);
m.insert( "info", icon_info ); m.insert("levelup", fa::levelup);
m.insert( "exclamation", icon_exclamation ); m.insert("leveldown", fa::leveldown);
m.insert( "superscript", icon_superscript ); m.insert("checksquare", fa::checksquare);
m.insert( "subscript", icon_subscript ); m.insert("pencilsquare", fa::pencilsquare);
m.insert( "eraser", icon_eraser ); m.insert("externallinksquare", fa::externallinksquare);
m.insert( "puzzle_piece", icon_puzzle_piece ); m.insert("sharesquare", fa::sharesquare);
m.insert("compass", fa::compass);
m.insert( "microphone", icon_microphone ); m.insert("caretsquareodown", fa::caretsquareodown);
m.insert( "microphone_off", icon_microphone_off ); m.insert("caretsquareoup", fa::caretsquareoup);
m.insert( "shield", icon_shield ); m.insert("caretsquareoright", fa::caretsquareoright);
m.insert( "calendar_empty", icon_calendar_empty ); m.insert("eur", fa::eur);
m.insert( "fire_extinguisher", icon_fire_extinguisher ); m.insert("gbp", fa::gbp);
m.insert( "rocket", icon_rocket ); m.insert("usd", fa::usd);
m.insert( "maxcdn", icon_maxcdn ); m.insert("inr", fa::inr);
m.insert( "chevron_sign_left", icon_chevron_sign_left ); m.insert("jpy", fa::jpy);
m.insert( "chevron_sign_right", icon_chevron_sign_right ); m.insert("rub", fa::rub);
m.insert( "chevron_sign_up", icon_chevron_sign_up ); m.insert("krw", fa::krw);
m.insert( "chevron_sign_down", icon_chevron_sign_down ); m.insert("btc", fa::btc);
m.insert( "html5", icon_html5 ); m.insert("file", fa::file);
m.insert( "css3", icon_css3 ); m.insert("filetext", fa::filetext);
m.insert( "anchor", icon_anchor ); m.insert("sortalphaasc", fa::sortalphaasc);
m.insert( "unlock_alt", icon_unlock_alt ); m.insert("sortalphadesc", fa::sortalphadesc);
m.insert("sortamountasc", fa::sortamountasc);
m.insert( "bullseye", icon_bullseye ); m.insert("sortamountdesc", fa::sortamountdesc);
m.insert( "ellipsis_horizontal", icon_ellipsis_horizontal ); m.insert("sortnumericasc", fa::sortnumericasc);
m.insert( "ellipsis_vertical", icon_ellipsis_vertical ); m.insert("sortnumericdesc", fa::sortnumericdesc);
m.insert( "rss_sign", icon_rss_sign ); m.insert("thumbsup", fa::thumbsup);
m.insert( "play_sign", icon_play_sign ); m.insert("thumbsdown", fa::thumbsdown);
m.insert( "ticket", icon_ticket ); m.insert("youtubesquare", fa::youtubesquare);
m.insert( "minus_sign_alt", icon_minus_sign_alt ); m.insert("youtube", fa::youtube);
m.insert( "check_minus", icon_check_minus ); m.insert("xing", fa::xing);
m.insert( "level_up", icon_level_up ); m.insert("xingsquare", fa::xingsquare);
m.insert( "level_down", icon_level_down ); m.insert("youtubeplay", fa::youtubeplay);
m.insert( "check_sign", icon_check_sign ); m.insert("dropbox", fa::dropbox);
m.insert( "edit_sign", icon_edit_sign ); m.insert("stackoverflow", fa::stackoverflow);
m.insert( "external_link_sign", icon_external_link_sign ); m.insert("instagram", fa::instagram);
m.insert( "share_sign", icon_share_sign ); m.insert("flickr", fa::flickr);
m.insert("adn", fa::adn);
// v3.2.0 m.insert("bitbucket", fa::bitbucket);
m.insert( "compass", icon_compass ); m.insert("bitbucketsquare", fa::bitbucketsquare);
m.insert("tumblr", fa::tumblr);
m.insert( "collapse", icon_collapse ); m.insert("tumblrsquare", fa::tumblrsquare);
m.insert( "collapse_top", icon_collapse_top ); m.insert("longarrowdown", fa::longarrowdown);
m.insert( "expand", icon_expand ); m.insert("longarrowup", fa::longarrowup);
m.insert( "euro", icon_euro ); m.insert("longarrowleft", fa::longarrowleft);
m.insert( "eur", icon_eur ); m.insert("longarrowright", fa::longarrowright);
m.insert( "gbp", icon_gbp ); m.insert("appleicon", fa::appleicon);
m.insert( "dollar", icon_dollar ); m.insert("windowsicon", fa::windowsicon);
m.insert( "usd", icon_usd ); m.insert("androidicon", fa::androidicon);
m.insert( "rupee", icon_rupee ); m.insert("linuxicon", fa::linuxicon);
m.insert( "inr", icon_inr ); m.insert("dribbble", fa::dribbble);
m.insert( "yen", icon_yen ); m.insert("skype", fa::skype);
m.insert( "jpy", icon_jpy ); m.insert("foursquare", fa::foursquare);
m.insert( "renminbi", icon_renminbi ); m.insert("trello", fa::trello);
m.insert( "cny", icon_cny ); m.insert("female", fa::female);
m.insert( "won", icon_won ); m.insert("male", fa::male);
m.insert( "krw", icon_krw ); m.insert("gittip", fa::gittip);
m.insert( "bitcoin", icon_bitcoin ); m.insert("suno", fa::suno);
m.insert( "btc", icon_btc ); m.insert("moono", fa::moono);
m.insert( "file", icon_file ); m.insert("archive", fa::archive);
m.insert( "file_text", icon_file_text ); m.insert("bug", fa::bug);
m.insert( "sort_by_alphabet", icon_sort_by_alphabet ); m.insert("vk", fa::vk);
m.insert( "sort_by_alphabet_alt", icon_sort_by_alphabet_alt ); m.insert("weibo", fa::weibo);
m.insert( "sort_by_attributes", icon_sort_by_attributes ); m.insert("renren", fa::renren);
m.insert( "sort_by_attributes_alt", icon_sort_by_attributes_alt ); m.insert("pagelines", fa::pagelines);
m.insert("stackexchange", fa::stackexchange);
m.insert( "sort_by_order", icon_sort_by_order ); m.insert("arrowcircleoright", fa::arrowcircleoright);
m.insert( "sort_by_order_alt", icon_sort_by_order_alt ); m.insert("arrowcircleoleft", fa::arrowcircleoleft);
m.insert( "thumbs_up", icon_thumbs_up ); m.insert("caretsquareoleft", fa::caretsquareoleft);
m.insert( "thumbs_down", icon_thumbs_down ); m.insert("dotcircleo", fa::dotcircleo);
m.insert( "youtube_sign", icon_youtube_sign ); m.insert("wheelchair", fa::wheelchair);
m.insert( "youtube", icon_youtube ); m.insert("vimeosquare", fa::vimeosquare);
m.insert( "xing", icon_xing ); m.insert("tryicon", fa::tryicon);
m.insert( "xing_sign", icon_xing_sign ); m.insert("plussquareo", fa::plussquareo);
m.insert( "youtube_play", icon_youtube_play );
m.insert( "dropbox", icon_dropbox );
m.insert( "stackexchange", icon_stackexchange );
m.insert( "instagram", icon_instagram );
m.insert( "flickr", icon_flickr );
m.insert( "adn", icon_adn );
m.insert( "bitbucket", icon_bitbucket );
m.insert( "bitbucket_sign", icon_bitbucket_sign );
m.insert( "tumblr", icon_tumblr );
m.insert( "tumblr_sign", icon_tumblr_sign );
m.insert( "long_arrow_down", icon_long_arrow_down );
m.insert( "long_arrow_up", icon_long_arrow_up );
m.insert( "long_arrow_left", icon_long_arrow_left );
m.insert( "long_arrow_right", icon_long_arrow_right );
m.insert( "apple", icon_apple );
m.insert( "windows", icon_windows );
m.insert( "android", icon_android );
m.insert( "linux", icon_linux );
m.insert( "dribble", icon_dribble );
m.insert( "skype", icon_skype );
m.insert( "foursquare", icon_foursquare );
m.insert( "trello", icon_trello );
m.insert( "female", icon_female );
m.insert( "male", icon_male );
m.insert( "gittip", icon_gittip );
m.insert( "sun", icon_sun );
m.insert( "moon", icon_moon );
m.insert( "archive", icon_archive );
m.insert( "bug", icon_bug );
m.insert( "vk", icon_vk );
m.insert( "weibo", icon_weibo );
m.insert( "renren", icon_renren );
return true; return true;
} }
void QtAwesome::addNamedCodepoint( const QString& name, int codePoint) void QtAwesome::addNamedCodepoint( const QString& name, fa codePoint)
{ {
namedCodepoints_.insert( name, codePoint); namedCodepoints_.insert( name, codePoint);
} }
@ -636,11 +602,11 @@ static QVariantMap mergeOptions( const QVariantMap& defaults, const QVariantMap&
/// <code> /// <code>
/// awesome->icon( icon_group ) /// awesome->icon( icon_group )
/// </code> /// </code>
QIcon QtAwesome::icon(int character, const QVariantMap &options) QIcon QtAwesome::icon(fa character, const QVariantMap &options)
{ {
// create a merged QVariantMap to have default options and icon-specific options // create a merged QVariantMap to have default options and icon-specific options
QVariantMap optionMap = mergeOptions( defaultOptions_, options ); QVariantMap optionMap = mergeOptions( defaultOptions_, options );
optionMap.insert("text", QString( QChar(character) ) ); optionMap.insert("text", QString( QChar(static_cast<int>(character)) ) );
return icon( fontIconPainter_, optionMap ); return icon( fontIconPainter_, optionMap );
} }

View File

@ -16,409 +16,377 @@
/// A list of all icon-names with the codepoint (unicode-value) on the right /// A list of all icon-names with the codepoint (unicode-value) on the right
/// You can use the names on the page http://fortawesome.github.io/Font-Awesome/design.html ( replace every dash '-' with an underscore '_') /// You can use the names on the page http://fortawesome.github.io/Font-Awesome/design.html
enum QtFontAwesomeName { enum class fa {
icon_glass = 0xf000, glass = 0xf000,
icon_music = 0xf001, music = 0xf001,
icon_search = 0xf002, search = 0xf002,
icon_envelope = 0xf003, envelopeo = 0xf003,
icon_heart = 0xf004, heart = 0xf004,
icon_star = 0xf005, star = 0xf005,
icon_star_empty = 0xf006, staro = 0xf006,
icon_user = 0xf007, user = 0xf007,
icon_film = 0xf008, film = 0xf008,
icon_th_large = 0xf009, thlarge = 0xf009,
icon_th = 0xf00a, th = 0xf00a,
icon_th_list = 0xf00b, thlist = 0xf00b,
icon_ok = 0xf00c, check = 0xf00c,
icon_remove = 0xf00d, times = 0xf00d,
icon_zoom_in = 0xf00e, searchplus = 0xf00e,
searchminus = 0xf010,
icon_zoom_out = 0xf010, poweroff = 0xf011,
icon_off = 0xf011, signal = 0xf012,
icon_signal = 0xf012, cog = 0xf013,
icon_cog = 0xf013, trasho = 0xf014,
icon_gear = icon_cog, home = 0xf015,
icon_trash = 0xf014, fileo = 0xf016,
icon_home = 0xf015, clocko = 0xf017,
icon_file_alt = 0xf016, road = 0xf018,
icon_time = 0xf017, download = 0xf019,
icon_road = 0xf018, arrowcircleodown = 0xf01a,
icon_download_alt = 0xf019, arrowcircleoup = 0xf01b,
icon_download = 0xf01a, inbox = 0xf01c,
icon_upload = 0xf01b, playcircleo = 0xf01d,
icon_inbox = 0xf01c, repeat = 0xf01e,
icon_play_circle = 0xf01d, refresh = 0xf021,
icon_repeat = 0xf01e, listalt = 0xf022,
lock = 0xf023,
/* \f020 doesn't work in Safari. all shifted one down */ flag = 0xf024,
icon_refresh = 0xf021, headphones = 0xf025,
icon_list_alt = 0xf022, volumeoff = 0xf026,
icon_lock = 0xf023, volumedown = 0xf027,
icon_flag = 0xf024, volumeup = 0xf028,
icon_headphones = 0xf025, qrcode = 0xf029,
icon_volume_off = 0xf026, barcode = 0xf02a,
icon_volume_down = 0xf027, tag = 0xf02b,
icon_volume_up = 0xf028, tags = 0xf02c,
icon_qrcode = 0xf029, book = 0xf02d,
icon_barcode = 0xf02a, bookmark = 0xf02e,
icon_tag = 0xf02b, print = 0xf02f,
icon_tags = 0xf02c, camera = 0xf030,
icon_book = 0xf02d, font = 0xf031,
icon_bookmark = 0xf02e, bold = 0xf032,
icon_print = 0xf02f, italic = 0xf033,
textheight = 0xf034,
icon_camera = 0xf030, textwidth = 0xf035,
icon_font = 0xf031, alignleft = 0xf036,
icon_bold = 0xf032, aligncenter = 0xf037,
icon_italic = 0xf033, alignright = 0xf038,
icon_text_height = 0xf034, alignjustify = 0xf039,
icon_text_width = 0xf035, list = 0xf03a,
icon_align_left = 0xf036, outdent = 0xf03b,
icon_align_center = 0xf037, indent = 0xf03c,
icon_align_right = 0xf038, videocamera = 0xf03d,
icon_align_justify = 0xf039, pictureo = 0xf03e,
icon_list = 0xf03a, pencil = 0xf040,
icon_indent_left = 0xf03b, mapmarker = 0xf041,
icon_indent_right = 0xf03c, adjust = 0xf042,
icon_facetime_video = 0xf03d, tint = 0xf043,
icon_picture = 0xf03e, pencilsquareo = 0xf044,
sharesquareo = 0xf045,
icon_pencil = 0xf040, checksquareo = 0xf046,
icon_map_marker = 0xf041, arrows = 0xf047,
icon_adjust = 0xf042, stepbackward = 0xf048,
icon_tint = 0xf043, fastbackward = 0xf049,
icon_edit = 0xf044, backward = 0xf04a,
icon_share = 0xf045, play = 0xf04b,
icon_check = 0xf046, pause = 0xf04c,
icon_move = 0xf047, stop = 0xf04d,
icon_step_backward = 0xf048, forward = 0xf04e,
icon_fast_backward = 0xf049, fastforward = 0xf050,
icon_backward = 0xf04a, stepforward = 0xf051,
icon_play = 0xf04b, eject = 0xf052,
icon_pause = 0xf04c, chevronleft = 0xf053,
icon_stop = 0xf04d, chevronright = 0xf054,
icon_forward = 0xf04e, pluscircle = 0xf055,
minuscircle = 0xf056,
icon_fast_forward = 0xf050, timescircle = 0xf057,
icon_step_forward = 0xf051, checkcircle = 0xf058,
icon_eject = 0xf052, questioncircle = 0xf059,
icon_chevron_left = 0xf053, infocircle = 0xf05a,
icon_chevron_right = 0xf054, crosshairs = 0xf05b,
icon_plus_sign = 0xf055, timescircleo = 0xf05c,
icon_minus_sign = 0xf056, checkcircleo = 0xf05d,
icon_remove_sign = 0xf057, ban = 0xf05e,
icon_ok_sign = 0xf058, arrowleft = 0xf060,
icon_question_sign = 0xf059, arrowright = 0xf061,
icon_info_sign = 0xf05a, arrowup = 0xf062,
icon_screenshot = 0xf05b, arrowdown = 0xf063,
icon_remove_circle = 0xf05c, share = 0xf064,
icon_ok_circle = 0xf05d, expand = 0xf065,
icon_ban_circle = 0xf05e, compress = 0xf066,
plus = 0xf067,
icon_arrow_left = 0xf060, minus = 0xf068,
icon_arrow_right = 0xf061, asterisk = 0xf069,
icon_arrow_up = 0xf062, exclamationcircle = 0xf06a,
icon_arrow_down = 0xf063, gift = 0xf06b,
icon_share_alt = 0xf064, leaf = 0xf06c,
icon_resize_full = 0xf065, fire = 0xf06d,
icon_resize_small = 0xf066, eye = 0xf06e,
icon_plus = 0xf067, eyeslash = 0xf070,
icon_minus = 0xf068, exclamationtriangle = 0xf071,
icon_asterisk = 0xf069, plane = 0xf072,
icon_exclamation_sign = 0xf06a, calendar = 0xf073,
icon_gift = 0xf06b, random = 0xf074,
icon_leaf = 0xf06c, comment = 0xf075,
icon_fire = 0xf06d, magnet = 0xf076,
icon_eye_open = 0xf06e, chevronup = 0xf077,
chevrondown = 0xf078,
icon_eye_close = 0xf070, retweet = 0xf079,
icon_warning_sign = 0xf071, shoppingcart = 0xf07a,
icon_plane = 0xf072, folder = 0xf07b,
icon_calendar = 0xf073, folderopen = 0xf07c,
icon_random = 0xf074, arrowsv = 0xf07d,
icon_comment = 0xf075, arrowsh = 0xf07e,
icon_magnet = 0xf076, barcharto = 0xf080,
icon_chevron_up = 0xf077, twittersquare = 0xf081,
icon_chevron_down = 0xf078, facebooksquare = 0xf082,
icon_retweet = 0xf079, cameraretro = 0xf083,
icon_shopping_cart = 0xf07a, key = 0xf084,
icon_folder_close = 0xf07b, cogs = 0xf085,
icon_folder_open = 0xf07c, comments = 0xf086,
icon_resize_vertical = 0xf07d, thumbsoup = 0xf087,
icon_resize_horizontal = 0xf07e, thumbsodown = 0xf088,
starhalf = 0xf089,
icon_bar_chart = 0xf080, hearto = 0xf08a,
icon_twitter_sign = 0xf081, signout = 0xf08b,
icon_facebook_sign = 0xf082, linkedinsquare = 0xf08c,
icon_camera_retro = 0xf083, thumbtack = 0xf08d,
icon_key = 0xf084, externallink = 0xf08e,
icon_cogs = 0xf085, signin = 0xf090,
icon_gears = icon_cogs, trophy = 0xf091,
icon_comments = 0xf086, githubsquare = 0xf092,
icon_thumbs_up_alt = 0xf087, upload = 0xf093,
icon_thumbs_down_alt = 0xf088, lemono = 0xf094,
icon_star_half = 0xf089, phone = 0xf095,
icon_heart_empty = 0xf08a, squareo = 0xf096,
icon_signout = 0xf08b, bookmarko = 0xf097,
icon_linkedin_sign = 0xf08c, phonesquare = 0xf098,
icon_pushpin = 0xf08d, twitter = 0xf099,
icon_external_link = 0xf08e, facebook = 0xf09a,
github = 0xf09b,
icon_signin = 0xf090, unlock = 0xf09c,
icon_trophy = 0xf091, creditcard = 0xf09d,
icon_github_sign = 0xf092, rss = 0xf09e,
icon_upload_alt = 0xf093, hddo = 0xf0a0,
icon_lemon = 0xf094, bullhorn = 0xf0a1,
icon_phone = 0xf095, bell = 0xf0f3,
icon_check_empty = 0xf096, certificate = 0xf0a3,
icon_bookmark_empty = 0xf097, handoright = 0xf0a4,
icon_phone_sign = 0xf098, handoleft = 0xf0a5,
icon_twitter = 0xf099, handoup = 0xf0a6,
icon_facebook = 0xf09a, handodown = 0xf0a7,
icon_github = 0xf09b, arrowcircleleft = 0xf0a8,
icon_unlock = 0xf09c, arrowcircleright = 0xf0a9,
icon_credit_card = 0xf09d, arrowcircleup = 0xf0aa,
icon_rss = 0xf09e, arrowcircledown = 0xf0ab,
globe = 0xf0ac,
icon_hdd = 0xf0a0, wrench = 0xf0ad,
icon_bullhorn = 0xf0a1, tasks = 0xf0ae,
icon_bell = 0xf0a2, filter = 0xf0b0,
icon_certificate = 0xf0a3, briefcase = 0xf0b1,
icon_hand_right = 0xf0a4, arrowsalt = 0xf0b2,
icon_hand_left = 0xf0a5, users = 0xf0c0,
icon_hand_up = 0xf0a6, link = 0xf0c1,
icon_hand_down = 0xf0a7, cloud = 0xf0c2,
icon_circle_arrow_left = 0xf0a8, flask = 0xf0c3,
icon_circle_arrow_right = 0xf0a9, scissors = 0xf0c4,
icon_circle_arrow_up = 0xf0aa, fileso = 0xf0c5,
icon_circle_arrow_down = 0xf0ab, paperclip = 0xf0c6,
icon_globe = 0xf0ac, floppyo = 0xf0c7,
icon_wrench = 0xf0ad, square = 0xf0c8,
icon_tasks = 0xf0ae, bars = 0xf0c9,
listul = 0xf0ca,
icon_filter = 0xf0b0, listol = 0xf0cb,
icon_briefcase = 0xf0b1, strikethrough = 0xf0cc,
icon_fullscreen = 0xf0b2, underline = 0xf0cd,
table = 0xf0ce,
icon_group = 0xf0c0, magic = 0xf0d0,
icon_link = 0xf0c1, truck = 0xf0d1,
icon_cloud = 0xf0c2, pinterest = 0xf0d2,
icon_beaker = 0xf0c3, pinterestsquare = 0xf0d3,
icon_cut = 0xf0c4, googleplussquare = 0xf0d4,
icon_copy = 0xf0c5, googleplus = 0xf0d5,
icon_paper_clip = 0xf0c6, money = 0xf0d6,
icon_save = 0xf0c7, caretdown = 0xf0d7,
icon_sign_blank = 0xf0c8, caretup = 0xf0d8,
icon_reorder = 0xf0c9, caretleft = 0xf0d9,
icon_list_ul = 0xf0ca, caretright = 0xf0da,
icon_list_ol = 0xf0cb, columns = 0xf0db,
icon_strikethrough = 0xf0cc, sort = 0xf0dc,
icon_underline = 0xf0cd, sortasc = 0xf0dd,
icon_table = 0xf0ce, sortdesc = 0xf0de,
envelope = 0xf0e0,
icon_magic = 0xf0d0, linkedin = 0xf0e1,
icon_truck = 0xf0d1, undo = 0xf0e2,
icon_pinterest = 0xf0d2, gavel = 0xf0e3,
icon_pinterest_sign = 0xf0d3, tachometer = 0xf0e4,
icon_google_plus_sign = 0xf0d4, commento = 0xf0e5,
icon_google_plus = 0xf0d5, commentso = 0xf0e6,
icon_money = 0xf0d6, bolt = 0xf0e7,
icon_caret_down = 0xf0d7, sitemap = 0xf0e8,
icon_caret_up = 0xf0d8, umbrella = 0xf0e9,
icon_caret_left = 0xf0d9, clipboard = 0xf0ea,
icon_caret_right = 0xf0da, lightbulbo = 0xf0eb,
icon_columns = 0xf0db, exchange = 0xf0ec,
icon_sort = 0xf0dc, clouddownload = 0xf0ed,
icon_sort_down = 0xf0dd, cloudupload = 0xf0ee,
icon_sort_up = 0xf0de, usermd = 0xf0f0,
stethoscope = 0xf0f1,
icon_envelope_alt = 0xf0e0, suitcase = 0xf0f2,
icon_linkedin = 0xf0e1, bello = 0xf0a2,
icon_undo = 0xf0e2, coffee = 0xf0f4,
icon_legal = 0xf0e3, cutlery = 0xf0f5,
icon_dashboard = 0xf0e4, filetexto = 0xf0f6,
icon_comment_alt = 0xf0e5, buildingo = 0xf0f7,
icon_comments_alt = 0xf0e6, hospitalo = 0xf0f8,
icon_bolt = 0xf0e7, ambulance = 0xf0f9,
icon_sitemap = 0xf0e8, medkit = 0xf0fa,
icon_umbrella = 0xf0e9, fighterjet = 0xf0fb,
icon_paste = 0xf0ea, beer = 0xf0fc,
icon_lightbulb = 0xf0eb, hsquare = 0xf0fd,
icon_exchange = 0xf0ec, plussquare = 0xf0fe,
icon_cloud_download = 0xf0ed, angledoubleleft = 0xf100,
icon_cloud_upload = 0xf0ee, angledoubleright = 0xf101,
angledoubleup = 0xf102,
icon_user_md = 0xf0f0, angledoubledown = 0xf103,
icon_stethoscope = 0xf0f1, angleleft = 0xf104,
icon_suitcase = 0xf0f2, angleright = 0xf105,
icon_bell_alt = 0xf0f3, angleup = 0xf106,
icon_coffee = 0xf0f4, angledown = 0xf107,
icon_food = 0xf0f5, desktop = 0xf108,
icon_file_text_alt = 0xf0f6, laptop = 0xf109,
icon_building = 0xf0f7, tablet = 0xf10a,
icon_hospital = 0xf0f8, mobile = 0xf10b,
icon_ambulance = 0xf0f9, circleo = 0xf10c,
icon_medkit = 0xf0fa, quoteleft = 0xf10d,
icon_fighter_jet = 0xf0fb, quoteright = 0xf10e,
icon_beer = 0xf0fc, spinner = 0xf110,
icon_h_sign = 0xf0fd, circle = 0xf111,
icon_plus_sign_alt = 0xf0fe, reply = 0xf112,
githubalt = 0xf113,
icon_double_angle_left = 0xf100, foldero = 0xf114,
icon_double_angle_right = 0xf101, folderopeno = 0xf115,
icon_double_angle_up = 0xf102, smileo = 0xf118,
icon_double_angle_down = 0xf103, frowno = 0xf119,
icon_angle_left = 0xf104, meho = 0xf11a,
icon_angle_right = 0xf105, gamepad = 0xf11b,
icon_angle_up = 0xf106, keyboardo = 0xf11c,
icon_angle_down = 0xf107, flago = 0xf11d,
icon_desktop = 0xf108, flagcheckered = 0xf11e,
icon_laptop = 0xf109, terminal = 0xf120,
icon_tablet = 0xf10a, code = 0xf121,
icon_mobile_phone = 0xf10b, replyall = 0xf122,
icon_circle_blank = 0xf10c, mailreplyall = 0xf122,
icon_quote_left = 0xf10d, starhalfo = 0xf123,
icon_quote_right = 0xf10e, locationarrow = 0xf124,
crop = 0xf125,
icon_spinner = 0xf110, codefork = 0xf126,
icon_circle = 0xf111, chainbroken = 0xf127,
icon_mail_reply = 0xf112, question = 0xf128,
icon_reply = icon_mail_reply, info = 0xf129,
exclamation = 0xf12a,
icon_github_alt = 0xf113, superscript = 0xf12b,
icon_folder_close_alt = 0xf114, subscript = 0xf12c,
icon_folder_open_alt = 0xf115, eraser = 0xf12d,
puzzlepiece = 0xf12e,
icon_expand_alt = 0xf116, microphone = 0xf130,
icon_collapse_alt = 0xf117, microphoneslash = 0xf131,
icon_smile = 0xf118, shield = 0xf132,
icon_frown = 0xf119, calendaro = 0xf133,
icon_meh = 0xf11a, fireextinguisher = 0xf134,
icon_gamepad = 0xf11b, rocket = 0xf135,
icon_keyboard = 0xf11c, maxcdn = 0xf136,
icon_flag_alt = 0xf11d, chevroncircleleft = 0xf137,
icon_flag_checkered = 0xf11e, chevroncircleright = 0xf138,
chevroncircleup = 0xf139,
icon_terminal = 0xf120, chevroncircledown = 0xf13a,
icon_code = 0xf121, html5 = 0xf13b,
icon_reply_all = 0xf122, css3 = 0xf13c,
icon_mail_reply_all = icon_reply_all, anchor = 0xf13d,
icon_star_half_full = 0xf123, unlockalt = 0xf13e,
icon_star_half_empty = icon_star_half_full, bullseye = 0xf140,
icon_location_arrow = 0xf124, ellipsish = 0xf141,
icon_crop = 0xf125, ellipsisv = 0xf142,
icon_code_fork = 0xf126, rsssquare = 0xf143,
icon_unlink = 0xf127, playcircle = 0xf144,
icon_question = 0xf128, ticket = 0xf145,
icon_info = 0xf129, minussquare = 0xf146,
icon_exclamation = 0xf12a, minussquareo = 0xf147,
icon_superscript = 0xf12b, levelup = 0xf148,
icon_subscript = 0xf12c, leveldown = 0xf149,
icon_eraser = 0xf12d, checksquare = 0xf14a,
icon_puzzle_piece = 0xf12e, pencilsquare = 0xf14b,
externallinksquare = 0xf14c,
icon_microphone = 0xf130, sharesquare = 0xf14d,
icon_microphone_off = 0xf131, compass = 0xf14e,
icon_shield = 0xf132, caretsquareodown = 0xf150,
icon_calendar_empty = 0xf133, caretsquareoup = 0xf151,
icon_fire_extinguisher = 0xf134, caretsquareoright = 0xf152,
icon_rocket = 0xf135, eur = 0xf153,
icon_maxcdn = 0xf136, gbp = 0xf154,
icon_chevron_sign_left = 0xf137, usd = 0xf155,
icon_chevron_sign_right = 0xf138, inr = 0xf156,
icon_chevron_sign_up = 0xf139, jpy = 0xf157,
icon_chevron_sign_down = 0xf13a, rub = 0xf158,
icon_html5 = 0xf13b, krw = 0xf159,
icon_css3 = 0xf13c, btc = 0xf15a,
icon_anchor = 0xf13d, file = 0xf15b,
icon_unlock_alt = 0xf13e, filetext = 0xf15c,
sortalphaasc = 0xf15d,
icon_bullseye = 0xf140, sortalphadesc = 0xf15e,
icon_ellipsis_horizontal = 0xf141, sortamountasc = 0xf160,
icon_ellipsis_vertical = 0xf142, sortamountdesc = 0xf161,
icon_rss_sign = 0xf143, sortnumericasc = 0xf162,
icon_play_sign = 0xf144, sortnumericdesc = 0xf163,
icon_ticket = 0xf145, thumbsup = 0xf164,
icon_minus_sign_alt = 0xf146, thumbsdown = 0xf165,
icon_check_minus = 0xf147, youtubesquare = 0xf166,
icon_level_up = 0xf148, youtube = 0xf167,
icon_level_down = 0xf149, xing = 0xf168,
icon_check_sign = 0xf14a, xingsquare = 0xf169,
icon_edit_sign = 0xf14b, youtubeplay = 0xf16a,
icon_external_link_sign = 0xf14c, dropbox = 0xf16b,
icon_share_sign = 0xf14d, stackoverflow = 0xf16c,
instagram = 0xf16d,
// v3.2.0 flickr = 0xf16e,
icon_compass = 0xf14e, adn = 0xf170,
bitbucket = 0xf171,
icon_collapse = 0xf150, bitbucketsquare = 0xf172,
icon_collapse_top = 0xf151, tumblr = 0xf173,
icon_expand = 0xf152, tumblrsquare = 0xf174,
icon_euro = 0xf153, longarrowdown = 0xf175,
icon_eur = 0xf153, longarrowup = 0xf176,
icon_gbp = 0xf154, longarrowleft = 0xf177,
icon_dollar = 0xf155, longarrowright = 0xf178,
icon_usd = icon_dollar, appleicon = 0xf179,
icon_rupee = 0xf156, windowsicon = 0xf17a,
icon_inr = icon_rupee, androidicon = 0xf17b,
icon_yen = 0xf157, linuxicon = 0xf17c,
icon_jpy = icon_yen, dribbble = 0xf17d,
icon_renminbi = 0xf158, skype = 0xf17e,
icon_cny = icon_renminbi, foursquare = 0xf180,
icon_won = 0xf159, trello = 0xf181,
icon_krw = icon_won, female = 0xf182,
icon_bitcoin = 0xf15a, male = 0xf183,
icon_btc = icon_bitcoin, gittip = 0xf184,
icon_file = 0xf15b, suno = 0xf185,
icon_file_text = 0xf15c, moono = 0xf186,
icon_sort_by_alphabet = 0xf15d, archive = 0xf187,
icon_sort_by_alphabet_alt = 0xf15e, bug = 0xf188,
vk = 0xf189,
icon_sort_by_attributes = 0xf160, weibo = 0xf18a,
icon_sort_by_attributes_alt = 0xf161, renren = 0xf18b,
icon_sort_by_order = 0xf162, pagelines = 0xf18c,
icon_sort_by_order_alt = 0xf163, stackexchange = 0xf18d,
icon_thumbs_up = 0xf164, arrowcircleoright = 0xf18e,
icon_thumbs_down = 0xf165, arrowcircleoleft = 0xf190,
icon_youtube_sign = 0xf166, caretsquareoleft = 0xf191,
icon_youtube = 0xf167, dotcircleo = 0xf192,
icon_xing = 0xf168, wheelchair = 0xf193,
icon_xing_sign = 0xf169, vimeosquare = 0xf194,
icon_youtube_play = 0xf16a, tryicon = 0xf195,
icon_dropbox = 0xf16b, plussquareo = 0xf196
icon_stackexchange = 0xf16c,
icon_instagram = 0xf16d,
icon_flickr = 0xf16e,
icon_adn = 0xf170,
icon_bitbucket = 0xf171,
icon_bitbucket_sign = 0xf172,
icon_tumblr = 0xf173,
icon_tumblr_sign = 0xf174,
icon_long_arrow_down = 0xf175,
icon_long_arrow_up = 0xf176,
icon_long_arrow_left = 0xf177,
icon_long_arrow_right = 0xf178,
icon_apple = 0xf179,
icon_windows = 0xf17a,
icon_android = 0xf17b,
icon_linux = 0xf17c,
icon_dribble = 0xf17d,
icon_skype = 0xf17e,
icon_foursquare = 0xf180,
icon_trello = 0xf181,
icon_female = 0xf182,
icon_male = 0xf183,
icon_gittip = 0xf184,
icon_sun = 0xf185,
icon_moon = 0xf186,
icon_archive = 0xf187,
icon_bug = 0xf188,
icon_vk = 0xf189,
icon_weibo = 0xf18a,
icon_renren = 0xf18b
}; };
@ -442,13 +410,13 @@ public:
void init( const QString& fontname ); void init( const QString& fontname );
bool initFontAwesome(); bool initFontAwesome();
void addNamedCodepoint( const QString& name, int codePoint ); void addNamedCodepoint( const QString& name, fa codePoint );
QHash<QString,int> namedCodePoints() { return namedCodepoints_; } QHash<QString,fa> namedCodePoints() { return namedCodepoints_; }
void setDefaultOption( const QString& name, const QVariant& value ); void setDefaultOption( const QString& name, const QVariant& value );
QVariant defaultOption( const QString& name ); QVariant defaultOption( const QString& name );
QIcon icon( int character, const QVariantMap& options = QVariantMap() ); QIcon icon( fa character, const QVariantMap& options = QVariantMap() );
QIcon icon( const QString& name, const QVariantMap& options = QVariantMap() ); QIcon icon( const QString& name, const QVariantMap& options = QVariantMap() );
QIcon icon(QtAwesomeIconPainter* painter, const QVariantMap& optionMap = QVariantMap() ); QIcon icon(QtAwesomeIconPainter* painter, const QVariantMap& optionMap = QVariantMap() );
@ -461,7 +429,7 @@ public:
private: private:
QString fontName_; ///< The font name used for this map QString fontName_; ///< The font name used for this map
QHash<QString,int> namedCodepoints_; ///< A map with names mapped to code-points QHash<QString,fa> namedCodepoints_; ///< A map with names mapped to code-points
QHash<QString, QtAwesomeIconPainter*> painterMap_; ///< A map of custom painters QHash<QString, QtAwesomeIconPainter*> painterMap_; ///< A map of custom painters
QVariantMap defaultOptions_; ///< The default icon options QVariantMap defaultOptions_; ///< The default icon options

View File

@ -6,7 +6,7 @@
TARGET = QtAwesome TARGET = QtAwesome
TEMPLATE = lib TEMPLATE = lib
CONFIG += staticlib CONFIG += staticlib c++11
SOURCES += QtAwesome.cpp SOURCES += QtAwesome.cpp
HEADERS += QtAwesome.h HEADERS += QtAwesome.h

View File

@ -1,5 +1,5 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>fonts/fontawesome.ttf</file> <file>fonts/fontawesome-4.0.3.ttf</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -10,6 +10,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = QtAwesomeSample TARGET = QtAwesomeSample
TEMPLATE = app TEMPLATE = app
CONFIG += c++11
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -18,7 +18,7 @@ int main(int argc, char *argv[])
awesome->initFontAwesome(); awesome->initFontAwesome();
// a simple beer button // a simple beer button
QPushButton* beerButton = new QPushButton( awesome->icon( icon_beer ), "Cheers!" ); QPushButton* beerButton = new QPushButton( awesome->icon( fa::star ), "Cheers!" );
w.setCentralWidget( beerButton ); w.setCentralWidget( beerButton );
w.show(); w.show();

View File

@ -45,10 +45,10 @@ Example
QtAwesome* awesome = new QtAwesome( qApp ); QtAwesome* awesome = new QtAwesome( qApp );
awesome->initFontAwesome(); awesome->initFontAwesome();
// Next create your icon with the help of the icon-enumeration: (all dashes are replaced by underscores) // Next create your icon with the help of the icon-enumeration (no dashes):
QPushButton* beerButton new QPushButton( awesome->icon( icon_beer ), "Cheers!" ); QPushButton* beerButton new QPushButton( awesome->icon( fa::beer ), "Cheers!" );
// You can also use 'string' names to access the icons. (The string version omits the 'icon-' prefix ) // You can also use 'string' names to access the icons. (The string version omits the 'fa-' or 'icon-' prefix and has no dashes )
QPushButton* coffeeButton new QPushButton( awesome->icon( "coffee" ), "Black please!" ); QPushButton* coffeeButton new QPushButton( awesome->icon( "coffee" ), "Black please!" );
// When you create an icon you can supply some options for your icons: // When you create an icon you can supply some options for your icons:
@ -56,14 +56,14 @@ QPushButton* coffeeButton new QPushButton( awesome->icon( "coffee" ), "Black ple
QVariantMap options; QVariantMap options;
options.insert( "color" , QColor(255,0,0) ); options.insert( "color" , QColor(255,0,0) );
QPushButton* musicButton = new QPushButton( awesome->icon( icon_music, options ), "Music" ); QPushButton* musicButton = new QPushButton( awesome->icon( fa::music, options ), "Music" );
// You can also change the default options. // You can also change the default options.
// for example if you always would like to have green icons you could call) // for example if you always would like to have green icons you could call)
awesome->setDefaultOption( "color-disabled", QColor(0,255,0) ); awesome->setDefaultOption( "color-disabled", QColor(0,255,0) );
// You can also directly render a label with this font // You can also directly render a label with this font
QLabel* label = new QLabel( QChar( icon_group ) ); QLabel* label = new QLabel( QChar( fa::group ) );
label->setFont( awesome->font(16) ); label->setFont( awesome->font(16) );
``` ```
@ -81,7 +81,7 @@ public:
{ {
int drawSize = qRound(rectIn.height()*0.5); int drawSize = qRound(rectIn.height()*0.5);
int offset = rectIn.height() / 4; int offset = rectIn.height() / 4;
QChar chr = QChar( icon_plus ); QChar chr = QChar( static_cast<int>(fa::plus) );
painter->setFont( awesome->font( drawSize ) ); painter->setFont( awesome->font( drawSize ) );
@ -124,7 +124,7 @@ setDefaultOption( "scale-factor", 0.9 );
you could supply the following option. you could supply the following option.
```c++ ```c++
options.insert("text-selected", QString( icon_lock ) ); options.insert("text-selected", QString( fa::lock ) );
``` ```
License License