├── .gitignore ├── CommandParse.cpp ├── CommandParse.hpp ├── IM_QXmpp.pro ├── IM_QXmpp.pro.user ├── IM_QXmpp.pro.user.3.2-pre1 ├── IM_QXmpp.pro.user.402b501 ├── IM_QXmpp.pro.user.59cfa80 ├── IM_QXmpp.pro.user.5c421b8 ├── IM_QXmpp.pro.user.9e54cdb ├── IM_QXmpp.pro.user.b18f0a2 ├── Icon_add.png ├── Icon_call.png ├── Icon_call_stop.png ├── Icon_find.png ├── Icon_frd.png ├── Icon_head.png ├── Icon_list_head.png ├── Icon_logger.png ├── Icon_login.png ├── Icon_send.png ├── Icon_setting.png ├── Icon_tray.png ├── Icon_tray_msg.png ├── Icon_user.png ├── LICENSE ├── Makefile ├── Makefile.Debug ├── Makefile.Release ├── MyAppicon.bmp ├── MyAppicon.ico ├── MyAppicon.rc ├── addfiles.cpp ├── addfiles.h ├── addfiles.ui ├── calldlg.cpp ├── calldlg.h ├── calldlg.ui ├── chat └── yang │ ├── 57cb5a26334a6c1d5e27c49def4a0f0d │ ├── chen │ ├── test │ └── 后方科技 ├── chats.cpp ├── chats.h ├── chats.ui ├── chatwindow.cpp ├── chatwindow.h ├── chen ├── commitdlg.ui ├── exit.png ├── file_historys.cpp ├── file_historys.h ├── filereceivedlg.cpp ├── filereceivedlg.h ├── filereceivedlg.ui ├── findfriend.cpp ├── findfriend.h ├── findfriend.ui ├── hello.txt ├── http.ini ├── listwindow.cpp ├── listwindow.h ├── listwindow.ui ├── loginwindow.cpp ├── loginwindow.h ├── loginwindow.ui ├── loginwithsafe.cpp ├── loginwithsafe.h ├── main.cpp ├── maindialog.cpp ├── maindialog.h ├── maindialog.ui ├── mucroom.cpp ├── mucroom.h ├── mucroom.ui ├── node_etw_provider.man ├── openfire功能添加.sql ├── passworddlg.cpp ├── passworddlg.h ├── passworddlg.ui ├── qfiletrans.cpp ├── qfiletrans.h ├── qt_temp.kV6004 ├── resetnickname.cpp ├── resetnickname.h ├── resetnickname.ui ├── resource.qrc ├── roomchat.cpp ├── roomchat.h ├── roomchat.ui ├── safe ├── safeping.cpp └── safeping.h ├── searchdlg.cpp ├── searchdlg.h ├── searchdlg.ui ├── selectmucroom.cpp ├── selectmucroom.h ├── selectmucroom.ui ├── sendfiles.cpp ├── sendfiles.h ├── sendfiles.ui ├── session.cpp ├── session.h ├── set_dirpath.cpp ├── set_dirpath.h ├── set_dirpath.ui ├── setdlg.cpp ├── setdlg.h ├── setdlg.ui ├── setstate.cpp ├── setstate.h ├── setstate.ui ├── skin ├── framelesswin.cpp ├── framelesswin.h ├── iconbutton.cpp ├── iconbutton.h ├── loginwin.cpp ├── loginwin.h ├── shadowdlg.cpp ├── shadowdlg.h ├── tabbutton.cpp └── tabbutton.h ├── style.html ├── techsupportdlg.cpp ├── ui ├── Icon_call.png ├── Icon_call_high.png ├── Icon_call_stop.png ├── Icon_call_stop_high.png ├── Icon_find.png ├── Icon_find_high.png ├── Icon_send.png ├── Icon_send_high.png ├── Qme.png ├── Tools.png ├── away.png ├── btn_close_down.png ├── btn_close_highlight.png ├── btn_close_normal.png ├── btn_down.png ├── btn_highlight.png ├── btn_mini_down.png ├── btn_mini_highlight.png ├── btn_mini_normal.png ├── btn_normal.png ├── btn_set_hover.png ├── btn_set_normal.png ├── btn_set_press.png ├── busy.png ├── button_login_down.png ├── button_login_hover.png ├── button_login_normal.png ├── checkbox_checked.png ├── checkbox_checked_disable.png ├── checkbox_checked_hover.png ├── checkbox_half.png ├── checkbox_half_disabled.png ├── checkbox_half_hover.png ├── checkbox_unchecked.png ├── checkbox_unchecked_disabled.png ├── checkbox_unchecked_hover.png ├── close.png ├── close2.png ├── close_down.png ├── close_focus.png ├── close_high.png ├── close_high2.png ├── close_nofocus.png ├── close_nofocushigh.png ├── close_normal.png ├── close_normal2.png ├── demo.png ├── group-18.png ├── group.png ├── head.gif ├── imoffline.png ├── imonline.png ├── invisible.png ├── keyboard_down.png ├── keyboard_hover.png ├── keyboard_normal.png ├── login_head_bkg_highlight.png ├── login_head_bkg_normal.png ├── login_inputbtn_down.png ├── login_inputbtn_highlight.png ├── login_inputbtn_normal.png ├── loginning_head_animation1.png ├── loginning_head_animation2.png ├── loginning_head_animation3.png ├── loginning_head_animation4.png ├── loginning_head_animation5.png ├── logo-QQ.png ├── logo-main.png ├── logo.png ├── man.png ├── morning.jpg ├── msg_icon_check.png ├── msg_icon_error.png ├── msg_icon_info.png ├── msg_icon_question.png ├── msg_icon_warning.png ├── mute.png ├── navbutton_down.png ├── navbutton_high.png ├── navbutton_normal.png ├── night.jpg ├── noon.jpg ├── qq.png ├── room.png ├── skin.png ├── switch-down.png ├── switch-high.png ├── switch.png ├── sys_button_close.png ├── sys_button_min.png ├── tip.png ├── tools_down.png ├── tools_hover.png └── women.png ├── ui_addfiles.h ├── ui_chats.h ├── ui_chatwindow.h ├── ui_commitdlg.h ├── ui_filereceivedlg.h ├── ui_findfriend.h ├── ui_listwindow.h ├── ui_loginwindow.h ├── ui_maindialog.h ├── ui_mucroom.h ├── ui_passworddlg.h ├── ui_resetnickname.h ├── ui_roomchat.h ├── ui_searchdlg.h ├── ui_selectmucroom.h ├── ui_sendfiles.h ├── ui_set_dirpath.h ├── ui_setdlg.h ├── ui_setstate.h ├── ui_widget.h ├── vc100.pdb ├── widget.cpp └── widget.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /CommandParse.cpp: -------------------------------------------------------------------------------- 1 | #include "CommandParse.hpp" 2 | QString CommandParse::id_ = QString(""); -------------------------------------------------------------------------------- /CommandParse.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/CommandParse.hpp -------------------------------------------------------------------------------- /IM_QXmpp.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2014-10-21T13:07:47 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui network xml multimedia script webkitwidgets webkit 8 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 9 | 10 | TARGET = IM_QXmpp 11 | TEMPLATE = app 12 | RC_FILE = MyAppicon.rc 13 | 14 | SOURCES += main.cpp\ 15 | chatwindow.cpp \ 16 | listwindow.cpp \ 17 | loginwindow.cpp \ 18 | session.cpp \ 19 | qfiletrans.cpp \ 20 | sendfiles.cpp \ 21 | filereceivedlg.cpp \ 22 | searchdlg.cpp \ 23 | findfriend.cpp \ 24 | roomchat.cpp \ 25 | resetnickname.cpp \ 26 | mucroom.cpp \ 27 | selectmucroom.cpp \ 28 | setdlg.cpp \ 29 | chats.cpp \ 30 | passworddlg.cpp \ 31 | maindialog.cpp \ 32 | setstate.cpp \ 33 | skin/iconbutton.cpp \ 34 | skin/tabbutton.cpp \ 35 | skin/framelesswin.cpp \ 36 | safe/safeping.cpp \ 37 | loginwithsafe.cpp \ 38 | skin/shadowdlg.cpp \ 39 | widget.cpp 40 | 41 | SOURCES += main.cpp\ 42 | chatwindow.cpp \ 43 | listwindow.cpp \ 44 | loginwindow.cpp \ 45 | session.cpp \ 46 | qfiletrans.cpp \ 47 | sendfiles.cpp \ 48 | filereceivedlg.cpp \ 49 | searchdlg.cpp \ 50 | findfriend.cpp \ 51 | roomchat.cpp \ 52 | resetnickname.cpp \ 53 | mucroom.cpp \ 54 | selectmucroom.cpp \ 55 | setdlg.cpp \ 56 | set_dirpath.cpp \ 57 | addfiles.cpp \ 58 | skin/shadowdlg.cpp 59 | 60 | HEADERS += \ 61 | chatwindow.h \ 62 | listwindow.h \ 63 | loginwindow.h \ 64 | session.h \ 65 | qfiletrans.h \ 66 | sendfiles.h \ 67 | filereceivedlg.h \ 68 | searchdlg.h \ 69 | findfriend.h \ 70 | roomchat.h \ 71 | resetnickname.h \ 72 | mucroom.h \ 73 | selectmucroom.h \ 74 | setdlg.h \ 75 | set_dirpath.h \ 76 | addfiles.h \ 77 | chats.h \ 78 | passworddlg.h \ 79 | maindialog.h \ 80 | setstate.h \ 81 | ui_listwindow.h \ 82 | ui_maindialog.h \ 83 | ui_chatwindow.h \ 84 | ui_roomchat.h \ 85 | ui_mucroom.h \ 86 | skin/iconbutton.h \ 87 | skin/tabbutton.h \ 88 | skin/framelesswin.h \ 89 | safe/safeping.h \ 90 | loginwithsafe.h \ 91 | skin/shadowdlg.h \ 92 | widget.h \ 93 | ui_widget.h 94 | 95 | FORMS += \ 96 | #chatwindow.ui \ 97 | #listwindow.ui \ 98 | #loginwindow.ui \ 99 | sendfiles.ui \ 100 | filereceivedlg.ui \ 101 | searchdlg.ui \ 102 | findfriend.ui \ 103 | #roomchat.ui \ 104 | resetnickname.ui \ 105 | #mucroom.ui \ 106 | selectmucroom.ui \ 107 | setdlg.ui \ 108 | set_dirpath.ui \ 109 | addfiles.ui \ 110 | commitdlg.ui \ 111 | chats.ui \ 112 | passworddlg.ui \ 113 | #maindialog.ui \ 114 | setstate.ui 115 | 116 | 117 | INCLUDEPATH += "E:\Workspace\QT\qxmpp-master\src\client" 118 | INCLUDEPATH += "E:\Workspace\QT\qxmpp-master\src\base" 119 | 120 | LIBS += "E:\Workspace\QT\build-qxmpp-unknown-Debug\src\qxmpp_d0.lib" 121 | 122 | 123 | RESOURCES += \ 124 | resource.qrc 125 | 126 | OTHER_FILES += \ 127 | exit.png \ 128 | MyAppicon.rc 129 | 130 | -------------------------------------------------------------------------------- /Icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_add.png -------------------------------------------------------------------------------- /Icon_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_call.png -------------------------------------------------------------------------------- /Icon_call_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_call_stop.png -------------------------------------------------------------------------------- /Icon_find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_find.png -------------------------------------------------------------------------------- /Icon_frd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_frd.png -------------------------------------------------------------------------------- /Icon_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_head.png -------------------------------------------------------------------------------- /Icon_list_head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_list_head.png -------------------------------------------------------------------------------- /Icon_logger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_logger.png -------------------------------------------------------------------------------- /Icon_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_login.png -------------------------------------------------------------------------------- /Icon_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_send.png -------------------------------------------------------------------------------- /Icon_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_setting.png -------------------------------------------------------------------------------- /Icon_tray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_tray.png -------------------------------------------------------------------------------- /Icon_tray_msg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_tray_msg.png -------------------------------------------------------------------------------- /Icon_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/Icon_user.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Seven Yang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Makefile for building: IM_QXmpp 3 | # Generated by qmake (2.01a) (Qt 4.8.6) on: ?? 7? 3 15:28:30 2015 4 | # Project: IM_QXmpp.pro 5 | # Template: app 6 | # Command: d:\Qt\4.8.6\bin\qmake.exe -spec d:\Qt\4.8.6\mkspecs\win32-msvc2010 -o Makefile IM_QXmpp.pro 7 | ############################################################################# 8 | 9 | first: debug 10 | install: debug-install 11 | uninstall: debug-uninstall 12 | MAKEFILE = Makefile 13 | QMAKE = d:\Qt\4.8.6\bin\qmake.exe 14 | DEL_FILE = del 15 | CHK_DIR_EXISTS= if not exist 16 | MKDIR = mkdir 17 | COPY = copy /y 18 | COPY_FILE = $(COPY) 19 | COPY_DIR = xcopy /s /q /y /i 20 | INSTALL_FILE = $(COPY_FILE) 21 | INSTALL_PROGRAM = $(COPY_FILE) 22 | INSTALL_DIR = $(COPY_DIR) 23 | DEL_FILE = del 24 | SYMLINK = 25 | DEL_DIR = rmdir 26 | MOVE = move 27 | CHK_DIR_EXISTS= if not exist 28 | MKDIR = mkdir 29 | SUBTARGETS = \ 30 | debug \ 31 | release 32 | 33 | debug: $(MAKEFILE).Debug FORCE 34 | @set MAKEFLAGS=$(MAKEFLAGS) 35 | $(MAKE) -f $(MAKEFILE).Debug 36 | debug-make_default: $(MAKEFILE).Debug FORCE 37 | @set MAKEFLAGS=$(MAKEFLAGS) 38 | $(MAKE) -f $(MAKEFILE).Debug 39 | debug-make_first: $(MAKEFILE).Debug FORCE 40 | @set MAKEFLAGS=$(MAKEFLAGS) 41 | $(MAKE) -f $(MAKEFILE).Debug first 42 | debug-all: $(MAKEFILE).Debug FORCE 43 | @set MAKEFLAGS=$(MAKEFLAGS) 44 | $(MAKE) -f $(MAKEFILE).Debug all 45 | debug-clean: $(MAKEFILE).Debug FORCE 46 | @set MAKEFLAGS=$(MAKEFLAGS) 47 | $(MAKE) -f $(MAKEFILE).Debug clean 48 | debug-distclean: $(MAKEFILE).Debug FORCE 49 | @set MAKEFLAGS=$(MAKEFLAGS) 50 | $(MAKE) -f $(MAKEFILE).Debug distclean 51 | debug-install: $(MAKEFILE).Debug FORCE 52 | @set MAKEFLAGS=$(MAKEFLAGS) 53 | $(MAKE) -f $(MAKEFILE).Debug install 54 | debug-uninstall: $(MAKEFILE).Debug FORCE 55 | @set MAKEFLAGS=$(MAKEFLAGS) 56 | $(MAKE) -f $(MAKEFILE).Debug uninstall 57 | release: $(MAKEFILE).Release FORCE 58 | @set MAKEFLAGS=$(MAKEFLAGS) 59 | $(MAKE) -f $(MAKEFILE).Release 60 | release-make_default: $(MAKEFILE).Release FORCE 61 | @set MAKEFLAGS=$(MAKEFLAGS) 62 | $(MAKE) -f $(MAKEFILE).Release 63 | release-make_first: $(MAKEFILE).Release FORCE 64 | @set MAKEFLAGS=$(MAKEFLAGS) 65 | $(MAKE) -f $(MAKEFILE).Release first 66 | release-all: $(MAKEFILE).Release FORCE 67 | @set MAKEFLAGS=$(MAKEFLAGS) 68 | $(MAKE) -f $(MAKEFILE).Release all 69 | release-clean: $(MAKEFILE).Release FORCE 70 | @set MAKEFLAGS=$(MAKEFLAGS) 71 | $(MAKE) -f $(MAKEFILE).Release clean 72 | release-distclean: $(MAKEFILE).Release FORCE 73 | @set MAKEFLAGS=$(MAKEFLAGS) 74 | $(MAKE) -f $(MAKEFILE).Release distclean 75 | release-install: $(MAKEFILE).Release FORCE 76 | @set MAKEFLAGS=$(MAKEFLAGS) 77 | $(MAKE) -f $(MAKEFILE).Release install 78 | release-uninstall: $(MAKEFILE).Release FORCE 79 | @set MAKEFLAGS=$(MAKEFLAGS) 80 | $(MAKE) -f $(MAKEFILE).Release uninstall 81 | 82 | Makefile: IM_QXmpp.pro d:\Qt\4.8.6\mkspecs\win32-msvc2010\qmake.conf d:\Qt\4.8.6\mkspecs\qconfig.pri \ 83 | d:\Qt\4.8.6\mkspecs\modules\qt_webkit_version.pri \ 84 | d:\Qt\4.8.6\mkspecs\features\qt_functions.prf \ 85 | d:\Qt\4.8.6\mkspecs\features\qt_config.prf \ 86 | d:\Qt\4.8.6\mkspecs\features\exclusive_builds.prf \ 87 | d:\Qt\4.8.6\mkspecs\features\default_pre.prf \ 88 | d:\Qt\4.8.6\mkspecs\features\win32\default_pre.prf \ 89 | d:\Qt\4.8.6\mkspecs\features\debug.prf \ 90 | d:\Qt\4.8.6\mkspecs\features\debug_and_release.prf \ 91 | d:\Qt\4.8.6\mkspecs\features\default_post.prf \ 92 | d:\Qt\4.8.6\mkspecs\features\win32\default_post.prf \ 93 | d:\Qt\4.8.6\mkspecs\features\win32\rtti.prf \ 94 | d:\Qt\4.8.6\mkspecs\features\win32\exceptions.prf \ 95 | d:\Qt\4.8.6\mkspecs\features\win32\stl.prf \ 96 | d:\Qt\4.8.6\mkspecs\features\shared.prf \ 97 | d:\Qt\4.8.6\mkspecs\features\win32\embed_manifest_exe.prf \ 98 | d:\Qt\4.8.6\mkspecs\features\win32\embed_manifest_dll.prf \ 99 | d:\Qt\4.8.6\mkspecs\features\warn_on.prf \ 100 | d:\Qt\4.8.6\mkspecs\features\qt.prf \ 101 | d:\Qt\4.8.6\mkspecs\features\win32\thread.prf \ 102 | d:\Qt\4.8.6\mkspecs\features\moc.prf \ 103 | d:\Qt\4.8.6\mkspecs\features\win32\windows.prf \ 104 | d:\Qt\4.8.6\mkspecs\features\resources.prf \ 105 | d:\Qt\4.8.6\mkspecs\features\uic.prf \ 106 | d:\Qt\4.8.6\mkspecs\features\yacc.prf \ 107 | d:\Qt\4.8.6\mkspecs\features\lex.prf \ 108 | d:\Qt\4.8.6\mkspecs\features\include_source_dir.prf \ 109 | d:\Qt\4.8.6\lib\qtmaind.prl 110 | $(QMAKE) -spec d:\Qt\4.8.6\mkspecs\win32-msvc2010 -o Makefile IM_QXmpp.pro 111 | d:\Qt\4.8.6\mkspecs\qconfig.pri: 112 | d:\Qt\4.8.6\mkspecs\modules\qt_webkit_version.pri: 113 | d:\Qt\4.8.6\mkspecs\features\qt_functions.prf: 114 | d:\Qt\4.8.6\mkspecs\features\qt_config.prf: 115 | d:\Qt\4.8.6\mkspecs\features\exclusive_builds.prf: 116 | d:\Qt\4.8.6\mkspecs\features\default_pre.prf: 117 | d:\Qt\4.8.6\mkspecs\features\win32\default_pre.prf: 118 | d:\Qt\4.8.6\mkspecs\features\debug.prf: 119 | d:\Qt\4.8.6\mkspecs\features\debug_and_release.prf: 120 | d:\Qt\4.8.6\mkspecs\features\default_post.prf: 121 | d:\Qt\4.8.6\mkspecs\features\win32\default_post.prf: 122 | d:\Qt\4.8.6\mkspecs\features\win32\rtti.prf: 123 | d:\Qt\4.8.6\mkspecs\features\win32\exceptions.prf: 124 | d:\Qt\4.8.6\mkspecs\features\win32\stl.prf: 125 | d:\Qt\4.8.6\mkspecs\features\shared.prf: 126 | d:\Qt\4.8.6\mkspecs\features\win32\embed_manifest_exe.prf: 127 | d:\Qt\4.8.6\mkspecs\features\win32\embed_manifest_dll.prf: 128 | d:\Qt\4.8.6\mkspecs\features\warn_on.prf: 129 | d:\Qt\4.8.6\mkspecs\features\qt.prf: 130 | d:\Qt\4.8.6\mkspecs\features\win32\thread.prf: 131 | d:\Qt\4.8.6\mkspecs\features\moc.prf: 132 | d:\Qt\4.8.6\mkspecs\features\win32\windows.prf: 133 | d:\Qt\4.8.6\mkspecs\features\resources.prf: 134 | d:\Qt\4.8.6\mkspecs\features\uic.prf: 135 | d:\Qt\4.8.6\mkspecs\features\yacc.prf: 136 | d:\Qt\4.8.6\mkspecs\features\lex.prf: 137 | d:\Qt\4.8.6\mkspecs\features\include_source_dir.prf: 138 | d:\Qt\4.8.6\lib\qtmaind.prl: 139 | qmake: qmake_all FORCE 140 | @$(QMAKE) -spec d:\Qt\4.8.6\mkspecs\win32-msvc2010 -o Makefile IM_QXmpp.pro 141 | 142 | qmake_all: FORCE 143 | 144 | make_default: debug-make_default release-make_default FORCE 145 | make_first: debug-make_first release-make_first FORCE 146 | all: debug-all release-all FORCE 147 | clean: debug-clean release-clean FORCE 148 | -$(DEL_FILE) ".\IM_QXmpp.intermediate.manifest" 149 | -$(DEL_FILE) IM_QXmpp.exp 150 | -$(DEL_FILE) IM_QXmpp.ilk 151 | -$(DEL_FILE) vc*.pdb 152 | -$(DEL_FILE) vc*.idb 153 | distclean: debug-distclean release-distclean FORCE 154 | -$(DEL_FILE) Makefile 155 | -$(DEL_FILE) IM_QXmpp.pdb 156 | 157 | check: first 158 | 159 | debug-mocclean: $(MAKEFILE).Debug 160 | @set MAKEFLAGS=$(MAKEFLAGS) 161 | $(MAKE) -f $(MAKEFILE).Debug mocclean 162 | release-mocclean: $(MAKEFILE).Release 163 | @set MAKEFLAGS=$(MAKEFLAGS) 164 | $(MAKE) -f $(MAKEFILE).Release mocclean 165 | mocclean: debug-mocclean release-mocclean 166 | 167 | debug-mocables: $(MAKEFILE).Debug 168 | @set MAKEFLAGS=$(MAKEFLAGS) 169 | $(MAKE) -f $(MAKEFILE).Debug mocables 170 | release-mocables: $(MAKEFILE).Release 171 | @set MAKEFLAGS=$(MAKEFLAGS) 172 | $(MAKE) -f $(MAKEFILE).Release mocables 173 | mocables: debug-mocables release-mocables 174 | FORCE: 175 | 176 | $(MAKEFILE).Debug: Makefile 177 | $(MAKEFILE).Release: Makefile 178 | -------------------------------------------------------------------------------- /MyAppicon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/MyAppicon.bmp -------------------------------------------------------------------------------- /MyAppicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/MyAppicon.ico -------------------------------------------------------------------------------- /MyAppicon.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "MyAppicon.ico" 2 | -------------------------------------------------------------------------------- /addfiles.cpp: -------------------------------------------------------------------------------- 1 | #include "addfiles.h" 2 | #include "ui_addfiles.h" 3 | #include 4 | #include "roomchat.h" 5 | #include 6 | #include 7 | addfiles::addfiles(QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::addfiles) 10 | { 11 | ui->setupUi(this); 12 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GBK")); 13 | setWindowTitle(LOCAL("添加文件")); 14 | connect(ui->bt_cofirm,SIGNAL(clicked()),this,SLOT(slotconfirm())); 15 | connect(ui->bt_select,SIGNAL(clicked()),this,SLOT(slotselect())); 16 | } 17 | 18 | addfiles::~addfiles() 19 | { 20 | delete ui; 21 | } 22 | 23 | void addfiles::slotconfirm() 24 | { 25 | if(!(ui->line_path->text().isEmpty())) 26 | { 27 | RoomChat::GetInstance()->get_filename(ui->line_path->text()); 28 | this->close(); 29 | } 30 | } 31 | void addfiles::slotselect() 32 | { 33 | QFileDialog* fdlg = new QFileDialog(this); 34 | fdlg -> setFileMode(QFileDialog::DirectoryOnly); 35 | if(fdlg->exec() == QDialog::Accepted) 36 | { 37 | QString path = fdlg->selectedFiles()[0]; 38 | ui->line_path->setText(path); 39 | } 40 | delete fdlg; 41 | } 42 | 43 | QString addfiles::getfilename() 44 | { 45 | return ui->line_path->text(); 46 | } 47 | -------------------------------------------------------------------------------- /addfiles.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDFILES_H 2 | #define ADDFILES_H 3 | 4 | #include 5 | #define LOCAL(x) QString::fromLocal8Bit(x) 6 | namespace Ui { 7 | class addfiles; 8 | } 9 | 10 | class addfiles : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit addfiles(QWidget *parent = 0); 16 | ~addfiles(); 17 | QString getfilename(); 18 | public slots: 19 | void slotselect(); 20 | void slotconfirm(); 21 | private: 22 | Ui::addfiles *ui; 23 | }; 24 | 25 | #endif // ADDFILES_H 26 | -------------------------------------------------------------------------------- /addfiles.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | addfiles 4 | 5 | 6 | 7 | 0 8 | 0 9 | 254 10 | 81 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 选择文件夹 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 确认 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /calldlg.cpp: -------------------------------------------------------------------------------- 1 | #include "calldlg.h" 2 | #include "ui_calldlg.h" 3 | #include "qfiletrans.h" 4 | #include "listwindow.h" 5 | 6 | CallDlg::CallDlg(QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::CallDlg) 9 | { 10 | ui->setupUi(this); 11 | ui->lineEdit->setText(selfjid); 12 | } 13 | 14 | CallDlg::~CallDlg() 15 | { 16 | delete ui; 17 | } 18 | void CallDlg::startCall() 19 | { 20 | //Loginwindow::getclient()-> 21 | } 22 | QXmppCall *CallDlg::call (const QString &jid) 23 | { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /calldlg.h: -------------------------------------------------------------------------------- 1 | #ifndef CALLDLG_H 2 | #define CALLDLG_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class CallDlg; 9 | } 10 | 11 | class CallDlg : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | void setjid(QString s) 16 | { 17 | selfjid = s; 18 | } 19 | public: 20 | explicit CallDlg(QWidget *parent = 0); 21 | ~CallDlg(); 22 | public slots: 23 | void startCall(); 24 | QXmppCall *call (const QString &jid); 25 | private: 26 | Ui::CallDlg *ui; 27 | QString selfjid; 28 | }; 29 | 30 | #endif // CALLDLG_H 31 | -------------------------------------------------------------------------------- /calldlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CallDlg 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 154 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 70 20 | 50 21 | 291 22 | 41 23 | 24 | 25 | 26 | 27 | 28 | 29 | 280 30 | 100 31 | 75 32 | 23 33 | 34 | 35 | 36 | 呼叫 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /chat/yang/57cb5a26334a6c1d5e27c49def4a0f0d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chat/yang/57cb5a26334a6c1d5e27c49def4a0f0d -------------------------------------------------------------------------------- /chat/yang/chen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chat/yang/chen -------------------------------------------------------------------------------- /chat/yang/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chat/yang/test -------------------------------------------------------------------------------- /chat/yang/后方科技: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chat/yang/后方科技 -------------------------------------------------------------------------------- /chats.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chats.cpp -------------------------------------------------------------------------------- /chats.h: -------------------------------------------------------------------------------- 1 | #ifndef CHATS_H 2 | #define CHATS_H 3 | 4 | #include 5 | #define LOCAL(x) QString::fromLocal8Bit(x) 6 | 7 | namespace Ui { 8 | class chats; 9 | } 10 | 11 | class chats : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit chats(QWidget *parent = 0); 17 | ~chats(); 18 | void setchatsedit(QString); 19 | void clear(); 20 | void scrollToBottom(); 21 | 22 | private: 23 | Ui::chats *ui; 24 | }; 25 | 26 | #endif // CHATS_H 27 | -------------------------------------------------------------------------------- /chats.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | chats 4 | 5 | 6 | 7 | 0 8 | 0 9 | 401 10 | 348 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /chatwindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chatwindow.cpp -------------------------------------------------------------------------------- /chatwindow.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chatwindow.h -------------------------------------------------------------------------------- /chen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/chen -------------------------------------------------------------------------------- /commitdlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | commitdlg 4 | 5 | 6 | 7 | 0 8 | 0 9 | 359 10 | 119 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 提交者 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 提交信息 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 确认 53 | 54 | 55 | 56 | 57 | 58 | 59 | 取消 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/exit.png -------------------------------------------------------------------------------- /file_historys.cpp: -------------------------------------------------------------------------------- 1 | #include "file_historys.h" 2 | #include 3 | #include 4 | #include 5 | using namespace std; 6 | 7 | File_history* File_history::instance = NULL; 8 | File_history::File_history(int argc,char** argv) 9 | { 10 | Py_NoSiteFlag = 1; 11 | Py_Initialize(); 12 | if(!Py_IsInitialized()) 13 | { 14 | printf("the init is failed"); 15 | exit(0); 16 | } 17 | PyRun_SimpleString("print 'start clone'"); 18 | PyRun_SimpleString("import sys"); 19 | PySys_SetArgv(argc, argv); 20 | PyRun_SimpleString("sys.path.remove('C:\\Windows\\SYSTEM32\\python27.zip')"); 21 | PyRun_SimpleString("sys.path.remove('C:\\Python27\\Lib')"); 22 | PyRun_SimpleString("sys.path.remove('C:\\Python27\\Lib\\lib-tk')"); 23 | PyRun_SimpleString("sys.path.remove('C:\\Python27\\DLLs')"); 24 | PyRun_SimpleString("sys.path.append('../')"); 25 | PyRun_SimpleString("sys.path.append('../py/python27_lib.zip')"); 26 | PyRun_SimpleString("sys.path.append('../py/gittle.zip')"); 27 | PyRun_SimpleString("sys.path.append('../py/dulwich.zip')"); 28 | PyRun_SimpleString("sys.path.append('../py/funky.zip')"); 29 | PyRun_SimpleString("sys.path.append('../libs')"); 30 | PyRun_SimpleString("print sys.path"); 31 | } 32 | 33 | File_history::~File_history() 34 | { 35 | Py_Finalize(); 36 | } 37 | 38 | list File_history::f_history(const char *path) 39 | { 40 | multimap file_history_map; 41 | PyObject *Ret = NULL; 42 | PyObject *pModule = NULL; 43 | PyObject *pArg = NULL; 44 | PyObject *pFile_history = NULL; 45 | 46 | Py_IncRef(Ret); 47 | list fh_list; 48 | set fname; 49 | pModule = PyImport_ImportModule((char*)"dulwich_client"); 50 | if(!pModule) 51 | { 52 | printf("import the module failed!\n"); 53 | return fh_list; 54 | } 55 | pFile_history = PyObject_GetAttrString(pModule,"file_history"); 56 | if(NULL == pFile_history) 57 | { 58 | QMessageBox::information(NULL,"info","the function does not loaded!",0); 59 | } 60 | pArg = Py_BuildValue("(s)",path); 61 | if(NULL == pArg) 62 | { 63 | QMessageBox::information(NULL,"info","the arg is NULL"); 64 | } 65 | if(!PyCallable_Check(pFile_history)) 66 | { 67 | QMessageBox::information(NULL,"info","the function is bad!"); 68 | } 69 | while(Ret == NULL) 70 | { 71 | Ret = PyEval_CallObject(pFile_history,pArg); 72 | if(PyErr_Occurred()) 73 | { 74 | PyRun_SimpleString("fd = open('err.txt','a')"); 75 | PyRun_SimpleString("sys.stderr = fd"); 76 | PyRun_SimpleString("sys.stdout = fd"); 77 | PyErr_Print(); 78 | QMessageBox::information(NULL,"info","the function is bad!"); 79 | } 80 | } 81 | 82 | int len = PyList_Size(Ret); 83 | PyObject *pyvalue; 84 | printf("the length is %d\n",len); 85 | for(int i = 0;i(file_name,head)); 101 | } 102 | } 103 | set::iterator tt = fname.begin(); 104 | typedef multimap::iterator Multi; 105 | for(;tt != fname.end();++tt) 106 | { 107 | string str; 108 | string key(*tt); 109 | str = *tt; 110 | pair pos = file_history_map.equal_range(key); 111 | while(pos.first != pos.second) 112 | { 113 | str = str + "," + pos.first->second; 114 | ++pos.first; 115 | } 116 | fh_list.push_back(str); 117 | } 118 | 119 | printf("get the file_history finished\n"); 120 | Py_DecRef(Ret); 121 | return fh_list; 122 | } 123 | -------------------------------------------------------------------------------- /file_historys.h: -------------------------------------------------------------------------------- 1 | #ifndef FILE_HISTORYS_H 2 | #define FILE_HISTORYS_H 3 | #include "python.h" 4 | #include 5 | #include 6 | using namespace std; 7 | class File_history 8 | { 9 | public: 10 | File_history(int argc,char** argv); 11 | ~File_history(); 12 | list f_history(const char* path); 13 | static File_history* instance; 14 | static void initInstance(int argc,char** argv) 15 | { 16 | if(NULL == instance) 17 | instance = new File_history(argc,argv); 18 | } 19 | static File_history* GetInstance() 20 | { 21 | return instance; 22 | } 23 | }; 24 | #endif // FILE_HISTORYS_H 25 | -------------------------------------------------------------------------------- /filereceivedlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/filereceivedlg.cpp -------------------------------------------------------------------------------- /filereceivedlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/filereceivedlg.h -------------------------------------------------------------------------------- /filereceivedlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FileReceiveDlg 4 | 5 | 6 | 7 | 0 8 | 0 9 | 306 10 | 235 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255)); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | background:transparent 26 | 27 | 28 | QFrame::StyledPanel 29 | 30 | 31 | QFrame::Raised 32 | 33 | 34 | 35 | 36 | 37 | 文件名 38 | 39 | 40 | 41 | 42 | 43 | 44 | false 45 | 46 | 47 | false 48 | 49 | 50 | Qt::AlignCenter 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | background:transparent 61 | 62 | 63 | QFrame::StyledPanel 64 | 65 | 66 | QFrame::Raised 67 | 68 | 69 | 70 | 71 | 72 | 发送者 73 | 74 | 75 | 76 | 77 | 78 | 79 | false 80 | 81 | 82 | false 83 | 84 | 85 | Qt::AlignCenter 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | background:transparent 96 | 97 | 98 | QFrame::StyledPanel 99 | 100 | 101 | QFrame::Raised 102 | 103 | 104 | 105 | 106 | 107 | 大 小 108 | 109 | 110 | 111 | 112 | 113 | 114 | false 115 | 116 | 117 | false 118 | 119 | 120 | Qt::AlignCenter 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 0 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 选择路径 140 | 141 | 142 | 143 | 144 | 145 | 146 | 接收 147 | 148 | 149 | 150 | 151 | 152 | 153 | 拒收 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /findfriend.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/findfriend.cpp -------------------------------------------------------------------------------- /findfriend.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/findfriend.h -------------------------------------------------------------------------------- /findfriend.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FindFriend 4 | 5 | 6 | 7 | 0 8 | 0 9 | 212 10 | 76 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255)); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | background:transparent 28 | 29 | 30 | 好友账号 31 | 32 | 33 | 34 | 35 | 36 | 37 | background-color: rgb(255, 255, 255); 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 添加 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /hello.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/hello.txt -------------------------------------------------------------------------------- /http.ini: -------------------------------------------------------------------------------- 1 | base_url=http://61.185.224.60:8000/ -------------------------------------------------------------------------------- /listwindow.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/listwindow.h -------------------------------------------------------------------------------- /loginwindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/loginwindow.cpp -------------------------------------------------------------------------------- /loginwindow.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/loginwindow.h -------------------------------------------------------------------------------- /loginwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Loginwindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 322 10 | 266 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-image: url(:/Icon_login.png); 18 | 19 | 20 | 21 | 22 | 90 23 | 110 24 | 211 25 | 31 26 | 27 | 28 | 29 | color: rgb(0, 0, 0); 30 | background:transparent 31 | 32 | 33 | 34 | 35 | 36 | 37 | 用户名 38 | 39 | 40 | 41 | 42 | 43 | 90 44 | 150 45 | 211 46 | 31 47 | 48 | 49 | 50 | color: rgb(0, 0, 0); 51 | background:transparent 52 | 53 | 54 | 55 | 56 | 57 | 密码 58 | 59 | 60 | 61 | 62 | 63 | 10 64 | 110 65 | 71 66 | 71 67 | 68 | 69 | 70 | background-image: url(:/Icon_head.png); 71 | 72 | 73 | 74 | 75 | 76 | 91 77 | 210 78 | 151 79 | 31 80 | 81 | 82 | 83 | font: 75 12pt "方正姚体"; 84 | 85 | 86 | 87 | 登 陆 88 | 89 | 90 | 91 | 92 | 93 | 0 94 | 0 95 | 321 96 | 111 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 274 107 | 184 108 | 27 109 | 27 110 | 111 | 112 | 113 | background-image: url(:/Icon_setting.png); 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /loginwithsafe.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/loginwithsafe.cpp -------------------------------------------------------------------------------- /loginwithsafe.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGINWITHSAFE_H 2 | #define LOGINWITHSAFE_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | #include "skin/framelesswin.h" 9 | #include "skin/iconbutton.h" 10 | #include "safe/safeping.h" 11 | 12 | class LoginWithSafe : public FramelessWin 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit LoginWithSafe(QWidget *parent = 0); 17 | 18 | void SetSafePing(SafePing *ping) { m_ping = ping;} 19 | QWidget *initTop(); 20 | 21 | void timerEvent(QTimerEvent *); 22 | 23 | void SetupUI() {} 24 | 25 | 26 | signals: 27 | void LoginSafe(); 28 | void LoginWithInfo(QString jid,QString pwd); 29 | public slots: 30 | void okClick(); 31 | void readyRead(); 32 | 33 | private: 34 | SafePing *m_ping; 35 | 36 | }; 37 | 38 | #endif // LOGINWITHSAFE_H 39 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include "loginwindow.h" 3 | 4 | #include 5 | #include 6 | 7 | int main(int argc, char *argv[]) 8 | { 9 | QApplication a(argc, argv); 10 | QCoreApplication::setOrganizationName("HF-Soft"); 11 | QCoreApplication::setOrganizationDomain("hf.com"); 12 | QCoreApplication::setApplicationName("desk"); 13 | 14 | 15 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GBK")); 16 | QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK")); 17 | QTextCodec::setCodecForLocale(QTextCodec::codecForName("GBK")); 18 | 19 | QApplication::setOrganizationName("hf"); 20 | QApplication::setQuitOnLastWindowClosed(false); 21 | 22 | 23 | Loginwindow w; 24 | w.show(); 25 | return a.exec(); 26 | } 27 | -------------------------------------------------------------------------------- /maindialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/maindialog.cpp -------------------------------------------------------------------------------- /maindialog.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINDIALOG_H 2 | #define MAINDIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | namespace Ui { 8 | class MainDialog; 9 | } 10 | 11 | 12 | class Listwindow; 13 | class MainDialog : public QDialog 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit MainDialog(QWidget *parent = 0); 19 | ~MainDialog(); 20 | void closeEvent(QCloseEvent *e); 21 | void setListWindow( Listwindow *win) 22 | { 23 | m_listwindow = win; 24 | } 25 | 26 | static MainDialog* getInstance() 27 | { 28 | if(Instance==NULL) 29 | Instance = new MainDialog(0); 30 | return Instance; 31 | } 32 | 33 | void ClickTabButton( QString txt ); 34 | 35 | public slots: 36 | void slotclosechildwindow(int); 37 | void recvgroup(QString,QString,QString); 38 | void recvchat(QString,QString); 39 | void recvmuc(QString,QString); 40 | void tabchanged(int); 41 | 42 | void tabButtonClick(QString txt); 43 | void tabCloseClick( QString txt ); 44 | signals: 45 | void closed(); 46 | public: 47 | void setclosestate(int); 48 | void addwindow(QWidget*,QString,int,QString); 49 | void addwindow( QWidget *, QString jid,QString nick); 50 | 51 | int tabcount(); 52 | 53 | QTabWidget *tabwidget; 54 | Ui::MainDialog *GetUI() { return ui;} 55 | private: 56 | 57 | Ui::MainDialog *ui; 58 | static MainDialog* Instance; 59 | int closestate; 60 | QHash hash_windowtype; 61 | void settray(QWidget*); 62 | QHash hash_jidwindow; 63 | Listwindow *m_listwindow; 64 | 65 | QHash hash_tabwin; 66 | QHash hash_btn; 67 | }; 68 | 69 | #endif // MAINDIALOG_H 70 | -------------------------------------------------------------------------------- /maindialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 621 10 | 509 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /mucroom.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/mucroom.cpp -------------------------------------------------------------------------------- /mucroom.h: -------------------------------------------------------------------------------- 1 | #ifndef MUCROOM_H 2 | #define MUCROOM_H 3 | 4 | #include 5 | #include "listwindow.h" 6 | #include 7 | #include 8 | #include 9 | #include "chats.h" 10 | 11 | #include 12 | 13 | 14 | namespace Ui { 15 | class Mucroom; 16 | } 17 | 18 | class Mucroom : public QDialog 19 | { 20 | Q_OBJECT 21 | 22 | public: 23 | explicit Mucroom(QWidget *parent = 0); 24 | ~Mucroom(); 25 | QString getmucroomJid(QString); 26 | void joinroom(QString); 27 | void keyPressEvent(QKeyEvent *e); 28 | void setparticipantNickname(QString); 29 | QString getCurrentTime(); 30 | void scrollToBottom(); 31 | void setroomname(QString); 32 | void set_remotepath(QString); 33 | bool commit; 34 | 35 | public slots: 36 | void slotclosed(); 37 | void slotloadmessage(QRect); 38 | void showlist(QString); 39 | void addMessage(QString fromjid, QString msg); 40 | void sendMucMessage(); 41 | void handleMessage(QString fromjid,QString msg); 42 | //打开文件列表 43 | void slotpull(); 44 | void slotcommit(); 45 | void filepush(); 46 | void flushfilelist(int); 47 | void slotQActionfile(); 48 | void slotQAction(); 49 | void slotQActionopenfile(); 50 | void setcommitor(QString); 51 | void setcommit_msg(QString); 52 | void getchats(); 53 | void slotpushfinished(); 54 | void removelist(QString); 55 | void slotfiledownfinished(); 56 | void slotQActionopendir(); 57 | void openfile(QModelIndex); 58 | void slotaddfile(); 59 | 60 | private slots: 61 | void on_file_list_customContextMenuRequested(const QPoint &pos); 62 | void on_version_list_customContextMenuRequested(const QPoint &pos); 63 | 64 | private: 65 | void set_path(QString); 66 | char path[256]; 67 | bool flushflag; 68 | Ui::Mucroom *ui; 69 | QString roomJid_; 70 | QString participantNickname; 71 | QString roomname_; 72 | // QStringList list; 73 | QXmppMucRoom* mucroom_addr; 74 | bool msgflag; 75 | QList v_list; 76 | QList f_list; 77 | bool file_reset; 78 | bool version_reset; 79 | QString ver; 80 | QString fname_fversion; 81 | QString head; 82 | chats* chat; 83 | char commitor[256];// 84 | char commit_msg[256];// 85 | char file_name[256];// 86 | char remote_url[256]; 87 | 88 | }; 89 | 90 | #endif // MUCROOM_H 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /node_etw_provider.man: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | 44 | 45 | 54 | 55 | 59 | 60 | 64 | 65 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /openfire功能添加.sql: -------------------------------------------------------------------------------- 1 | /* 2 | openfire功能添加需要修改的sql字段 3 | 4 | */ 5 | 6 | --修改UserProvider 7 | --UPDATE ofproperty SET propvalue='org.jivesoftware.openfire.user.HFUserProvider' WHERE name='provider.user.className'; 8 | 9 | --添加CA认证 10 | INSERT INTO ofproperty VALUES ('ca.server.sxcz.url','http://localhost:6180/MessageService'); 11 | -------------------------------------------------------------------------------- /passworddlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/passworddlg.cpp -------------------------------------------------------------------------------- /passworddlg.h: -------------------------------------------------------------------------------- 1 | #ifndef PASSWORDDLG_H 2 | #define PASSWORDDLG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class passworddlg; 8 | } 9 | 10 | class passworddlg : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit passworddlg(QWidget *parent = 0); 16 | ~passworddlg(); 17 | 18 | public slots: 19 | void modify(); 20 | void cancle(); 21 | 22 | private: 23 | Ui::passworddlg *ui; 24 | }; 25 | 26 | #endif // PASSWORDDLG_H 27 | -------------------------------------------------------------------------------- /passworddlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | passworddlg 4 | 5 | 6 | 7 | 0 8 | 0 9 | 272 10 | 103 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 新密码: 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 重复输入: 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 确定 57 | 58 | 59 | 60 | 61 | 62 | 63 | 取消 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /qfiletrans.cpp: -------------------------------------------------------------------------------- 1 | #include "qfiletrans.h" 2 | #include "session.h" 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | QFileTrans::QFileTrans(QObject *parent):QXmppClient(parent),transferManager(0) 10 | { 11 | bool check; 12 | Q_UNUSED(check); 13 | 14 | // add transfer manager 15 | transferManager = new QXmppTransferManager(); 16 | addExtension(transferManager); 17 | //transferManager->setSupportedMethods(QXmppTransferJob::SocksMethod); 18 | transferManager->setSupportedMethods(QXmppTransferJob::InBandMethod); 19 | 20 | } 21 | void QFileTrans::setRecipient(const QString &recipient) 22 | { 23 | m_recipient = recipient; 24 | } 25 | 26 | /// A file transfer failed. 27 | 28 | void QFileTrans::slotError(QXmppTransferJob::Error error) 29 | { 30 | qDebug() << "Transmission failed:" << error; 31 | } 32 | 33 | /// A file transfer request was received. 34 | 35 | void QFileTrans::slotFileReceived(QXmppTransferJob *job) 36 | { 37 | 38 | } 39 | 40 | /// A file transfer finished. 41 | 42 | void QFileTrans::slotFinished() 43 | { 44 | qDebug() << "Transmission finished"; 45 | } 46 | 47 | /// A presence was received 48 | 49 | void QFileTrans::slotPresenceReceived(const QXmppPresence &presence) 50 | {/* 51 | bool check; 52 | Q_UNUSED(check); 53 | 54 | // if we don't have a recipient, or if the presence is not from the recipient, 55 | // do nothing 56 | if (m_recipient.isEmpty() || 57 | QXmppUtils::jidToBareJid(presence.from()) != m_recipient || 58 | presence.type() != QXmppPresence::Available) 59 | return; 60 | 61 | // send the file and connect to the job's signals 62 | QXmppTransferJob *job = transferManager->sendFile(presence.from(), ":/example_3_transferHandling.cpp", "example source code"); 63 | 64 | check = connect(job, SIGNAL(error(QXmppTransferJob::Error)), 65 | this, SLOT(slotError(QXmppTransferJob::Error))); 66 | Q_ASSERT(check); 67 | 68 | check = connect(job, SIGNAL(finished()), 69 | this, SLOT(slotFinished())); 70 | Q_ASSERT(check); 71 | 72 | check = connect(job, SIGNAL(progress(qint64,qint64)), 73 | this, SLOT(slotProgress(qint64,qint64))); 74 | Q_ASSERT(check);*/ 75 | } 76 | 77 | /// A file transfer has made progress. 78 | 79 | void QFileTrans::slotProgress(qint64 done, qint64 total) 80 | { 81 | qDebug() << "Transmission progress:" << done << "/" << total; 82 | } 83 | QXmppTransferJob* QFileTrans::sendFile(const QString recipient, const QString file) 84 | { 85 | bool check; 86 | Q_UNUSED(check); 87 | QXmppTransferJob *job = transferManager->sendFile(recipient, file, ""); 88 | 89 | return job; 90 | } 91 | void QFileTrans::login(QString usr, QString pwd, QString domain, QString host,LoginType type) 92 | { 93 | QString jid; 94 | jid = usr + tr("@") + domain + "/FT"; 95 | if ( type == CA) 96 | { 97 | pwd = usr + ":" + pwd; 98 | } 99 | Session::Instance()->setJID(jid); 100 | logger()->setLoggingType(QXmppLogger::StdoutLogging); 101 | configuration().setDomain(domain); 102 | configuration().setHost(host); 103 | configuration().setJid(jid); 104 | configuration().setPassword(pwd); 105 | configuration().setPort(5222); 106 | 107 | configuration().setSaslAuthMechanism("PLAIN"); 108 | connectToServer( configuration()); 109 | } 110 | 111 | void QFileTrans::qxmpp_sendMessage(QString to, QString msg) 112 | { 113 | sendMessage(to,msg); 114 | } 115 | void QFileTrans::qxmpp_sendData(QString data) 116 | { 117 | sendData(data.toLocal8Bit()); 118 | } 119 | -------------------------------------------------------------------------------- /qfiletrans.h: -------------------------------------------------------------------------------- 1 | #ifndef QFILETRANS_H 2 | #define QFILETRANS_H 3 | 4 | //#include 5 | #include 6 | #include 7 | #include 8 | 9 | class Dialog; 10 | class QFileTrans : public QXmppClient 11 | { 12 | public: 13 | enum LoginType {Common,CA}; 14 | QFileTrans(QObject *parent = 0); 15 | 16 | void setRecipient( const QString &recipient); 17 | 18 | QXmppTransferJob* sendFile(const QString recipient,const QString file); 19 | 20 | void login(QString usr,QString pwd,QString domain,QString host,LoginType type = Common); 21 | private slots: 22 | void slotError(QXmppTransferJob::Error error); 23 | void slotFileReceived(QXmppTransferJob *job); 24 | void slotFinished(); 25 | void slotPresenceReceived(const QXmppPresence &presence); 26 | void slotProgress(qint64 done, qint64 total); 27 | 28 | void qxmpp_sendMessage(QString to ,QString msg); 29 | void qxmpp_sendData(QString data); 30 | 31 | private: 32 | QString m_recipient; 33 | Dialog *m_parent; 34 | 35 | public: 36 | QXmppTransferManager *transferManager; 37 | 38 | }; 39 | 40 | #endif // QFILETRANS_H 41 | -------------------------------------------------------------------------------- /qt_temp.kV6004: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/qt_temp.kV6004 -------------------------------------------------------------------------------- /resetnickname.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/resetnickname.cpp -------------------------------------------------------------------------------- /resetnickname.h: -------------------------------------------------------------------------------- 1 | #ifndef RESETNICKNAME_H 2 | #define RESETNICKNAME_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class ResetNickname; 8 | } 9 | 10 | class ResetNickname : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit ResetNickname(QWidget *parent = 0); 16 | ~ResetNickname(); 17 | QString getNickname(); 18 | 19 | public slots: 20 | void confirmClick(); 21 | 22 | private: 23 | Ui::ResetNickname *ui; 24 | QString Nickname; 25 | }; 26 | 27 | #endif // RESETNICKNAME_H 28 | -------------------------------------------------------------------------------- /resetnickname.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | ResetNickname 4 | 5 | 6 | 7 | 0 8 | 0 9 | 220 10 | 80 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255)); 18 | 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 0 31 | 32 | 33 | 0 34 | 35 | 36 | 37 | 38 | 39 | 40 | font: 75 14pt "方正姚体"; 41 | background:transparent; 42 | 43 | 44 | 请输入新昵称: 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | background-color: rgb(255, 255, 255); 54 | 55 | 56 | 57 | 58 | 59 | 60 | font: 75 10pt "方正姚体"; 61 | 62 | 63 | 确定 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icon_find.png 4 | Icon_head.png 5 | Icon_logger.png 6 | Icon_call.png 7 | Icon_add.png 8 | Icon_send.png 9 | Icon_list_head.png 10 | Icon_tray_msg.png 11 | Icon_tray.png 12 | Icon_setting.png 13 | Icon_login.png 14 | Icon_user.png 15 | exit.png 16 | Icon_call_stop.png 17 | Icon_frd.png 18 | style.html 19 | ui/away.png 20 | ui/btn_close_down.png 21 | ui/btn_close_highlight.png 22 | ui/btn_close_normal.png 23 | ui/btn_down.png 24 | ui/btn_highlight.png 25 | ui/btn_mini_down.png 26 | ui/btn_mini_highlight.png 27 | ui/btn_mini_normal.png 28 | ui/btn_normal.png 29 | ui/btn_set_hover.png 30 | ui/btn_set_normal.png 31 | ui/btn_set_press.png 32 | ui/busy.png 33 | ui/button_login_down.png 34 | ui/button_login_hover.png 35 | ui/button_login_normal.png 36 | ui/checkbox_checked.png 37 | ui/checkbox_checked_disable.png 38 | ui/checkbox_checked_hover.png 39 | ui/checkbox_half.png 40 | ui/checkbox_half_disabled.png 41 | ui/checkbox_half_hover.png 42 | ui/checkbox_unchecked.png 43 | ui/checkbox_unchecked_disabled.png 44 | ui/checkbox_unchecked_hover.png 45 | ui/close.png 46 | ui/close2.png 47 | ui/demo.png 48 | ui/group-18.png 49 | ui/group.png 50 | ui/head.gif 51 | ui/imoffline.png 52 | ui/imonline.png 53 | ui/invisible.png 54 | ui/keyboard_down.png 55 | ui/keyboard_hover.png 56 | ui/keyboard_normal.png 57 | ui/login_head_bkg_highlight.png 58 | ui/login_head_bkg_normal.png 59 | ui/login_inputbtn_down.png 60 | ui/login_inputbtn_highlight.png 61 | ui/login_inputbtn_normal.png 62 | ui/loginning_head_animation1.png 63 | ui/loginning_head_animation2.png 64 | ui/loginning_head_animation3.png 65 | ui/loginning_head_animation4.png 66 | ui/loginning_head_animation5.png 67 | ui/logo-QQ.png 68 | ui/man.png 69 | ui/morning.jpg 70 | ui/msg_icon_check.png 71 | ui/msg_icon_error.png 72 | ui/msg_icon_info.png 73 | ui/msg_icon_question.png 74 | ui/msg_icon_warning.png 75 | ui/mute.png 76 | ui/night.jpg 77 | ui/noon.jpg 78 | ui/Qme.png 79 | ui/qq.png 80 | ui/room.png 81 | ui/skin.png 82 | ui/switch-high.png 83 | ui/switch.png 84 | ui/sys_button_close.png 85 | ui/sys_button_min.png 86 | ui/Tools.png 87 | ui/tools_down.png 88 | ui/tools_hover.png 89 | ui/women.png 90 | ui/switch-down.png 91 | ui/navbutton_normal.png 92 | ui/navbutton_high.png 93 | ui/navbutton_down.png 94 | ui/tip.png 95 | ui/logo.png 96 | ui/Icon_call.png 97 | ui/Icon_call_high.png 98 | ui/Icon_call_stop.png 99 | ui/Icon_call_stop_high.png 100 | ui/Icon_find.png 101 | ui/Icon_find_high.png 102 | ui/Icon_send.png 103 | ui/Icon_send_high.png 104 | ui/close_down.png 105 | ui/close_high.png 106 | ui/close_normal.png 107 | ui/logo-main.png 108 | ui/close_normal2.png 109 | ui/close_nofocus.png 110 | ui/close_nofocushigh.png 111 | ui/close_focus.png 112 | ui/close_high2.png 113 | 114 | 115 | -------------------------------------------------------------------------------- /roomchat.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/roomchat.cpp -------------------------------------------------------------------------------- /roomchat.h: -------------------------------------------------------------------------------- 1 | #ifndef ROOMCHAT_H 2 | #define ROOMCHAT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | #include "set_dirpath.h" 17 | 18 | #include "chats.h" 19 | 20 | 21 | namespace Ui { 22 | class RoomChat; 23 | } 24 | 25 | class RoomChat : public QDialog 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | enum ChatType { CommonChat, GroupChat}; 31 | explicit RoomChat(QWidget *parent = 0); 32 | 33 | 34 | ~RoomChat(); 35 | void closeEvent(QCloseEvent *e); 36 | void keyPressEvent(QKeyEvent *e); 37 | void setSelfJid(QString s) 38 | { 39 | selfjid_=s; 40 | } 41 | 42 | void setChatType(int t){ 43 | chatType_ = t; 44 | } 45 | int getChatType() { 46 | return chatType_; 47 | } 48 | //????????? 49 | void setGrouplist(QStringList &s) 50 | { 51 | groupchatlist=s; 52 | } 53 | void setKey(QString s) 54 | { 55 | key = s; 56 | } 57 | static RoomChat* GetInstance() 58 | { 59 | if(!instance) 60 | { 61 | instance = new RoomChat; 62 | } 63 | return instance; 64 | } 65 | void clearList(); 66 | void pushFriend(QStringList &list); // 67 | void scrollToBottom(); 68 | QString getCurrentTime(); // 69 | public slots: 70 | void slotclosed(); 71 | void slotloadmessage(QRect); 72 | void flushfilelist(int); 73 | void sendMessages(); // 74 | void setchats(); 75 | void addMessage(QString fromjid, QString msg);// 76 | void handleMessage(QString id,QString fromjid,QString body); 77 | void download(); 78 | void push(); 79 | void pull(); 80 | void filepush(); 81 | void slotQAction(); 82 | void slotQActionfile(); 83 | void slotQActionopenfile(); 84 | void slotQActionopendir(); 85 | void slotaddfriend(); 86 | void slotpushfinished(); 87 | void slotfiledownloadfinished(); 88 | void slotaddfile(); 89 | 90 | //// 91 | void upload(); 92 | public: 93 | void repostatus(); 94 | void set_remotepath(QString);// 95 | void set_path(QString);// 96 | void set_downloadflag(); 97 | void get_filename(QString); 98 | void chat_initwindow(QString); 99 | void setfilename(QString); 100 | void releasebutton(); 101 | QString getpath(); 102 | void timerEvent(QTimerEvent *event); 103 | void setcommitor(QString); 104 | void setcommit_msg(QString); 105 | int timer; 106 | bool commit; 107 | char commitor[256];// 108 | char commit_msg[256];// 109 | char file_name[256];// 110 | QString head; 111 | private slots: 112 | void on_version_list_customContextMenuRequested(const QPoint &pos); 113 | void on_file_list_customContextMenuRequested(const QPoint &pos); 114 | void on_listWidget_customContextMenuRequested(const QPoint &pos); 115 | void on_file_list_doubleClicked(const QModelIndex &index); 116 | 117 | signals: 118 | void addnewfreind(QString); 119 | 120 | private: 121 | Ui::RoomChat *ui; 122 | QString selfjid_; 123 | int chatType_; 124 | chats* chat; 125 | QStringList groupchatlist; 126 | QString key; 127 | QString version; 128 | QString fname_fversion; 129 | QString str_addFriend; 130 | QString addJID; 131 | bool version_reset; 132 | bool file_reset; 133 | static RoomChat* instance; 134 | char remote_url[256];// 135 | char path[256];// 136 | int flag_down;// 137 | QString chatspath; 138 | QString chatsremote; 139 | QList v_list;// 140 | QList f_list;// 141 | bool msgflag; 142 | bool flushflag; 143 | }; 144 | 145 | #endif // ROOMCHAT_H 146 | -------------------------------------------------------------------------------- /safe/safeping.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | #include "safeping.h" 7 | 8 | SafePing::SafePing(QObject *parent) : 9 | QObject(parent) 10 | { 11 | m_sock = new QTcpSocket(this); 12 | bool check = false; 13 | check = connect(m_sock,SIGNAL(connected()),this,SLOT(safe_connected())); 14 | 15 | 16 | } 17 | 18 | void SafePing::safe_connected() 19 | { 20 | qDebug()<<"Connected!"; 21 | } 22 | 23 | bool SafePing::ConnectToHost() 24 | { 25 | m_sock->connectToHost("127.0.0.1",5033); 26 | bool b = m_sock->waitForConnected(); 27 | return b; 28 | } 29 | 30 | QString SafePing::Ping(QString &jid, QString &pwd) 31 | { 32 | char buf[512] = ""; 33 | 34 | if (!m_sock ->isOpen()) 35 | return ""; 36 | sprintf(buf,"","Q-IM.exe"); 37 | qDebug()<<"ping:"<write(buf,strlen(buf)); 39 | m_sock->waitForBytesWritten(); 40 | memset(buf,0,512); 41 | m_sock->waitForReadyRead(); 42 | qi = m_sock->read(buf,512); 43 | qDebug()<<"pong:"< 5 | #include 6 | 7 | class SafePing : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit SafePing(QObject *parent = 0); 12 | 13 | QString Ping(QString &jid,QString &pwd); 14 | bool ConnectToHost(); 15 | void Close() { m_sock->close();} 16 | signals: 17 | 18 | 19 | public slots: 20 | 21 | void safe_connected(); 22 | public: 23 | QTcpSocket *m_sock; 24 | 25 | }; 26 | 27 | #endif // SAFEPING_H 28 | -------------------------------------------------------------------------------- /searchdlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/searchdlg.cpp -------------------------------------------------------------------------------- /searchdlg.h: -------------------------------------------------------------------------------- 1 | #ifndef SEARCHDLG_H 2 | #define SEARCHDLG_H 3 | 4 | #include 5 | #include 6 | 7 | class QStandardItemModel; 8 | 9 | namespace Ui { 10 | class SearchDlg; 11 | } 12 | 13 | class searchData 14 | { 15 | public: 16 | searchData() 17 | { 18 | name = QString(""); 19 | email = QString(""); 20 | usrname = QString(""); 21 | jid = QString(""); 22 | } 23 | QString name; 24 | QString email; 25 | QString usrname; 26 | QString jid; 27 | }; 28 | class SearchDlg : public QDialog 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | explicit SearchDlg(QWidget *parent = 0); 34 | ~SearchDlg(); 35 | 36 | QString createSearchIQ(QString search,QString srv); 37 | enum Type{AddContact,UserSearch}; 38 | void setType( int tp); 39 | int getType(){ 40 | return type_; 41 | } 42 | QString getJid(){ 43 | return addJid_; 44 | } 45 | void addFriend(); 46 | signals: 47 | void addnewfreind(QString); 48 | 49 | public slots: 50 | void btnSearchClick(); 51 | void addContactClick(); 52 | void handleSearch(QString s); 53 | void treeClick(QModelIndex index); 54 | //void slotchangeID(); 55 | //void slotchangeName(); 56 | private: 57 | 58 | Ui::SearchDlg *ui; 59 | QStandardItemModel *itemModel_; 60 | QString addJid_; 61 | int type_; 62 | // int flag_search; 63 | }; 64 | 65 | #endif // SEARCHDLG_H 66 | -------------------------------------------------------------------------------- /selectmucroom.cpp: -------------------------------------------------------------------------------- 1 | #include "selectmucroom.h" 2 | #include "mucroom.h" 3 | #include "ui_selectmucroom.h" 4 | #include "listwindow.h" 5 | #include 6 | 7 | SelectMucroom::SelectMucroom(QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::SelectMucroom) 10 | { 11 | ui->setupUi(this); 12 | Qt::WindowFlags flags=Qt::Dialog; 13 | flags |=Qt::WindowMinimizeButtonHint |Qt::WindowMaximizeButtonHint; 14 | setWindowFlags(flags); 15 | bool check = connect(ui->Btt_confirm, SIGNAL(clicked()), this, SLOT(confirmClick())); 16 | Q_ASSERT(check); 17 | } 18 | 19 | SelectMucroom::~SelectMucroom() 20 | { 21 | delete ui; 22 | } 23 | 24 | 25 | void SelectMucroom::confirmClick() 26 | { 27 | roomJID = ui->text_roomname->text(); 28 | //qDebug() << objectJID + "" + objectname; 29 | QXmppMucRoom* room = NULL; 30 | room = Listwindow::getMucmanager()->addRoom(roomJID); 31 | if(!room) 32 | { 33 | return; 34 | } 35 | else{ 36 | if(objectJID == Listwindow::Instance()->getselfJID()) 37 | { 38 | Mucroom* me = new Mucroom(0); 39 | me->setparticipantNickname(objectJID); 40 | me->joinroom(roomJID); 41 | me->show(); 42 | } 43 | else 44 | { 45 | bool check = room->sendInvitation(objectJID, "Pls add Chatroom" + roomJID); 46 | if(!check) 47 | { 48 | QMessageBox::information(this, "Error", "Invatation Failure, Pls Try Again!"); 49 | } 50 | else 51 | { 52 | qDebug() << "Invitation Success!"; 53 | } 54 | } 55 | this->close(); 56 | } 57 | } 58 | 59 | void SelectMucroom::tranobjectJID(QString JID) 60 | { 61 | objectJID = JID; 62 | } 63 | 64 | void SelectMucroom::tranobjectname(QString name) 65 | { 66 | objectname = name; 67 | } 68 | -------------------------------------------------------------------------------- /selectmucroom.h: -------------------------------------------------------------------------------- 1 | #ifndef SELECTMUCROOM_H 2 | #define SELECTMUCROOM_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class SelectMucroom; 8 | } 9 | 10 | class SelectMucroom : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit SelectMucroom(QWidget *parent = 0); 16 | ~SelectMucroom(); 17 | void tranobjectJID(QString); 18 | void tranobjectname(QString); 19 | public slots: 20 | void confirmClick(); 21 | 22 | private: 23 | Ui::SelectMucroom *ui; 24 | QString objectJID; 25 | QString objectname; 26 | QString roomJID; 27 | }; 28 | 29 | #endif // SELECTMUCROOM_H 30 | 31 | -------------------------------------------------------------------------------- /selectmucroom.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SelectMucroom 4 | 5 | 6 | 7 | 0 8 | 0 9 | 223 10 | 81 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255)); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | font: 75 14pt "方正姚体"; 26 | background:transparent; 27 | 28 | 29 | 请输入聊天室JID: 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | background-color: rgb(255, 255, 255); 39 | 40 | 41 | 42 | 43 | 44 | 45 | font: 75 10pt "方正姚体"; 46 | 47 | 48 | 确定 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /sendfiles.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/sendfiles.cpp -------------------------------------------------------------------------------- /sendfiles.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/sendfiles.h -------------------------------------------------------------------------------- /sendfiles.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SendFiles 4 | 5 | 6 | 7 | 0 8 | 0 9 | 238 10 | 85 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255)); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | background-color: rgb(255, 255, 255); 28 | 29 | 30 | 31 | 32 | 33 | 34 | 选择文件 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 发送 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /session.cpp: -------------------------------------------------------------------------------- 1 | #include "session.h" 2 | #include 3 | 4 | Session::Session(QObject *parent) : 5 | QObject(parent) 6 | { 7 | } 8 | 9 | Session* Session::m_instance = NULL; 10 | 11 | Session* Session::Instance() 12 | { 13 | if (m_instance == NULL) 14 | m_instance = new Session(); 15 | return m_instance; 16 | } 17 | 18 | Session::~Session() 19 | { 20 | if (m_instance) 21 | delete m_instance; 22 | m_instance = NULL; 23 | } 24 | 25 | QString Session::getURL() 26 | { 27 | QSettings set("http.ini",QSettings::IniFormat); 28 | QString url = set.value("base_url","").toString(); 29 | return url; 30 | } 31 | -------------------------------------------------------------------------------- /session.h: -------------------------------------------------------------------------------- 1 | #ifndef SESSION_H 2 | #define SESSION_H 3 | 4 | #include 5 | #include 6 | 7 | #define HTTP_URL QString("http://61.185.224.60:8000") 8 | 9 | class Session : public QObject 10 | { 11 | Q_OBJECT 12 | public: 13 | ~Session(); 14 | 15 | 16 | public: 17 | static Session* Instance(); 18 | 19 | void setFileIp(QString ip) 20 | { 21 | fileIp_ = ip; 22 | } 23 | QString getFileIp() 24 | { 25 | return fileIp_; 26 | } 27 | void setFilePort(int port) 28 | { 29 | filePort_ = port; 30 | } 31 | int getFilePort() 32 | { 33 | return filePort_; 34 | } 35 | 36 | void setHostName(QString name) 37 | { 38 | hostname_ = name; 39 | } 40 | QString getHostName() 41 | { 42 | return hostname_; 43 | } 44 | 45 | void setHostIp(QString ip) 46 | { 47 | hostip_ = ip; 48 | } 49 | QString getHostIp() 50 | { 51 | return hostip_; 52 | } 53 | 54 | void setHostPort( int port ) 55 | { 56 | hostport_ = port; 57 | } 58 | int getHostPort() 59 | { 60 | return hostport_; 61 | } 62 | 63 | void setJID(QString jid) 64 | { 65 | jid_ = jid; 66 | } 67 | QString getJID() 68 | { 69 | return jid_; 70 | } 71 | void setDCode(QString app,QString code) 72 | { 73 | dcodes_[app] = code; 74 | } 75 | QString getCode(QString app) 76 | { 77 | return dcodes_[app]; 78 | } 79 | 80 | QString getURL(); 81 | 82 | signals: 83 | 84 | public slots: 85 | 86 | private: 87 | explicit Session(QObject *parent = 0); 88 | 89 | static Session * m_instance; 90 | QString hostname_; 91 | QString hostip_; 92 | int hostport_; 93 | QString jid_; 94 | QString fileIp_; 95 | int filePort_; 96 | QHash dcodes_; 97 | }; 98 | 99 | #endif // SESSION_H 100 | -------------------------------------------------------------------------------- /set_dirpath.cpp: -------------------------------------------------------------------------------- 1 | #include "set_dirpath.h" 2 | #include "ui_set_dirpath.h" 3 | #include 4 | #include 5 | #include 6 | #define LOCAL(x) QString::fromLocal8Bit(x) 7 | Set_dirpath::Set_dirpath(QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::Set_dirpath) 10 | { 11 | ui->setupUi(this); 12 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GBK")); 13 | setWindowTitle(LOCAL("设置路径")); 14 | connect(ui->Bt_select,SIGNAL(clicked()),this,SLOT(slot_select())); 15 | connect(ui->Bt_ok, SIGNAL(clicked()), this, SLOT(slot_setpath())); 16 | connect(ui->Bt_cancel, SIGNAL(clicked()), this, SLOT(slot_close())); 17 | } 18 | 19 | Set_dirpath::~Set_dirpath() 20 | { 21 | delete ui; 22 | } 23 | 24 | void Set_dirpath::slot_setpath() 25 | { 26 | RoomChat::GetInstance()->set_path(ui->lineEdit->text()); 27 | RoomChat::GetInstance()->set_remotepath(ui->comboBox->currentText()); 28 | RoomChat::GetInstance()->set_downloadflag(); 29 | this->hide(); 30 | } 31 | void Set_dirpath::slot_close() 32 | { 33 | this->close(); 34 | } 35 | void Set_dirpath::slot_select() 36 | { 37 | QFileDialog* openFilePath = new QFileDialog( this, LOCAL("请选择文件夹"), LOCAL("file")); //打开一个目录选择对话框 38 | openFilePath->setFileMode(QFileDialog::DirectoryOnly); 39 | if ( openFilePath->exec() == QDialog::Accepted) 40 | { 41 | QString path = openFilePath->selectedFiles()[0]; 42 | path += '/'; 43 | 44 | ui->lineEdit->setText(path); 45 | } 46 | delete openFilePath; 47 | } 48 | -------------------------------------------------------------------------------- /set_dirpath.h: -------------------------------------------------------------------------------- 1 | #ifndef SET_DIRPATH_H 2 | #define SET_DIRPATH_H 3 | 4 | #include 5 | #include "roomchat.h" 6 | namespace Ui { 7 | class Set_dirpath; 8 | } 9 | 10 | class Set_dirpath : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Set_dirpath(QWidget *parent = 0); 16 | ~Set_dirpath(); 17 | public slots: 18 | void slot_select(); 19 | void slot_setpath(); 20 | void slot_close(); 21 | 22 | private: 23 | QString path; 24 | Ui::Set_dirpath *ui; 25 | }; 26 | 27 | #endif // SET_DIRPATH_H 28 | -------------------------------------------------------------------------------- /set_dirpath.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Set_dirpath 4 | 5 | 6 | 7 | 0 8 | 0 9 | 332 10 | 72 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | Qt::Horizontal 21 | 22 | 23 | 24 | Qt::Vertical 25 | 26 | 27 | 28 | 29 | 30 | 31 | 本地路径 32 | 33 | 34 | 35 | 36 | 37 | 38 | D:/01/ 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 服务器URL 57 | 58 | 59 | 60 | 61 | 62 | 63 | true 64 | 65 | 66 | 67 | git://192.168.1.114/test 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 确认 81 | 82 | 83 | 84 | 85 | 86 | 87 | 取消 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /setdlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/setdlg.cpp -------------------------------------------------------------------------------- /setdlg.h: -------------------------------------------------------------------------------- 1 | #ifndef SETDLG_H 2 | #define SETDLG_H 3 | 4 | #include 5 | #define LOCAL(x) QString::fromLocal8Bit(x) 6 | namespace Ui { 7 | class SetDlg; 8 | } 9 | 10 | class SetDlg : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit SetDlg(QWidget *parent = 0); 16 | ~SetDlg(); 17 | QString getip(); 18 | QString getsvr(); 19 | QString getfshare(); 20 | QString getfserver(); 21 | static SetDlg *Instance(); 22 | 23 | public slots: 24 | void slotclose(); 25 | private: 26 | Ui::SetDlg *ui; 27 | static SetDlg* m_instance; 28 | }; 29 | 30 | #endif // SETDLG_H 31 | -------------------------------------------------------------------------------- /setdlg.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SetDlg 4 | 5 | 6 | 7 | 0 8 | 0 9 | 302 10 | 95 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255)); 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Qt::Horizontal 26 | 27 | 28 | 29 | 30 | 80 31 | 16777215 32 | 33 | 34 | 35 | 文件服务器 36 | 37 | 38 | 39 | 40 | git://192.168.1.114/test 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | Qt::Horizontal 49 | 50 | 51 | 52 | Qt::Vertical 53 | 54 | 55 | 56 | 57 | 58 | 59 | 服务器名称 60 | 61 | 62 | 63 | 64 | 65 | 66 | background-color: rgb(255, 255, 255); 67 | 68 | 69 | 70 | 71 | 72 | 服务器名称 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 60 85 | 16777215 86 | 87 | 88 | 89 | 服务器IP 90 | 91 | 92 | 93 | 94 | 95 | 96 | Qt::Horizontal 97 | 98 | 99 | 100 | 13 101 | 20 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 133 111 | 16777215 112 | 113 | 114 | 115 | background-color: rgb(255, 255, 255); 116 | 117 | 118 | 服务器IP 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 确认 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /setstate.cpp: -------------------------------------------------------------------------------- 1 | #include "setstate.h" 2 | #include "ui_setstate.h" 3 | #include "maindialog.h" 4 | 5 | setstate::setstate(QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::setstate) 8 | { 9 | ui->setupUi(this); 10 | setWindowTitle(QString::fromUtf8("提示")); 11 | connect(ui->bt_closecurrent,SIGNAL(clicked()),this,SLOT(slotclosecurrent())); 12 | connect(ui->bt_closeall,SIGNAL(clicked()),this,SLOT(slotcloseall())); 13 | } 14 | 15 | setstate::~setstate() 16 | { 17 | delete ui; 18 | } 19 | void setstate::slotclosecurrent() 20 | { 21 | MainDialog::getInstance()->setclosestate(1); 22 | this->close(); 23 | } 24 | void setstate::slotcloseall() 25 | { 26 | MainDialog::getInstance()->setclosestate(2); 27 | this->close(); 28 | } 29 | -------------------------------------------------------------------------------- /setstate.h: -------------------------------------------------------------------------------- 1 | #ifndef SETSTATE_H 2 | #define SETSTATE_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class setstate; 8 | } 9 | 10 | class setstate : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit setstate(QWidget *parent = 0); 16 | ~setstate(); 17 | 18 | public slots: 19 | void slotcloseall(); 20 | void slotclosecurrent(); 21 | 22 | private: 23 | Ui::setstate *ui; 24 | }; 25 | 26 | #endif // SETSTATE_H 27 | -------------------------------------------------------------------------------- /setstate.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | setstate 4 | 5 | 6 | 7 | 0 8 | 0 9 | 238 10 | 58 11 | 12 | 13 | 14 | Dialog 15 | 16 | 17 | 18 | 19 | 20 | Qt::Vertical 21 | 22 | 23 | 24 | 关闭所有会话窗口,还是仅关闭当前? 25 | 26 | 27 | 28 | 29 | Qt::Horizontal 30 | 31 | 32 | 33 | 关闭当前 34 | 35 | 36 | 37 | 38 | 关闭所有 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /skin/framelesswin.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "framelesswin.h" 10 | 11 | FramelessWin::FramelessWin(QWidget *parent) : 12 | QDialog(parent) 13 | { 14 | setWindowFlags(Qt::FramelessWindowHint); 15 | m_movePoint = QPoint(0,0); 16 | m_pressed = false; 17 | setAttribute(Qt::WA_TranslucentBackground); 18 | m_padding = 5; 19 | m_direct = UNKOWN; 20 | setMouseTracking(true); 21 | setCursor(Qt::ArrowCursor); 22 | } 23 | 24 | FramelessWin::~FramelessWin() 25 | { 26 | 27 | } 28 | 29 | void FramelessWin::GetMoveDirect(QPoint cursorPoint) 30 | { 31 | QRect rect = this->rect(); 32 | QPoint tl = mapToGlobal(rect.topLeft()); 33 | QPoint rb = mapToGlobal(rect.bottomRight()); 34 | int x = cursorPoint.x(); 35 | int y = cursorPoint.y(); 36 | //左上角 37 | if( x-m_padding <= tl.x() && x >= tl.x() && y - m_padding <= tl.y() && y >= tl.y()) 38 | { 39 | m_direct = FramelessWin::LEFTTOP; 40 | setCursor(Qt::SizeFDiagCursor); 41 | } 42 | //左下角 43 | else if (x - m_padding <= tl.x() && x > tl.x() && y - m_padding <= rb.y() && y >= rb.y()) 44 | { 45 | m_direct = LEFTDOWN; 46 | setCursor(Qt::SizeBDiagCursor); 47 | } 48 | //左边 49 | else if (x <= tl.x() + m_padding && x >= tl.x() - m_padding) 50 | { 51 | m_direct = LEFT; 52 | setCursor(Qt::SizeHorCursor); 53 | } 54 | //右上角 55 | else if (x <= rb.x() && x + m_padding >= rb.x() && y >= tl.y() && y - m_padding <= tl.y()) 56 | { 57 | m_direct = RIGHTTOP; 58 | setCursor(Qt::SizeBDiagCursor); 59 | } 60 | //右下角 61 | else if (x <= rb.x() && x + m_padding >= rb.x() && y <= rb.y() && y + m_padding >= rb.y()) 62 | { 63 | m_direct = RIGHTDOWN; 64 | setCursor(Qt::SizeFDiagCursor); 65 | } 66 | //右边 67 | else if (x <= rb.x() + m_padding && x + m_padding >= rb.x()) 68 | { 69 | 70 | m_direct = RIGHT; 71 | setCursor(Qt::SizeHorCursor); 72 | } 73 | //上 74 | else if (y > tl.y() && y < tl.y()+m_padding) 75 | { 76 | m_direct = UP; 77 | setCursor(Qt::SizeVerCursor); 78 | } 79 | else if (y <= rb.y() && y + m_padding >= rb.y()) 80 | { 81 | m_direct = DOWN; 82 | setCursor(Qt::SizeVerCursor); 83 | } 84 | else 85 | { 86 | m_direct = UNKOWN; 87 | setCursor(Qt::ArrowCursor); 88 | } 89 | } 90 | 91 | void FramelessWin::changeSize(QRect &move, QPoint pos) 92 | { 93 | QRect cur = rect(); 94 | QPoint tl = mapToGlobal(cur.topLeft()); 95 | QPoint rb = mapToGlobal(cur.bottomRight()); 96 | 97 | if (m_direct == LEFT) 98 | move.setX(pos.x()); 99 | else if (m_direct == RIGHT) 100 | move.setWidth(pos.x() - tl.x()); 101 | else if (m_direct == LEFTTOP){ 102 | move.setX(pos.x()); 103 | move.setY(pos.y()); 104 | } 105 | else if (m_direct == RIGHTTOP){ 106 | move.setWidth(pos.x() - tl.x()); 107 | move.setY(pos.y()); 108 | } 109 | else if (m_direct == LEFTDOWN){ 110 | move.setHeight(pos.y()- tl.y()); 111 | move.setX(pos.x());} 112 | else if (m_direct == RIGHTDOWN){ 113 | move.setWidth(pos.x()-tl.x()); 114 | move.setHeight(pos.y() - tl.y());} 115 | else if (m_direct == UP) 116 | move.setY(pos.y()); 117 | else if (m_direct == DOWN) 118 | move.setHeight(pos.y() - tl.y()); 119 | 120 | } 121 | void FramelessWin::mousePressEvent(QMouseEvent *evt) 122 | { 123 | if(evt->button() != Qt::LeftButton) 124 | { 125 | m_pressed = false; 126 | } 127 | else 128 | { 129 | m_pressed = true; 130 | m_movePoint = evt->globalPos()-pos(); 131 | } 132 | } 133 | void FramelessWin::mouseReleaseEvent(QMouseEvent *evt) 134 | { 135 | m_pressed = false; 136 | if (evt->button() != Qt::LeftButton) 137 | { 138 | m_pressed = true; 139 | }else 140 | { 141 | m_pressed = false; 142 | } 143 | } 144 | void FramelessWin::mouseMoveEvent(QMouseEvent *evt) 145 | { 146 | QPoint globalPos = evt->globalPos(); 147 | QRect rect = this->rect(); 148 | QPoint tl = mapToGlobal(rect.topLeft()); 149 | QPoint tb = mapToGlobal(rect.bottomRight()); 150 | QRect rmove(tl,tb); 151 | if ( m_pressed ) 152 | { 153 | if (m_direct == UNKOWN ) 154 | { 155 | move(evt->globalPos()-m_movePoint); 156 | } 157 | else 158 | { 159 | changeSize(rmove,globalPos); 160 | setGeometry(rmove); 161 | } 162 | } 163 | else 164 | { 165 | 166 | GetMoveDirect(globalPos); 167 | if ( m_direct == UNKOWN ) 168 | setCursor(Qt::ArrowCursor); 169 | } 170 | } 171 | void FramelessWin::paintEvent(QPaintEvent *evt) 172 | { 173 | /* 174 | 添加阴影效果 175 | :param args: 176 | :param kwargs: 177 | :return: 178 | */ 179 | QStyleOption opt; 180 | opt.init(this); 181 | QPainter painter(this); 182 | QStyle *style = this->style(); 183 | style->drawPrimitive(QStyle::PE_Widget,&opt,&painter,this); 184 | 185 | QPainterPath path; 186 | path.setFillRule(Qt::WindingFill); 187 | path.addRect(10,10,width()-20,height()-20); 188 | painter.setRenderHint(QPainter::Antialiasing,true); 189 | painter.fillPath(path,QBrush(Qt::white)); 190 | QColor color(0,0,0,50); 191 | int i = 0; 192 | //for i in xrange(10): 193 | for (i = 0 ; i < 10; i++) 194 | { 195 | QPainterPath path2; 196 | path2.setFillRule(Qt::WindingFill); 197 | path2.addRect(10-i,10-i,width()-(10-i)*2,height()-(10-i)*2); 198 | color.setAlpha(150 - sqrt((float)i)*50); 199 | painter.setPen(color); 200 | painter.drawPath(path2); 201 | } 202 | QPixmap back("./ui/skin.png"); 203 | i = 0; 204 | painter.drawPixmap(10-i,10-i,width()-(10-i)*2,height()-(10-i)*2,back); 205 | 206 | } 207 | -------------------------------------------------------------------------------- /skin/framelesswin.h: -------------------------------------------------------------------------------- 1 | #ifndef FRAMELESSWIN_H 2 | #define FRAMELESSWIN_H 3 | 4 | #include 5 | #include 6 | 7 | class FramelessWin : public QDialog 8 | { 9 | Q_OBJECT 10 | public: 11 | enum Direct { 12 | UP,DOWN,LEFT, 13 | RIGHT,LEFTTOP, 14 | LEFTDOWN,RIGHTTOP, 15 | RIGHTDOWN,UNKOWN 16 | }; 17 | explicit FramelessWin(QWidget *parent = 0); 18 | virtual ~FramelessWin(); 19 | 20 | //UI界面设计 21 | virtual void SetupUI() = 0; 22 | 23 | 24 | void GetMoveDirect(QPoint cursorPoint); 25 | void changeSize(QRect &move,QPoint pos); 26 | //重载事件 27 | void mousePressEvent(QMouseEvent *evt); 28 | void mouseReleaseEvent(QMouseEvent *evt); 29 | void mouseMoveEvent(QMouseEvent *evt); 30 | void paintEvent(QPaintEvent *evt); 31 | signals: 32 | 33 | public slots: 34 | private: 35 | int m_direct; 36 | int m_padding; 37 | bool m_pressed; 38 | QPoint m_movePoint; 39 | 40 | }; 41 | 42 | #endif // FRAMELESSWIN_H 43 | -------------------------------------------------------------------------------- /skin/iconbutton.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | #include "iconbutton.h" 15 | 16 | 17 | 18 | IconButton::IconButton(QWidget *parent,QString iconnormal,QString iconHigh,QString icondown) 19 | { 20 | QPixmap pix_0(iconnormal); 21 | QPixmap pix_1(iconHigh); 22 | QPixmap pix_2(icondown); 23 | 24 | m_icon_list.append(pix_0); 25 | m_icon_list.append(pix_1); 26 | m_icon_list.append(pix_2); 27 | 28 | if (!iconnormal.isEmpty()) 29 | { 30 | m_cur_icon = pix_0; 31 | setFixedSize(m_cur_icon.size()); 32 | } 33 | 34 | setAttribute(Qt::WA_TranslucentBackground); 35 | m_txt_lb = NULL; 36 | m_mode = COMMON; 37 | m_isDown = false; 38 | 39 | } 40 | 41 | //设置按钮文本 42 | void IconButton::SetButtonText(QString txt) 43 | { 44 | m_txt = txt; 45 | 46 | if ( m_txt_lb ) 47 | { 48 | m_txt_lb->setText(txt); 49 | } 50 | 51 | } 52 | 53 | //设置文本风格 54 | void IconButton::SetTextStyle(QString style) 55 | { 56 | m_txt_lb->setStyleSheet(style); 57 | } 58 | 59 | //添加文本标签 60 | void IconButton::AddTxtLabel() 61 | { 62 | m_txt_lb = new QLabel(this); 63 | m_txt_lb->setAlignment(Qt::AlignHCenter); 64 | m_txt_lb->setAttribute(Qt::WA_TranslucentBackground); 65 | QVBoxLayout *lay = new QVBoxLayout(this); 66 | lay->addWidget(m_txt_lb,0,Qt::AlignHCenter | Qt::AlignVCenter); 67 | this->setLayout(lay); 68 | } 69 | 70 | //设置按钮图标 71 | void IconButton::SetButtonIcon(QString iconpath) 72 | { 73 | if ( !iconpath.isEmpty()) 74 | m_cur_icon = QPixmap(iconpath); 75 | } 76 | 77 | //设置按钮状态 78 | void IconButton::SetStatus(int status) 79 | { 80 | if ( m_mode == DOWNUP ) 81 | return; 82 | m_status = status; 83 | switch(status) 84 | { 85 | case BUTTON_ENTER: 86 | { 87 | m_cur_icon = m_icon_list[1]; 88 | break; 89 | } 90 | case BUTTON_PRESSED: 91 | { 92 | m_cur_icon = m_icon_list[2]; 93 | break; 94 | } 95 | case BUTTON_LEAVE: 96 | { 97 | m_cur_icon = m_icon_list[0]; 98 | break; 99 | } 100 | } 101 | } 102 | 103 | void IconButton::enterEvent(QEvent *evt) 104 | { 105 | SetStatus(BUTTON_ENTER); 106 | } 107 | 108 | void IconButton::leaveEvent(QEvent *evt) 109 | { 110 | SetStatus(BUTTON_LEAVE); 111 | } 112 | 113 | void IconButton::paintEvent(QPaintEvent *evt) 114 | { 115 | QPainter painter(this); 116 | painter.drawPixmap(rect(),m_cur_icon); 117 | if ( NULL == m_txt_lb ) 118 | painter.drawText(QRectF(rect()),m_txt,QTextOption(Qt::AlignHCenter | Qt::AlignVCenter)); 119 | } 120 | 121 | void IconButton::setButtonDown() 122 | { 123 | m_cur_icon = m_icon_list[1]; 124 | update(); 125 | } 126 | 127 | void IconButton::setButtonDown(bool b) 128 | { 129 | if ( b ) 130 | { 131 | setButtonDown(); 132 | m_isDown = true; 133 | } 134 | else 135 | { 136 | m_isDown = false; 137 | setButtonUP(); 138 | } 139 | update(); 140 | } 141 | 142 | 143 | void IconButton::setButtonUP() 144 | { 145 | m_cur_icon = m_icon_list[0]; 146 | update(); 147 | } 148 | 149 | void IconButton::mousePressEvent(QMouseEvent *evt) 150 | { 151 | if ( evt->button() == Qt::LeftButton ) 152 | { 153 | SetStatus(BUTTON_PRESSED); 154 | emit clicked(); 155 | emit textClick( m_txt ); 156 | setButtonDown(m_isDown); 157 | 158 | m_isDown = !m_isDown; 159 | update(); 160 | } 161 | } 162 | void IconButton::mouseReleaseEvent(QMouseEvent *evt) 163 | { 164 | SetStatus(BUTTON_LEAVE); 165 | } 166 | -------------------------------------------------------------------------------- /skin/iconbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef ICONBUTTON_H 2 | #define ICONBUTTON_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | class QMouseEvent; 9 | class QEvent; 10 | class QPaintEvent; 11 | class QPixmap; 12 | class QLabel; 13 | 14 | 15 | class IconButton : public QPushButton 16 | { 17 | Q_OBJECT 18 | public: 19 | 20 | enum Status{ 21 | BUTTON_FIRST, 22 | BUTTON_SCALED, 23 | BUTTON_ENTER, 24 | BUTTON_LEAVE, 25 | BUTTON_PRESSED, 26 | BUTTON_DISABLE 27 | }; 28 | enum Mode{ COMMON,DOWNUP }; 29 | 30 | explicit IconButton(QWidget *parent = 0, 31 | QString iconnormal="",QString iconHigh="",QString icondown=""); 32 | 33 | void SetButtonText(QString txt); 34 | 35 | void setText( QString txt ) { SetButtonText(txt);} 36 | 37 | void SetMode( Mode mode ) { m_mode = mode;} 38 | 39 | void SetTextStyle(QString style); 40 | 41 | void SetButtonIcon(QString iconpath); 42 | 43 | void AddTxtLabel(); 44 | 45 | void SetStatus(int status); 46 | 47 | void enterEvent(QEvent *evt); 48 | 49 | void leaveEvent(QEvent *evt); 50 | 51 | void mousePressEvent(QMouseEvent *evt); 52 | 53 | void mouseReleaseEvent(QMouseEvent *evt); 54 | 55 | void paintEvent(QPaintEvent *evt); 56 | 57 | void setButtonDown(bool b); 58 | 59 | void setButtonDown(); 60 | void setButtonUP(); 61 | QString GetButtonText() { return m_txt;} 62 | 63 | 64 | QVector m_icon_list; 65 | QPixmap m_cur_icon; 66 | 67 | signals: 68 | void textClick(QString txt); 69 | 70 | public slots: 71 | 72 | private: 73 | 74 | 75 | QString m_txt; 76 | QLabel *m_txt_lb; 77 | int m_status; 78 | int m_mode; 79 | bool m_isDown; 80 | 81 | }; 82 | 83 | #endif // ICONBUTTON_H 84 | -------------------------------------------------------------------------------- /skin/loginwin.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "loginwin.h" 8 | #include "iconbutton.h" 9 | 10 | 11 | LoginWin::LoginWin(QWidget *parent) : 12 | ShadowDlg(parent) 13 | { 14 | this->resize(435,330); 15 | QWidget *Top = initTopSkin(); 16 | QVBoxLayout *mainLay = new QVBoxLayout(); 17 | mainLay->addWidget(Top); 18 | mainLay->addItem(initMiddle()); 19 | setLayout(mainLay); 20 | } 21 | 22 | 23 | QWidget* LoginWin::initTopSkin() 24 | { 25 | QWidget *topSkin = new QWidget(this); 26 | topSkin->setMinimumHeight(160); 27 | IconButton *setb = new IconButton(this,":/ui/btn_set_normal.png",":/ui/btn_set_hover.png",":/ui/btn_set_press.png"); 28 | //IconButton *minb = new IconButton(this,":/ui/btn_mini_normal.png",":/ui/btn_mini_highlight.png",":/ui/btn_mini_down.png"); 29 | IconButton *closeb = new IconButton(this,":/ui/btn_close_normal.png",":/ui/btn_close_highlight.png",":/ui/btn_close_down.png"); 30 | topSkin->setStyleSheet("border-image: url(:/ui/morning.jpg);"); 31 | 32 | QHBoxLayout *topLay = new QHBoxLayout(); 33 | topLay->setMargin(0); 34 | topLay->addStretch(); 35 | topLay->addWidget(setb,0,Qt::AlignRight | Qt::AlignTop); 36 | //topLay->addWidget(minb,0,Qt::AlignRight | Qt::AlignTop); 37 | topLay->addWidget(closeb,0,Qt::AlignRight | Qt::AlignTop); 38 | topSkin ->setLayout(topLay); 39 | 40 | connect(closeb,SIGNAL(clicked()),qApp,SLOT(quit())); 41 | //connect(minb,SIGNAL(clicked()),this,SLOT(showMinimized())); 42 | return topSkin; 43 | } 44 | 45 | QHBoxLayout* LoginWin::initMiddle() 46 | { 47 | QVBoxLayout *photoLay = new QVBoxLayout(); 48 | QLabel *lb_photo = new QLabel(this); 49 | QMovie *movie = new QMovie(":/ui/head.gif"); 50 | movie->setScaledSize(QSize(80,80)); 51 | lb_photo->setMovie(movie); 52 | movie->start(); 53 | photoLay->addWidget(lb_photo,0,Qt::AlignTop); 54 | photoLay->addStretch(); 55 | 56 | //用户名密码 57 | m_edit_user = new QLineEdit(this); 58 | m_edit_pwd = new QLineEdit(this); 59 | m_edit_user->setPlaceholderText("用户账号"); 60 | m_edit_pwd->setPlaceholderText("密码"); 61 | m_edit_pwd->setEchoMode(QLineEdit::Password); 62 | 63 | m_edit_user->setMinimumWidth(200); 64 | m_edit_user->setMaximumWidth(200); 65 | m_edit_pwd->setMinimumWidth(200); 66 | 67 | //提示标签 68 | QLabel *lb_regusr = new QLabel("注册用户"); 69 | lb_regusr->setStyleSheet("color: rgb(85, 85, 255);"); 70 | 71 | //找回密码 72 | QLabel *lb_findpwd = new QLabel("找回密码"); 73 | lb_findpwd->setStyleSheet("color: rgb(85, 85, 255);"); 74 | IconButton *okButton = new IconButton(this,":/ui/button_login_normal.png",":/ui/button_login_hover.png", 75 | ":/ui/button_login_down.png"); 76 | okButton->AddTxtLabel(); 77 | okButton->SetTextStyle("color: rgb(255, 255, 255);font: 75 9pt 'Aharoni';"); 78 | okButton->SetButtonText("登 录"); 79 | 80 | //用户账号输入 81 | QHBoxLayout *layUser = new QHBoxLayout(); 82 | layUser->setMargin(0); 83 | layUser->setSpacing(10); 84 | layUser->addWidget(m_edit_user,0,Qt::AlignLeft | Qt::AlignTop); 85 | //layUser->addWidget(lb_regusr); 86 | 87 | //用户密码输入 88 | QHBoxLayout *layPwd = new QHBoxLayout(); 89 | layPwd->setMargin(0); 90 | layPwd->setSpacing(10); 91 | layPwd->addWidget(m_edit_pwd,0,Qt::AlignLeft | Qt::AlignTop); 92 | //layPwd->addWidget(lb_findpwd); 93 | 94 | //合并用户名密码布局 95 | QVBoxLayout *inputLay = new QVBoxLayout(); 96 | inputLay->setSpacing(0); 97 | inputLay->addStretch(); 98 | inputLay->addItem(layUser); 99 | inputLay->addItem(layPwd); 100 | 101 | //复选框 102 | QCheckBox *remPwd = new QCheckBox("记住密码",this); 103 | QCheckBox *autoLogin = new QCheckBox("自动登录",this); 104 | QString style = "color: rgb(141, 141, 141);"; 105 | 106 | remPwd->setStyleSheet(style); 107 | autoLogin->setStyleSheet(style); 108 | 109 | QHBoxLayout *checkLay = new QHBoxLayout(); 110 | checkLay->setContentsMargins(0,10,0,0); 111 | checkLay->addWidget(remPwd); 112 | checkLay->addStretch(); 113 | checkLay->addWidget(autoLogin); 114 | checkLay->addStretch(); 115 | inputLay->addItem(checkLay); 116 | //添加按钮 117 | QHBoxLayout *btnLay = new QHBoxLayout(); 118 | btnLay->setContentsMargins(0,10,0,0); 119 | btnLay->addWidget(okButton,0,Qt::AlignLeft | Qt::AlignTop); 120 | okButton->setMinimumWidth(m_edit_user->width()); 121 | okButton->setMaximumWidth(m_edit_user->width()); 122 | 123 | //btnLay->addStretch(); 124 | inputLay->addItem(btnLay); 125 | 126 | //总布局 127 | QHBoxLayout *contentLay = new QHBoxLayout(); 128 | contentLay->setMargin(20); 129 | contentLay->setSpacing(20); 130 | contentLay->addItem(photoLay); 131 | contentLay->addItem(inputLay); 132 | return contentLay; 133 | } 134 | -------------------------------------------------------------------------------- /skin/loginwin.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGINWIN_H 2 | #define LOGINWIN_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | 9 | #include "shadowdlg.h" 10 | 11 | class LoginWin : public ShadowDlg 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit LoginWin(QWidget *parent = 0); 16 | 17 | private: 18 | QWidget *initTopSkin(); 19 | QHBoxLayout *initMiddle(); 20 | 21 | QLineEdit *m_edit_user; 22 | QLineEdit *m_edit_pwd; 23 | 24 | signals: 25 | 26 | public slots: 27 | 28 | }; 29 | 30 | #endif // LOGINWIN_H 31 | -------------------------------------------------------------------------------- /skin/shadowdlg.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | #include "shadowdlg.h" 9 | 10 | 11 | 12 | ShadowDlg::ShadowDlg(QWidget *parent) : 13 | QDialog(parent) 14 | { 15 | setWindowFlags(Qt::FramelessWindowHint); 16 | m_movePoint = QPoint(0,0); 17 | m_pressed = false; 18 | setAttribute(Qt::WA_TranslucentBackground); 19 | } 20 | 21 | //鼠标按下 22 | void ShadowDlg::mousePressEvent(QMouseEvent *event) 23 | { 24 | if ( event->button() == Qt::LeftButton ) 25 | { 26 | m_pressed = true; 27 | m_movePoint = event->globalPos()-pos(); 28 | } 29 | else 30 | { 31 | m_pressed = false; 32 | } 33 | } 34 | //鼠标移动 35 | void ShadowDlg::mouseMoveEvent(QMouseEvent *event) 36 | { 37 | if ( m_pressed) 38 | { 39 | move(event->globalPos() - m_movePoint); 40 | } 41 | } 42 | //鼠标释放 43 | void ShadowDlg::mouseReleaseEvent(QMouseEvent *event) 44 | { 45 | if ( event->button() == Qt::LeftButton ) 46 | { 47 | m_pressed = false; 48 | }else 49 | { 50 | m_pressed = true; 51 | } 52 | } 53 | //窗口重绘 54 | void ShadowDlg::paintEvent(QPaintEvent *event) 55 | { 56 | QStyleOption opt; 57 | opt.init(this); 58 | QPainter painter(this); 59 | QStyle *style = this->style(); 60 | style->drawPrimitive(QStyle::PE_Widget,&opt,&painter,this); 61 | 62 | QPainterPath path; 63 | path.setFillRule(Qt::WindingFill); 64 | path.addRect(10,10,this->width()-20,this->height()-20); 65 | painter.fillPath(path,QBrush(Qt::white)); 66 | QColor color(0,0,0,50); 67 | for ( int i = 0; i< 10; ++i) 68 | { 69 | QPainterPath path2; 70 | path2.setFillRule(Qt::WindingFill); 71 | path2.addRect(10-i,10-i,this->width()-(10-i)*2,this->height()-(10-i)*2); 72 | color.setAlpha(150-sqrt((float)i)*50); 73 | painter.setPen(color); 74 | painter.drawPath(path2); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /skin/shadowdlg.h: -------------------------------------------------------------------------------- 1 | #ifndef SHADOWDLG_H 2 | #define SHADOWDLG_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class ShadowDlg : public QDialog 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit ShadowDlg(QWidget *parent = 0); 13 | 14 | //重载标准组件的鼠标事件 15 | void mousePressEvent(QMouseEvent *event); 16 | void mouseReleaseEvent(QMouseEvent *event); 17 | void mouseMoveEvent(QMouseEvent *event); 18 | void paintEvent(QPaintEvent *event); 19 | 20 | signals: 21 | 22 | public slots: 23 | 24 | private: 25 | QPoint m_movePoint; 26 | bool m_pressed; 27 | 28 | 29 | }; 30 | 31 | #endif // SHADOWDLG_H 32 | -------------------------------------------------------------------------------- /skin/tabbutton.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include 3 | 4 | #include "tabbutton.h" 5 | #include "skin/iconbutton.h" 6 | 7 | 8 | TabButton::TabButton(QWidget *parent) : 9 | QWidget(parent) 10 | { 11 | 12 | QHBoxLayout *mainlay = new QHBoxLayout(this); 13 | setMaximumHeight(40); 14 | QWidget *center = new QWidget(this); 15 | QHBoxLayout *centerlay = new QHBoxLayout(center); 16 | centerlay->setSpacing(0); 17 | centerlay->setContentsMargins(0,0,0,0); 18 | 19 | m_closebtn = new IconButton(this,":/ui/close_nofocus.png",":/ui/close_high2.png",":/ui/close_normal2.png"); 20 | //new IconButton(this,":/ui/btn_close_normal.png",":/ui/btn_close_highlight.png",":/ui/btn_close_down.png"); 21 | 22 | m_btn = new IconButton(this,":/ui/switch.png",":/ui/switch-high.png",":/ui/switch-down.png"); 23 | 24 | m_btn->SetMode( IconButton::DOWNUP); 25 | centerlay->addWidget(m_btn); 26 | centerlay->addWidget(m_closebtn); 27 | center->setLayout(centerlay); 28 | 29 | mainlay->setContentsMargins(0,0,0,0); 30 | mainlay->addWidget(center); 31 | setAttribute(Qt::WA_TranslucentBackground); 32 | connect(m_btn,SIGNAL(textClick(QString)),this,SLOT(tabButtonClick_slot(QString))); 33 | connect(m_closebtn,SIGNAL(clicked()),this,SLOT(tabCloseClick())); 34 | //m_closebtn->setVisible(false); 35 | } 36 | 37 | void TabButton::tabButtonClick_slot(QString txt) 38 | { 39 | emit tabButtonClick_sig(txt); 40 | } 41 | 42 | void TabButton::setButtonDown(bool b) 43 | { 44 | 45 | m_btn->setButtonDown(b); 46 | if ( b ) 47 | { 48 | SetFocus(); 49 | }else 50 | { 51 | NoFocus(); 52 | } 53 | update(); 54 | } 55 | 56 | void TabButton::enterEvent(QEvent *evt) 57 | { 58 | m_closebtn->SetStatus(IconButton::BUTTON_ENTER); 59 | update(); 60 | 61 | } 62 | 63 | void TabButton::leaveEvent(QEvent *evt) 64 | { 65 | //m_closebtn->setVisible(false); 66 | m_closebtn->SetStatus(IconButton::BUTTON_LEAVE); 67 | update(); 68 | } 69 | 70 | void TabButton::SetCloseIcon(QString icon) 71 | { 72 | m_closebtn->SetButtonIcon(icon); 73 | } 74 | 75 | void TabButton::SetFocus() 76 | { 77 | m_closebtn->m_icon_list[0] = QPixmap(":/ui/close_nofocushigh.png"); 78 | m_closebtn->m_icon_list[1] = QPixmap(":/ui/close_focus.png"); 79 | m_closebtn->SetStatus(IconButton::BUTTON_LEAVE); 80 | m_closebtn->update(); 81 | } 82 | void TabButton::NoFocus() 83 | { 84 | m_closebtn->m_icon_list[0] = QPixmap(":/ui/close_nofocus.png"); 85 | m_closebtn->m_icon_list[1] = QPixmap(":/ui/close_high2.png"); 86 | m_closebtn->SetStatus(IconButton::BUTTON_LEAVE); 87 | m_closebtn->update(); 88 | } 89 | 90 | void TabButton::tabCloseClick() 91 | { 92 | emit tabCloseClick_sig(m_btn->GetButtonText()); 93 | } 94 | 95 | void TabButton::SetButtonText(QString txt) 96 | { 97 | 98 | m_btn->SetButtonText(txt); 99 | } 100 | -------------------------------------------------------------------------------- /skin/tabbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef TABBUTTON_H 2 | #define TABBUTTON_H 3 | 4 | #include 5 | 6 | 7 | class IconButton; 8 | 9 | class TabButton : public QWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit TabButton(QWidget *parent = 0); 14 | 15 | void SetButtonText( QString txt ); 16 | 17 | 18 | void setButtonDown(bool b); 19 | 20 | void enterEvent(QEvent *evt); 21 | void leaveEvent(QEvent *evt); 22 | 23 | void SetCloseIcon( QString icon ); 24 | void NoFocus(); 25 | void SetFocus(); 26 | 27 | signals: 28 | void tabButtonClick_sig(QString); 29 | void tabCloseClick_sig(QString); 30 | 31 | 32 | public slots: 33 | void tabButtonClick_slot(QString); 34 | void tabCloseClick(); 35 | 36 | private: 37 | IconButton *m_btn; 38 | IconButton *m_closebtn; 39 | 40 | }; 41 | 42 | #endif // TABBUTTON_H 43 | -------------------------------------------------------------------------------- /style.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 21 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /techsupportdlg.cpp: -------------------------------------------------------------------------------- 1 | #include "techsupportdlg.h" 2 | #include "ui_techsupportdlg.h" 3 | #include "chatwindow2.h" 4 | #include "dlgcontainter.h" 5 | #include "listwindow.h" 6 | #include 7 | #include 8 | #include 9 | 10 | TechSupportDlg::TechSupportDlg(QWidget *parent) : 11 | QDialog(parent), 12 | ui(new Ui::TechSupportDlg) 13 | { 14 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("GBK")); 15 | ui->setupUi(this); 16 | 17 | // mainw = Listwindow::Instance(); 18 | } 19 | 20 | TechSupportDlg::~TechSupportDlg() 21 | { 22 | delete ui; 23 | } 24 | void TechSupportDlg::setDlgContainer(DlgContainter *cont) 25 | { 26 | dlgcontainer_ = cont; 27 | connect(dlgcontainer_,SIGNAL(tabClosed(QString)),this,SLOT(tabClosed(QString))); 28 | /* 29 | dlgcontainer_->getTabWidget()->clear(); 30 | dlgcontainer_->getTabWidget()->addTab(this,LOCAL("支持人员列表")); 31 | dlgcontainer_->getTabWidget()->addTab(single_,LOCAL("用户交流区")); 32 | dlgcontainer_->getTabWidget()->setCurrentWidget(this); 33 | dlgcontainer_->setMaximumSize(280,450); 34 | */ 35 | } 36 | 37 | void TechSupportDlg::closeEvent(QCloseEvent *event) 38 | { 39 | event->ignore(); 40 | hide(); 41 | } 42 | void TechSupportDlg::contextMenuEvent(QContextMenuEvent *e) 43 | { 44 | QMenu *menu = new QMenu(this); 45 | QAction *act_send = new QAction(this); 46 | QIcon icon(":/UI/upload.png"); 47 | bool bcheck; 48 | // bcheck = connect(act_send,SIGNAL(triggered()),this,SLOT(slotSendFile())); 49 | // Q_ASSERT(bcheck); 50 | 51 | 52 | } 53 | /*void TechSupportDlg::slotSendFile() 54 | { 55 | QModelIndex index = ui->treeView->currentIndex(); 56 | QString tonick = index.data().toString(); 57 | QString tojid = MainWindow::getJidFromNick(tonick); 58 | QString sfile = QFileDialog::getOpenFileName(this); 59 | QUtil::Instance()->sendFile(sfile,tojid+"/FT"); 60 | 61 | }*/ 62 | 63 | void TechSupportDlg::addChatWindow(QString jid,QString body) 64 | { 65 | ChatWindow2 *wd =NULL; 66 | if ( winmap_.empty() || winmap_.find(jid) == winmap_.end()) 67 | { 68 | chatList_.append(jid); 69 | wd = new ChatWindow2(mainw); 70 | winmap_.insert(jid,wd); 71 | 72 | wd->setWindowTitle(jid); 73 | wd->setChatJid(jid); 74 | wd->setChatType(ChatWindow2::CommonChat); 75 | wd->addMessage(jid,body); 76 | connect(wd,SIGNAL(sendMsg(QString,QString)),mainw,SLOT(sendMsg(QString,QString))); 77 | connect(mainw,SIGNAL(recvMsg(QString,QString)),wd,SLOT(handleMessage(QString,QString))); 78 | } 79 | wd = winmap_[jid]; 80 | dlgcontainer_->getTabWidget()->setCurrentWidget(wd); 81 | 82 | } 83 | void TechSupportDlg::tabClosed(QString str) 84 | { 85 | //winmap_.erase(winmap_.find(str.toStdString())); 86 | QString jid ;//= MainWindow::getJidFromNick(str); 87 | chatList_.removeOne(jid); 88 | } 89 | 90 | void TechSupportDlg::listDoubleClicked(QModelIndex index) 91 | { 92 | 93 | } 94 | /*QStringList TechSupportDlg::getTechList() 95 | { 96 | QStringList list; 97 | QString str; 98 | QFile conffile("config/techsupport.conf"); 99 | if (!conffile.exists()){ 100 | return list; 101 | } 102 | conffile.open(QIODevice::ReadOnly); 103 | while (!conffile.atEnd()){ 104 | str = LOCAL(conffile.readLine().data()); 105 | str = str.trimmed(); 106 | if ( str.isEmpty() || str.at(0) == '#') 107 | continue; 108 | list.append(str.trimmed()); 109 | } 110 | conffile.close(); 111 | return list; 112 | }*/ 113 | void TechSupportDlg::resetChatWindow() 114 | { 115 | // getSingleWindow()->clearTabs(); 116 | } 117 | -------------------------------------------------------------------------------- /ui/Icon_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_call.png -------------------------------------------------------------------------------- /ui/Icon_call_high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_call_high.png -------------------------------------------------------------------------------- /ui/Icon_call_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_call_stop.png -------------------------------------------------------------------------------- /ui/Icon_call_stop_high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_call_stop_high.png -------------------------------------------------------------------------------- /ui/Icon_find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_find.png -------------------------------------------------------------------------------- /ui/Icon_find_high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_find_high.png -------------------------------------------------------------------------------- /ui/Icon_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_send.png -------------------------------------------------------------------------------- /ui/Icon_send_high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Icon_send_high.png -------------------------------------------------------------------------------- /ui/Qme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Qme.png -------------------------------------------------------------------------------- /ui/Tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/Tools.png -------------------------------------------------------------------------------- /ui/away.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/away.png -------------------------------------------------------------------------------- /ui/btn_close_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_close_down.png -------------------------------------------------------------------------------- /ui/btn_close_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_close_highlight.png -------------------------------------------------------------------------------- /ui/btn_close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_close_normal.png -------------------------------------------------------------------------------- /ui/btn_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_down.png -------------------------------------------------------------------------------- /ui/btn_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_highlight.png -------------------------------------------------------------------------------- /ui/btn_mini_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_mini_down.png -------------------------------------------------------------------------------- /ui/btn_mini_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_mini_highlight.png -------------------------------------------------------------------------------- /ui/btn_mini_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_mini_normal.png -------------------------------------------------------------------------------- /ui/btn_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_normal.png -------------------------------------------------------------------------------- /ui/btn_set_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_set_hover.png -------------------------------------------------------------------------------- /ui/btn_set_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_set_normal.png -------------------------------------------------------------------------------- /ui/btn_set_press.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/btn_set_press.png -------------------------------------------------------------------------------- /ui/busy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/busy.png -------------------------------------------------------------------------------- /ui/button_login_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/button_login_down.png -------------------------------------------------------------------------------- /ui/button_login_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/button_login_hover.png -------------------------------------------------------------------------------- /ui/button_login_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/button_login_normal.png -------------------------------------------------------------------------------- /ui/checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_checked.png -------------------------------------------------------------------------------- /ui/checkbox_checked_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_checked_disable.png -------------------------------------------------------------------------------- /ui/checkbox_checked_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_checked_hover.png -------------------------------------------------------------------------------- /ui/checkbox_half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_half.png -------------------------------------------------------------------------------- /ui/checkbox_half_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_half_disabled.png -------------------------------------------------------------------------------- /ui/checkbox_half_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_half_hover.png -------------------------------------------------------------------------------- /ui/checkbox_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_unchecked.png -------------------------------------------------------------------------------- /ui/checkbox_unchecked_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_unchecked_disabled.png -------------------------------------------------------------------------------- /ui/checkbox_unchecked_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/checkbox_unchecked_hover.png -------------------------------------------------------------------------------- /ui/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close.png -------------------------------------------------------------------------------- /ui/close2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close2.png -------------------------------------------------------------------------------- /ui/close_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_down.png -------------------------------------------------------------------------------- /ui/close_focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_focus.png -------------------------------------------------------------------------------- /ui/close_high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_high.png -------------------------------------------------------------------------------- /ui/close_high2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_high2.png -------------------------------------------------------------------------------- /ui/close_nofocus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_nofocus.png -------------------------------------------------------------------------------- /ui/close_nofocushigh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_nofocushigh.png -------------------------------------------------------------------------------- /ui/close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_normal.png -------------------------------------------------------------------------------- /ui/close_normal2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/close_normal2.png -------------------------------------------------------------------------------- /ui/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/demo.png -------------------------------------------------------------------------------- /ui/group-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/group-18.png -------------------------------------------------------------------------------- /ui/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/group.png -------------------------------------------------------------------------------- /ui/head.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/head.gif -------------------------------------------------------------------------------- /ui/imoffline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/imoffline.png -------------------------------------------------------------------------------- /ui/imonline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/imonline.png -------------------------------------------------------------------------------- /ui/invisible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/invisible.png -------------------------------------------------------------------------------- /ui/keyboard_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/keyboard_down.png -------------------------------------------------------------------------------- /ui/keyboard_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/keyboard_hover.png -------------------------------------------------------------------------------- /ui/keyboard_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/keyboard_normal.png -------------------------------------------------------------------------------- /ui/login_head_bkg_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/login_head_bkg_highlight.png -------------------------------------------------------------------------------- /ui/login_head_bkg_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/login_head_bkg_normal.png -------------------------------------------------------------------------------- /ui/login_inputbtn_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/login_inputbtn_down.png -------------------------------------------------------------------------------- /ui/login_inputbtn_highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/login_inputbtn_highlight.png -------------------------------------------------------------------------------- /ui/login_inputbtn_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/login_inputbtn_normal.png -------------------------------------------------------------------------------- /ui/loginning_head_animation1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/loginning_head_animation1.png -------------------------------------------------------------------------------- /ui/loginning_head_animation2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/loginning_head_animation2.png -------------------------------------------------------------------------------- /ui/loginning_head_animation3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/loginning_head_animation3.png -------------------------------------------------------------------------------- /ui/loginning_head_animation4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/loginning_head_animation4.png -------------------------------------------------------------------------------- /ui/loginning_head_animation5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/loginning_head_animation5.png -------------------------------------------------------------------------------- /ui/logo-QQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/logo-QQ.png -------------------------------------------------------------------------------- /ui/logo-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/logo-main.png -------------------------------------------------------------------------------- /ui/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/logo.png -------------------------------------------------------------------------------- /ui/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/man.png -------------------------------------------------------------------------------- /ui/morning.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/morning.jpg -------------------------------------------------------------------------------- /ui/msg_icon_check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/msg_icon_check.png -------------------------------------------------------------------------------- /ui/msg_icon_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/msg_icon_error.png -------------------------------------------------------------------------------- /ui/msg_icon_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/msg_icon_info.png -------------------------------------------------------------------------------- /ui/msg_icon_question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/msg_icon_question.png -------------------------------------------------------------------------------- /ui/msg_icon_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/msg_icon_warning.png -------------------------------------------------------------------------------- /ui/mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/mute.png -------------------------------------------------------------------------------- /ui/navbutton_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/navbutton_down.png -------------------------------------------------------------------------------- /ui/navbutton_high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/navbutton_high.png -------------------------------------------------------------------------------- /ui/navbutton_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/navbutton_normal.png -------------------------------------------------------------------------------- /ui/night.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/night.jpg -------------------------------------------------------------------------------- /ui/noon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/noon.jpg -------------------------------------------------------------------------------- /ui/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/qq.png -------------------------------------------------------------------------------- /ui/room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/room.png -------------------------------------------------------------------------------- /ui/skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/skin.png -------------------------------------------------------------------------------- /ui/switch-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/switch-down.png -------------------------------------------------------------------------------- /ui/switch-high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/switch-high.png -------------------------------------------------------------------------------- /ui/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/switch.png -------------------------------------------------------------------------------- /ui/sys_button_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/sys_button_close.png -------------------------------------------------------------------------------- /ui/sys_button_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/sys_button_min.png -------------------------------------------------------------------------------- /ui/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/tip.png -------------------------------------------------------------------------------- /ui/tools_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/tools_down.png -------------------------------------------------------------------------------- /ui/tools_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/tools_hover.png -------------------------------------------------------------------------------- /ui/women.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/ui/women.png -------------------------------------------------------------------------------- /ui_addfiles.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'addfiles.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_ADDFILES_H 10 | #define UI_ADDFILES_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | QT_BEGIN_NAMESPACE 24 | 25 | class Ui_addfiles 26 | { 27 | public: 28 | QGridLayout *gridLayout_2; 29 | QGridLayout *gridLayout; 30 | QHBoxLayout *horizontalLayout; 31 | QLineEdit *line_path; 32 | QPushButton *bt_select; 33 | QPushButton *bt_cofirm; 34 | 35 | void setupUi(QDialog *addfiles) 36 | { 37 | if (addfiles->objectName().isEmpty()) 38 | addfiles->setObjectName(QString::fromUtf8("addfiles")); 39 | addfiles->resize(254, 81); 40 | gridLayout_2 = new QGridLayout(addfiles); 41 | gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); 42 | gridLayout = new QGridLayout(); 43 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 44 | horizontalLayout = new QHBoxLayout(); 45 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 46 | line_path = new QLineEdit(addfiles); 47 | line_path->setObjectName(QString::fromUtf8("line_path")); 48 | 49 | horizontalLayout->addWidget(line_path); 50 | 51 | bt_select = new QPushButton(addfiles); 52 | bt_select->setObjectName(QString::fromUtf8("bt_select")); 53 | 54 | horizontalLayout->addWidget(bt_select); 55 | 56 | 57 | gridLayout->addLayout(horizontalLayout, 0, 0, 1, 1); 58 | 59 | bt_cofirm = new QPushButton(addfiles); 60 | bt_cofirm->setObjectName(QString::fromUtf8("bt_cofirm")); 61 | 62 | gridLayout->addWidget(bt_cofirm, 1, 0, 1, 1); 63 | 64 | 65 | gridLayout_2->addLayout(gridLayout, 0, 0, 1, 1); 66 | 67 | 68 | retranslateUi(addfiles); 69 | 70 | QMetaObject::connectSlotsByName(addfiles); 71 | } // setupUi 72 | 73 | void retranslateUi(QDialog *addfiles) 74 | { 75 | addfiles->setWindowTitle(QApplication::translate("addfiles", "Dialog", 0, QApplication::UnicodeUTF8)); 76 | bt_select->setText(QApplication::translate("addfiles", "\351\200\211\346\213\251\346\226\207\344\273\266\345\244\271", 0, QApplication::UnicodeUTF8)); 77 | bt_cofirm->setText(QApplication::translate("addfiles", "\347\241\256\350\256\244", 0, QApplication::UnicodeUTF8)); 78 | } // retranslateUi 79 | 80 | }; 81 | 82 | namespace Ui { 83 | class addfiles: public Ui_addfiles {}; 84 | } // namespace Ui 85 | 86 | QT_END_NAMESPACE 87 | 88 | #endif // UI_ADDFILES_H 89 | -------------------------------------------------------------------------------- /ui_chats.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'chats.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_CHATS_H 10 | #define UI_CHATS_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | QT_BEGIN_NAMESPACE 22 | 23 | class Ui_chats 24 | { 25 | public: 26 | QGridLayout *gridLayout; 27 | QTextEdit *textEdit; 28 | 29 | void setupUi(QDialog *chats) 30 | { 31 | if (chats->objectName().isEmpty()) 32 | chats->setObjectName(QString::fromUtf8("chats")); 33 | chats->resize(401, 348); 34 | gridLayout = new QGridLayout(chats); 35 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 36 | textEdit = new QTextEdit(chats); 37 | textEdit->setObjectName(QString::fromUtf8("textEdit")); 38 | textEdit->setEnabled(true); 39 | 40 | gridLayout->addWidget(textEdit, 0, 0, 1, 1); 41 | 42 | 43 | retranslateUi(chats); 44 | 45 | QMetaObject::connectSlotsByName(chats); 46 | } // setupUi 47 | 48 | void retranslateUi(QDialog *chats) 49 | { 50 | chats->setWindowTitle(QApplication::translate("chats", "Dialog", 0, QApplication::UnicodeUTF8)); 51 | } // retranslateUi 52 | 53 | }; 54 | 55 | namespace Ui { 56 | class chats: public Ui_chats {}; 57 | } // namespace Ui 58 | 59 | QT_END_NAMESPACE 60 | 61 | #endif // UI_CHATS_H 62 | -------------------------------------------------------------------------------- /ui_commitdlg.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'commitdlg.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_COMMITDLG_H 10 | #define UI_COMMITDLG_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | QT_BEGIN_NAMESPACE 26 | 27 | class Ui_commitdlg 28 | { 29 | public: 30 | QGridLayout *gridLayout; 31 | QVBoxLayout *verticalLayout; 32 | QHBoxLayout *horizontalLayout; 33 | QLabel *label; 34 | QLineEdit *edit_commitor; 35 | QHBoxLayout *horizontalLayout_2; 36 | QLabel *label_2; 37 | QLineEdit *edit_msg; 38 | QHBoxLayout *horizontalLayout_3; 39 | QPushButton *bt_confirm; 40 | QPushButton *bt_cancle; 41 | 42 | void setupUi(QDialog *commitdlg) 43 | { 44 | if (commitdlg->objectName().isEmpty()) 45 | commitdlg->setObjectName(QString::fromUtf8("commitdlg")); 46 | commitdlg->resize(359, 119); 47 | gridLayout = new QGridLayout(commitdlg); 48 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 49 | verticalLayout = new QVBoxLayout(); 50 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 51 | horizontalLayout = new QHBoxLayout(); 52 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 53 | label = new QLabel(commitdlg); 54 | label->setObjectName(QString::fromUtf8("label")); 55 | 56 | horizontalLayout->addWidget(label); 57 | 58 | edit_commitor = new QLineEdit(commitdlg); 59 | edit_commitor->setObjectName(QString::fromUtf8("edit_commitor")); 60 | 61 | horizontalLayout->addWidget(edit_commitor); 62 | 63 | 64 | verticalLayout->addLayout(horizontalLayout); 65 | 66 | horizontalLayout_2 = new QHBoxLayout(); 67 | horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); 68 | label_2 = new QLabel(commitdlg); 69 | label_2->setObjectName(QString::fromUtf8("label_2")); 70 | 71 | horizontalLayout_2->addWidget(label_2); 72 | 73 | edit_msg = new QLineEdit(commitdlg); 74 | edit_msg->setObjectName(QString::fromUtf8("edit_msg")); 75 | 76 | horizontalLayout_2->addWidget(edit_msg); 77 | 78 | 79 | verticalLayout->addLayout(horizontalLayout_2); 80 | 81 | horizontalLayout_3 = new QHBoxLayout(); 82 | horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); 83 | bt_confirm = new QPushButton(commitdlg); 84 | bt_confirm->setObjectName(QString::fromUtf8("bt_confirm")); 85 | 86 | horizontalLayout_3->addWidget(bt_confirm); 87 | 88 | bt_cancle = new QPushButton(commitdlg); 89 | bt_cancle->setObjectName(QString::fromUtf8("bt_cancle")); 90 | 91 | horizontalLayout_3->addWidget(bt_cancle); 92 | 93 | 94 | verticalLayout->addLayout(horizontalLayout_3); 95 | 96 | 97 | gridLayout->addLayout(verticalLayout, 0, 0, 1, 1); 98 | 99 | 100 | retranslateUi(commitdlg); 101 | 102 | QMetaObject::connectSlotsByName(commitdlg); 103 | } // setupUi 104 | 105 | void retranslateUi(QDialog *commitdlg) 106 | { 107 | commitdlg->setWindowTitle(QApplication::translate("commitdlg", "Dialog", 0, QApplication::UnicodeUTF8)); 108 | label->setText(QApplication::translate("commitdlg", "\346\217\220\344\272\244\350\200\205 ", 0, QApplication::UnicodeUTF8)); 109 | label_2->setText(QApplication::translate("commitdlg", "\346\217\220\344\272\244\344\277\241\346\201\257", 0, QApplication::UnicodeUTF8)); 110 | bt_confirm->setText(QApplication::translate("commitdlg", "\347\241\256\350\256\244", 0, QApplication::UnicodeUTF8)); 111 | bt_cancle->setText(QApplication::translate("commitdlg", "\345\217\226\346\266\210", 0, QApplication::UnicodeUTF8)); 112 | } // retranslateUi 113 | 114 | }; 115 | 116 | namespace Ui { 117 | class commitdlg: public Ui_commitdlg {}; 118 | } // namespace Ui 119 | 120 | QT_END_NAMESPACE 121 | 122 | #endif // UI_COMMITDLG_H 123 | -------------------------------------------------------------------------------- /ui_findfriend.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'findfriend.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_FINDFRIEND_H 10 | #define UI_FINDFRIEND_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class Ui_FindFriend 27 | { 28 | public: 29 | QVBoxLayout *verticalLayout_2; 30 | QVBoxLayout *verticalLayout; 31 | QHBoxLayout *horizontalLayout; 32 | QLabel *label; 33 | QLineEdit *lineEdit; 34 | QPushButton *pushButton; 35 | 36 | void setupUi(QDialog *FindFriend) 37 | { 38 | if (FindFriend->objectName().isEmpty()) 39 | FindFriend->setObjectName(QString::fromUtf8("FindFriend")); 40 | FindFriend->resize(212, 76); 41 | FindFriend->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255));")); 42 | verticalLayout_2 = new QVBoxLayout(FindFriend); 43 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); 44 | verticalLayout = new QVBoxLayout(); 45 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 46 | horizontalLayout = new QHBoxLayout(); 47 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 48 | label = new QLabel(FindFriend); 49 | label->setObjectName(QString::fromUtf8("label")); 50 | label->setStyleSheet(QString::fromUtf8("background:transparent")); 51 | 52 | horizontalLayout->addWidget(label); 53 | 54 | lineEdit = new QLineEdit(FindFriend); 55 | lineEdit->setObjectName(QString::fromUtf8("lineEdit")); 56 | lineEdit->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);")); 57 | 58 | horizontalLayout->addWidget(lineEdit); 59 | 60 | 61 | verticalLayout->addLayout(horizontalLayout); 62 | 63 | pushButton = new QPushButton(FindFriend); 64 | pushButton->setObjectName(QString::fromUtf8("pushButton")); 65 | 66 | verticalLayout->addWidget(pushButton); 67 | 68 | 69 | verticalLayout_2->addLayout(verticalLayout); 70 | 71 | 72 | retranslateUi(FindFriend); 73 | 74 | QMetaObject::connectSlotsByName(FindFriend); 75 | } // setupUi 76 | 77 | void retranslateUi(QDialog *FindFriend) 78 | { 79 | FindFriend->setWindowTitle(QApplication::translate("FindFriend", "Dialog", 0, QApplication::UnicodeUTF8)); 80 | label->setText(QApplication::translate("FindFriend", "\345\245\275\345\217\213\350\264\246\345\217\267", 0, QApplication::UnicodeUTF8)); 81 | pushButton->setText(QApplication::translate("FindFriend", "\346\267\273\345\212\240", 0, QApplication::UnicodeUTF8)); 82 | } // retranslateUi 83 | 84 | }; 85 | 86 | namespace Ui { 87 | class FindFriend: public Ui_FindFriend {}; 88 | } // namespace Ui 89 | 90 | QT_END_NAMESPACE 91 | 92 | #endif // UI_FINDFRIEND_H 93 | -------------------------------------------------------------------------------- /ui_loginwindow.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'loginwindow.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_LOGINWINDOW_H 10 | #define UI_LOGINWINDOW_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | class Ui_Loginwindow 25 | { 26 | public: 27 | QLineEdit *usernameLine; 28 | QLineEdit *passwordLine; 29 | QWidget *widget; 30 | QPushButton *loginBtt; 31 | QWidget *widget_2; 32 | QPushButton *pushButton; 33 | 34 | void setupUi(QDialog *Loginwindow) 35 | { 36 | if (Loginwindow->objectName().isEmpty()) 37 | Loginwindow->setObjectName(QString::fromUtf8("Loginwindow")); 38 | Loginwindow->resize(322, 266); 39 | Loginwindow->setStyleSheet(QString::fromUtf8("background-image: url(:/Icon_login.png);")); 40 | usernameLine = new QLineEdit(Loginwindow); 41 | usernameLine->setObjectName(QString::fromUtf8("usernameLine")); 42 | usernameLine->setGeometry(QRect(90, 110, 211, 31)); 43 | usernameLine->setStyleSheet(QString::fromUtf8("color: rgb(0, 0, 0);\n" 44 | "background:transparent\n" 45 | "")); 46 | passwordLine = new QLineEdit(Loginwindow); 47 | passwordLine->setObjectName(QString::fromUtf8("passwordLine")); 48 | passwordLine->setGeometry(QRect(90, 150, 211, 31)); 49 | passwordLine->setStyleSheet(QString::fromUtf8("color: rgb(0, 0, 0);\n" 50 | "background:transparent")); 51 | widget = new QWidget(Loginwindow); 52 | widget->setObjectName(QString::fromUtf8("widget")); 53 | widget->setGeometry(QRect(10, 110, 71, 71)); 54 | widget->setStyleSheet(QString::fromUtf8("background-image: url(:/Icon_head.png);")); 55 | loginBtt = new QPushButton(Loginwindow); 56 | loginBtt->setObjectName(QString::fromUtf8("loginBtt")); 57 | loginBtt->setGeometry(QRect(91, 210, 151, 31)); 58 | loginBtt->setStyleSheet(QString::fromUtf8("font: 75 12pt \"\346\226\271\346\255\243\345\247\232\344\275\223\";\n" 59 | "")); 60 | widget_2 = new QWidget(Loginwindow); 61 | widget_2->setObjectName(QString::fromUtf8("widget_2")); 62 | widget_2->setGeometry(QRect(0, 0, 321, 111)); 63 | widget_2->setStyleSheet(QString::fromUtf8("")); 64 | pushButton = new QPushButton(Loginwindow); 65 | pushButton->setObjectName(QString::fromUtf8("pushButton")); 66 | pushButton->setGeometry(QRect(274, 184, 27, 27)); 67 | pushButton->setStyleSheet(QString::fromUtf8("background-image: url(:/Icon_setting.png);")); 68 | 69 | retranslateUi(Loginwindow); 70 | 71 | QMetaObject::connectSlotsByName(Loginwindow); 72 | } // setupUi 73 | 74 | void retranslateUi(QDialog *Loginwindow) 75 | { 76 | Loginwindow->setWindowTitle(QApplication::translate("Loginwindow", "Dialog", 0, QApplication::UnicodeUTF8)); 77 | usernameLine->setText(QString()); 78 | usernameLine->setPlaceholderText(QApplication::translate("Loginwindow", "\347\224\250\346\210\267\345\220\215", 0, QApplication::UnicodeUTF8)); 79 | passwordLine->setText(QString()); 80 | passwordLine->setPlaceholderText(QApplication::translate("Loginwindow", "\345\257\206\347\240\201", 0, QApplication::UnicodeUTF8)); 81 | loginBtt->setText(QApplication::translate("Loginwindow", "\347\231\273 \351\231\206", 0, QApplication::UnicodeUTF8)); 82 | pushButton->setText(QString()); 83 | } // retranslateUi 84 | 85 | }; 86 | 87 | namespace Ui { 88 | class Loginwindow: public Ui_Loginwindow {}; 89 | } // namespace Ui 90 | 91 | QT_END_NAMESPACE 92 | 93 | #endif // UI_LOGINWINDOW_H 94 | -------------------------------------------------------------------------------- /ui_maindialog.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'maindialog.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_MAINDIALOG_H 10 | #define UI_MAINDIALOG_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | 25 | #define LOCAL(x) QString::fromLocal8Bit(x) 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | class Ui_MainDialog 30 | { 31 | public: 32 | 33 | QTabWidget *tabWidget; 34 | QWidget *contents; 35 | QStackedWidget *stack; 36 | QHBoxLayout *tablay; 37 | QWidget *tw; 38 | 39 | void setupUi(QDialog *MainDialog) 40 | { 41 | 42 | contents = new QWidget(); 43 | 44 | 45 | 46 | stack = new QStackedWidget(MainDialog); 47 | 48 | if (MainDialog->objectName().isEmpty()) 49 | MainDialog->setObjectName(QString::fromUtf8("MainDialog")); 50 | //MainDialog->resize(441, 509); 51 | 52 | retranslateUi(MainDialog); 53 | QVBoxLayout *lay = new QVBoxLayout(contents); 54 | 55 | lay->setContentsMargins(0,0,0,0); 56 | lay->setSpacing(0); 57 | 58 | contents->setLayout(lay); 59 | /* 60 | tabWidget = new QTabWidget(contents); 61 | lay->addWidget(tabWidget); 62 | tabWidget->setDocumentMode(true); 63 | tabWidget->setTabPosition(QTabWidget::South); 64 | */ 65 | lay->addWidget(stack); 66 | 67 | tw = new QWidget(contents); 68 | tablay = new QHBoxLayout(tw); 69 | tablay->setSpacing(0); 70 | tablay->setContentsMargins(0,0,0,0); 71 | tablay->addStretch(); 72 | lay->addWidget(tw,0,Qt::AlignBottom); 73 | 74 | QHBoxLayout *mainLay = new QHBoxLayout(MainDialog); 75 | mainLay->setContentsMargins(0,0,0,0); 76 | 77 | 78 | mainLay->addWidget(contents); 79 | MainDialog->setLayout(mainLay); 80 | QMetaObject::connectSlotsByName(MainDialog); 81 | } // setupUi 82 | 83 | void retranslateUi(QDialog *MainDialog) 84 | { 85 | MainDialog->setWindowTitle(QApplication::translate("MainDialog", "Dialog", 0, QApplication::UnicodeUTF8)); 86 | } // retranslateUi 87 | 88 | }; 89 | 90 | namespace Ui { 91 | class MainDialog: public Ui_MainDialog {}; 92 | } // namespace Ui 93 | 94 | QT_END_NAMESPACE 95 | 96 | #endif // UI_MAINDIALOG_H 97 | -------------------------------------------------------------------------------- /ui_passworddlg.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'passworddlg.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_PASSWORDDLG_H 10 | #define UI_PASSWORDDLG_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | QT_BEGIN_NAMESPACE 26 | 27 | class Ui_passworddlg 28 | { 29 | public: 30 | QGridLayout *gridLayout; 31 | QVBoxLayout *verticalLayout_2; 32 | QVBoxLayout *verticalLayout; 33 | QHBoxLayout *horizontalLayout; 34 | QLabel *label; 35 | QLineEdit *password; 36 | QHBoxLayout *horizontalLayout_2; 37 | QLabel *label_2; 38 | QLineEdit *repassword; 39 | QHBoxLayout *horizontalLayout_3; 40 | QPushButton *bt_ok; 41 | QPushButton *bk_cancle; 42 | 43 | void setupUi(QDialog *passworddlg) 44 | { 45 | if (passworddlg->objectName().isEmpty()) 46 | passworddlg->setObjectName(QString::fromUtf8("passworddlg")); 47 | passworddlg->resize(272, 103); 48 | gridLayout = new QGridLayout(passworddlg); 49 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 50 | verticalLayout_2 = new QVBoxLayout(); 51 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); 52 | verticalLayout = new QVBoxLayout(); 53 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 54 | horizontalLayout = new QHBoxLayout(); 55 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 56 | label = new QLabel(passworddlg); 57 | label->setObjectName(QString::fromUtf8("label")); 58 | 59 | horizontalLayout->addWidget(label); 60 | 61 | password = new QLineEdit(passworddlg); 62 | password->setObjectName(QString::fromUtf8("password")); 63 | 64 | horizontalLayout->addWidget(password); 65 | 66 | 67 | verticalLayout->addLayout(horizontalLayout); 68 | 69 | horizontalLayout_2 = new QHBoxLayout(); 70 | horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); 71 | label_2 = new QLabel(passworddlg); 72 | label_2->setObjectName(QString::fromUtf8("label_2")); 73 | 74 | horizontalLayout_2->addWidget(label_2); 75 | 76 | repassword = new QLineEdit(passworddlg); 77 | repassword->setObjectName(QString::fromUtf8("repassword")); 78 | 79 | horizontalLayout_2->addWidget(repassword); 80 | 81 | 82 | verticalLayout->addLayout(horizontalLayout_2); 83 | 84 | 85 | verticalLayout_2->addLayout(verticalLayout); 86 | 87 | horizontalLayout_3 = new QHBoxLayout(); 88 | horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); 89 | bt_ok = new QPushButton(passworddlg); 90 | bt_ok->setObjectName(QString::fromUtf8("bt_ok")); 91 | 92 | horizontalLayout_3->addWidget(bt_ok); 93 | 94 | bk_cancle = new QPushButton(passworddlg); 95 | bk_cancle->setObjectName(QString::fromUtf8("bk_cancle")); 96 | 97 | horizontalLayout_3->addWidget(bk_cancle); 98 | 99 | 100 | verticalLayout_2->addLayout(horizontalLayout_3); 101 | 102 | 103 | gridLayout->addLayout(verticalLayout_2, 0, 0, 1, 1); 104 | 105 | 106 | retranslateUi(passworddlg); 107 | 108 | QMetaObject::connectSlotsByName(passworddlg); 109 | } // setupUi 110 | 111 | void retranslateUi(QDialog *passworddlg) 112 | { 113 | passworddlg->setWindowTitle(QApplication::translate("passworddlg", "Dialog", 0, QApplication::UnicodeUTF8)); 114 | label->setText(QApplication::translate("passworddlg", "\346\226\260\345\257\206\347\240\201\357\274\232 ", 0, QApplication::UnicodeUTF8)); 115 | label_2->setText(QApplication::translate("passworddlg", "\351\207\215\345\244\215\350\276\223\345\205\245\357\274\232", 0, QApplication::UnicodeUTF8)); 116 | bt_ok->setText(QApplication::translate("passworddlg", "\347\241\256\345\256\232", 0, QApplication::UnicodeUTF8)); 117 | bk_cancle->setText(QApplication::translate("passworddlg", "\345\217\226\346\266\210", 0, QApplication::UnicodeUTF8)); 118 | } // retranslateUi 119 | 120 | }; 121 | 122 | namespace Ui { 123 | class passworddlg: public Ui_passworddlg {}; 124 | } // namespace Ui 125 | 126 | QT_END_NAMESPACE 127 | 128 | #endif // UI_PASSWORDDLG_H 129 | -------------------------------------------------------------------------------- /ui_resetnickname.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'resetnickname.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_RESETNICKNAME_H 10 | #define UI_RESETNICKNAME_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class Ui_ResetNickname 27 | { 28 | public: 29 | QVBoxLayout *verticalLayout_2; 30 | QVBoxLayout *verticalLayout; 31 | QLabel *label; 32 | QHBoxLayout *horizontalLayout; 33 | QLineEdit *text_newNickname; 34 | QPushButton *Btt_confirm; 35 | 36 | void setupUi(QDialog *ResetNickname) 37 | { 38 | if (ResetNickname->objectName().isEmpty()) 39 | ResetNickname->setObjectName(QString::fromUtf8("ResetNickname")); 40 | ResetNickname->resize(220, 80); 41 | ResetNickname->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255));")); 42 | verticalLayout_2 = new QVBoxLayout(ResetNickname); 43 | verticalLayout_2->setSpacing(0); 44 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); 45 | verticalLayout_2->setContentsMargins(0, 0, 0, 0); 46 | verticalLayout = new QVBoxLayout(); 47 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 48 | label = new QLabel(ResetNickname); 49 | label->setObjectName(QString::fromUtf8("label")); 50 | label->setStyleSheet(QString::fromUtf8("font: 75 14pt \"\346\226\271\346\255\243\345\247\232\344\275\223\";\n" 51 | "background:transparent;")); 52 | 53 | verticalLayout->addWidget(label); 54 | 55 | horizontalLayout = new QHBoxLayout(); 56 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 57 | text_newNickname = new QLineEdit(ResetNickname); 58 | text_newNickname->setObjectName(QString::fromUtf8("text_newNickname")); 59 | text_newNickname->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);")); 60 | 61 | horizontalLayout->addWidget(text_newNickname); 62 | 63 | Btt_confirm = new QPushButton(ResetNickname); 64 | Btt_confirm->setObjectName(QString::fromUtf8("Btt_confirm")); 65 | Btt_confirm->setStyleSheet(QString::fromUtf8("font: 75 10pt \"\346\226\271\346\255\243\345\247\232\344\275\223\";")); 66 | 67 | horizontalLayout->addWidget(Btt_confirm); 68 | 69 | 70 | verticalLayout->addLayout(horizontalLayout); 71 | 72 | 73 | verticalLayout_2->addLayout(verticalLayout); 74 | 75 | 76 | retranslateUi(ResetNickname); 77 | 78 | QMetaObject::connectSlotsByName(ResetNickname); 79 | } // setupUi 80 | 81 | void retranslateUi(QDialog *ResetNickname) 82 | { 83 | ResetNickname->setWindowTitle(QApplication::translate("ResetNickname", "Dialog", 0, QApplication::UnicodeUTF8)); 84 | label->setText(QApplication::translate("ResetNickname", "\350\257\267\350\276\223\345\205\245\346\226\260\346\230\265\347\247\260\357\274\232", 0, QApplication::UnicodeUTF8)); 85 | Btt_confirm->setText(QApplication::translate("ResetNickname", "\347\241\256\345\256\232", 0, QApplication::UnicodeUTF8)); 86 | } // retranslateUi 87 | 88 | }; 89 | 90 | namespace Ui { 91 | class ResetNickname: public Ui_ResetNickname {}; 92 | } // namespace Ui 93 | 94 | QT_END_NAMESPACE 95 | 96 | #endif // UI_RESETNICKNAME_H 97 | -------------------------------------------------------------------------------- /ui_selectmucroom.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'selectmucroom.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SELECTMUCROOM_H 10 | #define UI_SELECTMUCROOM_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class Ui_SelectMucroom 27 | { 28 | public: 29 | QVBoxLayout *verticalLayout_2; 30 | QVBoxLayout *verticalLayout; 31 | QLabel *label; 32 | QHBoxLayout *horizontalLayout; 33 | QLineEdit *text_roomname; 34 | QPushButton *Btt_confirm; 35 | 36 | void setupUi(QDialog *SelectMucroom) 37 | { 38 | if (SelectMucroom->objectName().isEmpty()) 39 | SelectMucroom->setObjectName(QString::fromUtf8("SelectMucroom")); 40 | SelectMucroom->resize(223, 81); 41 | SelectMucroom->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255));")); 42 | verticalLayout_2 = new QVBoxLayout(SelectMucroom); 43 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); 44 | verticalLayout = new QVBoxLayout(); 45 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 46 | label = new QLabel(SelectMucroom); 47 | label->setObjectName(QString::fromUtf8("label")); 48 | label->setStyleSheet(QString::fromUtf8("font: 75 14pt \"\346\226\271\346\255\243\345\247\232\344\275\223\";\n" 49 | "background:transparent;")); 50 | 51 | verticalLayout->addWidget(label); 52 | 53 | horizontalLayout = new QHBoxLayout(); 54 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 55 | text_roomname = new QLineEdit(SelectMucroom); 56 | text_roomname->setObjectName(QString::fromUtf8("text_roomname")); 57 | text_roomname->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);")); 58 | 59 | horizontalLayout->addWidget(text_roomname); 60 | 61 | Btt_confirm = new QPushButton(SelectMucroom); 62 | Btt_confirm->setObjectName(QString::fromUtf8("Btt_confirm")); 63 | Btt_confirm->setStyleSheet(QString::fromUtf8("font: 75 10pt \"\346\226\271\346\255\243\345\247\232\344\275\223\";")); 64 | 65 | horizontalLayout->addWidget(Btt_confirm); 66 | 67 | 68 | verticalLayout->addLayout(horizontalLayout); 69 | 70 | 71 | verticalLayout_2->addLayout(verticalLayout); 72 | 73 | 74 | retranslateUi(SelectMucroom); 75 | 76 | QMetaObject::connectSlotsByName(SelectMucroom); 77 | } // setupUi 78 | 79 | void retranslateUi(QDialog *SelectMucroom) 80 | { 81 | SelectMucroom->setWindowTitle(QApplication::translate("SelectMucroom", "Dialog", 0, QApplication::UnicodeUTF8)); 82 | label->setText(QApplication::translate("SelectMucroom", " \350\257\267\350\276\223\345\205\245\350\201\212\345\244\251\345\256\244JID\357\274\232", 0, QApplication::UnicodeUTF8)); 83 | Btt_confirm->setText(QApplication::translate("SelectMucroom", "\347\241\256\345\256\232", 0, QApplication::UnicodeUTF8)); 84 | } // retranslateUi 85 | 86 | }; 87 | 88 | namespace Ui { 89 | class SelectMucroom: public Ui_SelectMucroom {}; 90 | } // namespace Ui 91 | 92 | QT_END_NAMESPACE 93 | 94 | #endif // UI_SELECTMUCROOM_H 95 | -------------------------------------------------------------------------------- /ui_sendfiles.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'sendfiles.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SENDFILES_H 10 | #define UI_SENDFILES_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | QT_BEGIN_NAMESPACE 24 | 25 | class Ui_SendFiles 26 | { 27 | public: 28 | QVBoxLayout *verticalLayout_2; 29 | QVBoxLayout *verticalLayout; 30 | QHBoxLayout *horizontalLayout; 31 | QLineEdit *lineEdit; 32 | QPushButton *choose; 33 | QPushButton *send; 34 | 35 | void setupUi(QDialog *SendFiles) 36 | { 37 | if (SendFiles->objectName().isEmpty()) 38 | SendFiles->setObjectName(QString::fromUtf8("SendFiles")); 39 | SendFiles->resize(238, 85); 40 | SendFiles->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255));")); 41 | verticalLayout_2 = new QVBoxLayout(SendFiles); 42 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); 43 | verticalLayout = new QVBoxLayout(); 44 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 45 | horizontalLayout = new QHBoxLayout(); 46 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 47 | lineEdit = new QLineEdit(SendFiles); 48 | lineEdit->setObjectName(QString::fromUtf8("lineEdit")); 49 | lineEdit->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);")); 50 | 51 | horizontalLayout->addWidget(lineEdit); 52 | 53 | choose = new QPushButton(SendFiles); 54 | choose->setObjectName(QString::fromUtf8("choose")); 55 | 56 | horizontalLayout->addWidget(choose); 57 | 58 | 59 | verticalLayout->addLayout(horizontalLayout); 60 | 61 | send = new QPushButton(SendFiles); 62 | send->setObjectName(QString::fromUtf8("send")); 63 | 64 | verticalLayout->addWidget(send); 65 | 66 | 67 | verticalLayout_2->addLayout(verticalLayout); 68 | 69 | 70 | retranslateUi(SendFiles); 71 | 72 | QMetaObject::connectSlotsByName(SendFiles); 73 | } // setupUi 74 | 75 | void retranslateUi(QDialog *SendFiles) 76 | { 77 | SendFiles->setWindowTitle(QApplication::translate("SendFiles", "Dialog", 0, QApplication::UnicodeUTF8)); 78 | choose->setText(QApplication::translate("SendFiles", "\351\200\211\346\213\251\346\226\207\344\273\266", 0, QApplication::UnicodeUTF8)); 79 | send->setText(QApplication::translate("SendFiles", "\345\217\221\351\200\201", 0, QApplication::UnicodeUTF8)); 80 | } // retranslateUi 81 | 82 | }; 83 | 84 | namespace Ui { 85 | class SendFiles: public Ui_SendFiles {}; 86 | } // namespace Ui 87 | 88 | QT_END_NAMESPACE 89 | 90 | #endif // UI_SENDFILES_H 91 | -------------------------------------------------------------------------------- /ui_set_dirpath.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'set_dirpath.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SET_DIRPATH_H 10 | #define UI_SET_DIRPATH_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | class Ui_Set_dirpath 31 | { 32 | public: 33 | QGridLayout *gridLayout; 34 | QSplitter *splitter_2; 35 | QSplitter *splitter; 36 | QWidget *layoutWidget; 37 | QHBoxLayout *horizontalLayout; 38 | QLabel *label; 39 | QLineEdit *lineEdit; 40 | QPushButton *Bt_select; 41 | QWidget *layoutWidget1; 42 | QHBoxLayout *horizontalLayout_2; 43 | QLabel *label_2; 44 | QComboBox *comboBox; 45 | QWidget *layoutWidget2; 46 | QVBoxLayout *verticalLayout_2; 47 | QPushButton *Bt_ok; 48 | QPushButton *Bt_cancel; 49 | 50 | void setupUi(QDialog *Set_dirpath) 51 | { 52 | if (Set_dirpath->objectName().isEmpty()) 53 | Set_dirpath->setObjectName(QString::fromUtf8("Set_dirpath")); 54 | Set_dirpath->resize(332, 72); 55 | gridLayout = new QGridLayout(Set_dirpath); 56 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 57 | splitter_2 = new QSplitter(Set_dirpath); 58 | splitter_2->setObjectName(QString::fromUtf8("splitter_2")); 59 | splitter_2->setOrientation(Qt::Horizontal); 60 | splitter = new QSplitter(splitter_2); 61 | splitter->setObjectName(QString::fromUtf8("splitter")); 62 | splitter->setOrientation(Qt::Vertical); 63 | layoutWidget = new QWidget(splitter); 64 | layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); 65 | horizontalLayout = new QHBoxLayout(layoutWidget); 66 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 67 | horizontalLayout->setContentsMargins(0, 0, 0, 0); 68 | label = new QLabel(layoutWidget); 69 | label->setObjectName(QString::fromUtf8("label")); 70 | 71 | horizontalLayout->addWidget(label); 72 | 73 | lineEdit = new QLineEdit(layoutWidget); 74 | lineEdit->setObjectName(QString::fromUtf8("lineEdit")); 75 | 76 | horizontalLayout->addWidget(lineEdit); 77 | 78 | Bt_select = new QPushButton(layoutWidget); 79 | Bt_select->setObjectName(QString::fromUtf8("Bt_select")); 80 | 81 | horizontalLayout->addWidget(Bt_select); 82 | 83 | splitter->addWidget(layoutWidget); 84 | layoutWidget1 = new QWidget(splitter); 85 | layoutWidget1->setObjectName(QString::fromUtf8("layoutWidget1")); 86 | horizontalLayout_2 = new QHBoxLayout(layoutWidget1); 87 | horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); 88 | horizontalLayout_2->setContentsMargins(0, 0, 0, 0); 89 | label_2 = new QLabel(layoutWidget1); 90 | label_2->setObjectName(QString::fromUtf8("label_2")); 91 | 92 | horizontalLayout_2->addWidget(label_2); 93 | 94 | comboBox = new QComboBox(layoutWidget1); 95 | comboBox->setObjectName(QString::fromUtf8("comboBox")); 96 | comboBox->setEditable(true); 97 | 98 | horizontalLayout_2->addWidget(comboBox); 99 | 100 | splitter->addWidget(layoutWidget1); 101 | splitter_2->addWidget(splitter); 102 | layoutWidget2 = new QWidget(splitter_2); 103 | layoutWidget2->setObjectName(QString::fromUtf8("layoutWidget2")); 104 | verticalLayout_2 = new QVBoxLayout(layoutWidget2); 105 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); 106 | verticalLayout_2->setContentsMargins(0, 0, 0, 0); 107 | Bt_ok = new QPushButton(layoutWidget2); 108 | Bt_ok->setObjectName(QString::fromUtf8("Bt_ok")); 109 | 110 | verticalLayout_2->addWidget(Bt_ok); 111 | 112 | Bt_cancel = new QPushButton(layoutWidget2); 113 | Bt_cancel->setObjectName(QString::fromUtf8("Bt_cancel")); 114 | 115 | verticalLayout_2->addWidget(Bt_cancel); 116 | 117 | splitter_2->addWidget(layoutWidget2); 118 | 119 | gridLayout->addWidget(splitter_2, 0, 0, 1, 1); 120 | 121 | 122 | retranslateUi(Set_dirpath); 123 | 124 | QMetaObject::connectSlotsByName(Set_dirpath); 125 | } // setupUi 126 | 127 | void retranslateUi(QDialog *Set_dirpath) 128 | { 129 | Set_dirpath->setWindowTitle(QApplication::translate("Set_dirpath", "Dialog", 0, QApplication::UnicodeUTF8)); 130 | label->setText(QApplication::translate("Set_dirpath", "\346\234\254\345\234\260\350\267\257\345\276\204 ", 0, QApplication::UnicodeUTF8)); 131 | lineEdit->setText(QApplication::translate("Set_dirpath", "D:/01/", 0, QApplication::UnicodeUTF8)); 132 | Bt_select->setText(QString()); 133 | label_2->setText(QApplication::translate("Set_dirpath", "\346\234\215\345\212\241\345\231\250URL", 0, QApplication::UnicodeUTF8)); 134 | comboBox->clear(); 135 | comboBox->insertItems(0, QStringList() 136 | << QApplication::translate("Set_dirpath", "git://192.168.1.114/test", 0, QApplication::UnicodeUTF8) 137 | ); 138 | Bt_ok->setText(QApplication::translate("Set_dirpath", "\347\241\256\350\256\244", 0, QApplication::UnicodeUTF8)); 139 | Bt_cancel->setText(QApplication::translate("Set_dirpath", "\345\217\226\346\266\210", 0, QApplication::UnicodeUTF8)); 140 | } // retranslateUi 141 | 142 | }; 143 | 144 | namespace Ui { 145 | class Set_dirpath: public Ui_Set_dirpath {}; 146 | } // namespace Ui 147 | 148 | QT_END_NAMESPACE 149 | 150 | #endif // UI_SET_DIRPATH_H 151 | -------------------------------------------------------------------------------- /ui_setdlg.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'setdlg.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SETDLG_H 10 | #define UI_SETDLG_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | class Ui_SetDlg 31 | { 32 | public: 33 | QGridLayout *gridLayout; 34 | QVBoxLayout *verticalLayout; 35 | QSplitter *splitter_3; 36 | QLabel *label_3; 37 | QLineEdit *line_fileshare; 38 | QSplitter *splitter_2; 39 | QSplitter *splitter; 40 | QWidget *layoutWidget; 41 | QHBoxLayout *horizontalLayout; 42 | QLabel *label; 43 | QLineEdit *lineEditname; 44 | QWidget *layoutWidget1; 45 | QHBoxLayout *horizontalLayout_2; 46 | QLabel *label_2; 47 | QSpacerItem *horizontalSpacer; 48 | QLineEdit *lineEditip; 49 | QPushButton *pushButton; 50 | 51 | void setupUi(QDialog *SetDlg) 52 | { 53 | if (SetDlg->objectName().isEmpty()) 54 | SetDlg->setObjectName(QString::fromUtf8("SetDlg")); 55 | SetDlg->resize(302, 95); 56 | SetDlg->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:0, stop:0 rgba(191, 255, 186, 255), stop:1 rgba(255, 255, 255, 255));")); 57 | gridLayout = new QGridLayout(SetDlg); 58 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 59 | verticalLayout = new QVBoxLayout(); 60 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 61 | splitter_3 = new QSplitter(SetDlg); 62 | splitter_3->setObjectName(QString::fromUtf8("splitter_3")); 63 | splitter_3->setOrientation(Qt::Horizontal); 64 | label_3 = new QLabel(splitter_3); 65 | label_3->setObjectName(QString::fromUtf8("label_3")); 66 | label_3->setMaximumSize(QSize(80, 16777215)); 67 | splitter_3->addWidget(label_3); 68 | line_fileshare = new QLineEdit(splitter_3); 69 | line_fileshare->setObjectName(QString::fromUtf8("line_fileshare")); 70 | splitter_3->addWidget(line_fileshare); 71 | 72 | verticalLayout->addWidget(splitter_3); 73 | 74 | splitter_2 = new QSplitter(SetDlg); 75 | splitter_2->setObjectName(QString::fromUtf8("splitter_2")); 76 | splitter_2->setOrientation(Qt::Horizontal); 77 | splitter = new QSplitter(splitter_2); 78 | splitter->setObjectName(QString::fromUtf8("splitter")); 79 | splitter->setOrientation(Qt::Vertical); 80 | layoutWidget = new QWidget(splitter); 81 | layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); 82 | horizontalLayout = new QHBoxLayout(layoutWidget); 83 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); 84 | horizontalLayout->setContentsMargins(0, 0, 0, 0); 85 | label = new QLabel(layoutWidget); 86 | label->setObjectName(QString::fromUtf8("label")); 87 | 88 | horizontalLayout->addWidget(label); 89 | 90 | lineEditname = new QLineEdit(layoutWidget); 91 | lineEditname->setObjectName(QString::fromUtf8("lineEditname")); 92 | lineEditname->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);")); 93 | 94 | horizontalLayout->addWidget(lineEditname); 95 | 96 | splitter->addWidget(layoutWidget); 97 | layoutWidget1 = new QWidget(splitter); 98 | layoutWidget1->setObjectName(QString::fromUtf8("layoutWidget1")); 99 | horizontalLayout_2 = new QHBoxLayout(layoutWidget1); 100 | horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); 101 | horizontalLayout_2->setContentsMargins(0, 0, 0, 0); 102 | label_2 = new QLabel(layoutWidget1); 103 | label_2->setObjectName(QString::fromUtf8("label_2")); 104 | label_2->setMaximumSize(QSize(60, 16777215)); 105 | 106 | horizontalLayout_2->addWidget(label_2); 107 | 108 | horizontalSpacer = new QSpacerItem(13, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 109 | 110 | horizontalLayout_2->addItem(horizontalSpacer); 111 | 112 | lineEditip = new QLineEdit(layoutWidget1); 113 | lineEditip->setObjectName(QString::fromUtf8("lineEditip")); 114 | lineEditip->setMaximumSize(QSize(133, 16777215)); 115 | lineEditip->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 255, 255);")); 116 | 117 | horizontalLayout_2->addWidget(lineEditip); 118 | 119 | splitter->addWidget(layoutWidget1); 120 | splitter_2->addWidget(splitter); 121 | pushButton = new QPushButton(splitter_2); 122 | pushButton->setObjectName(QString::fromUtf8("pushButton")); 123 | splitter_2->addWidget(pushButton); 124 | 125 | verticalLayout->addWidget(splitter_2); 126 | 127 | 128 | gridLayout->addLayout(verticalLayout, 0, 0, 1, 1); 129 | 130 | 131 | retranslateUi(SetDlg); 132 | 133 | QMetaObject::connectSlotsByName(SetDlg); 134 | } // setupUi 135 | 136 | void retranslateUi(QDialog *SetDlg) 137 | { 138 | SetDlg->setWindowTitle(QApplication::translate("SetDlg", "Dialog", 0, QApplication::UnicodeUTF8)); 139 | label_3->setText(QApplication::translate("SetDlg", "\346\226\207\344\273\266\346\234\215\345\212\241\345\231\250", 0, QApplication::UnicodeUTF8)); 140 | line_fileshare->setText(QApplication::translate("SetDlg", "git://192.168.1.114/test", 0, QApplication::UnicodeUTF8)); 141 | label->setText(QApplication::translate("SetDlg", "\346\234\215\345\212\241\345\231\250\345\220\215\347\247\260", 0, QApplication::UnicodeUTF8)); 142 | lineEditname->setText(QString()); 143 | lineEditname->setPlaceholderText(QApplication::translate("SetDlg", "\346\234\215\345\212\241\345\231\250\345\220\215\347\247\260", 0, QApplication::UnicodeUTF8)); 144 | label_2->setText(QApplication::translate("SetDlg", "\346\234\215\345\212\241\345\231\250IP", 0, QApplication::UnicodeUTF8)); 145 | lineEditip->setPlaceholderText(QApplication::translate("SetDlg", "\346\234\215\345\212\241\345\231\250IP", 0, QApplication::UnicodeUTF8)); 146 | pushButton->setText(QApplication::translate("SetDlg", "\347\241\256\350\256\244", 0, QApplication::UnicodeUTF8)); 147 | } // retranslateUi 148 | 149 | }; 150 | 151 | namespace Ui { 152 | class SetDlg: public Ui_SetDlg {}; 153 | } // namespace Ui 154 | 155 | QT_END_NAMESPACE 156 | 157 | #endif // UI_SETDLG_H 158 | -------------------------------------------------------------------------------- /ui_setstate.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'setstate.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_SETSTATE_H 10 | #define UI_SETSTATE_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | QT_BEGIN_NAMESPACE 24 | 25 | class Ui_setstate 26 | { 27 | public: 28 | QGridLayout *gridLayout; 29 | QSplitter *splitter_2; 30 | QLabel *label; 31 | QSplitter *splitter; 32 | QPushButton *bt_closecurrent; 33 | QPushButton *bt_closeall; 34 | 35 | void setupUi(QDialog *setstate) 36 | { 37 | if (setstate->objectName().isEmpty()) 38 | setstate->setObjectName(QString::fromUtf8("setstate")); 39 | setstate->resize(238, 58); 40 | gridLayout = new QGridLayout(setstate); 41 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); 42 | splitter_2 = new QSplitter(setstate); 43 | splitter_2->setObjectName(QString::fromUtf8("splitter_2")); 44 | splitter_2->setOrientation(Qt::Vertical); 45 | label = new QLabel(splitter_2); 46 | label->setObjectName(QString::fromUtf8("label")); 47 | splitter_2->addWidget(label); 48 | splitter = new QSplitter(splitter_2); 49 | splitter->setObjectName(QString::fromUtf8("splitter")); 50 | splitter->setOrientation(Qt::Horizontal); 51 | bt_closecurrent = new QPushButton(splitter); 52 | bt_closecurrent->setObjectName(QString::fromUtf8("bt_closecurrent")); 53 | splitter->addWidget(bt_closecurrent); 54 | bt_closeall = new QPushButton(splitter); 55 | bt_closeall->setObjectName(QString::fromUtf8("bt_closeall")); 56 | splitter->addWidget(bt_closeall); 57 | splitter_2->addWidget(splitter); 58 | 59 | gridLayout->addWidget(splitter_2, 0, 0, 1, 1); 60 | 61 | 62 | retranslateUi(setstate); 63 | 64 | QMetaObject::connectSlotsByName(setstate); 65 | } // setupUi 66 | 67 | void retranslateUi(QDialog *setstate) 68 | { 69 | setstate->setWindowTitle(QApplication::translate("setstate", "Dialog", 0, QApplication::UnicodeUTF8)); 70 | label->setText(QApplication::translate("setstate", "\345\205\263\351\227\255\346\211\200\346\234\211\344\274\232\350\257\235\347\252\227\345\217\243\357\274\214\350\277\230\346\230\257\344\273\205\345\205\263\351\227\255\345\275\223\345\211\215\357\274\237", 0, QApplication::UnicodeUTF8)); 71 | bt_closecurrent->setText(QApplication::translate("setstate", "\345\205\263\351\227\255\345\275\223\345\211\215", 0, QApplication::UnicodeUTF8)); 72 | bt_closeall->setText(QApplication::translate("setstate", "\345\205\263\351\227\255\346\211\200\346\234\211", 0, QApplication::UnicodeUTF8)); 73 | } // retranslateUi 74 | 75 | }; 76 | 77 | namespace Ui { 78 | class setstate: public Ui_setstate {}; 79 | } // namespace Ui 80 | 81 | QT_END_NAMESPACE 82 | 83 | #endif // UI_SETSTATE_H 84 | -------------------------------------------------------------------------------- /ui_widget.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'widget.ui' 3 | ** 4 | ** Created by: Qt User Interface Compiler version 4.8.6 5 | ** 6 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 7 | ********************************************************************************/ 8 | 9 | #ifndef UI_WIDGET_H 10 | #define UI_WIDGET_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | QT_BEGIN_NAMESPACE 23 | 24 | class Ui_Widget 25 | { 26 | public: 27 | QVBoxLayout *verticalLayout; 28 | QWebView *webView; 29 | QPushButton *pushButton; 30 | QPushButton *returnButton; 31 | 32 | void setupUi(QWidget *Widget) 33 | { 34 | if (Widget->objectName().isEmpty()) 35 | Widget->setObjectName(QString::fromUtf8("Widget")); 36 | //Widget->resize(482, 510); 37 | verticalLayout = new QVBoxLayout(Widget); 38 | verticalLayout->setSpacing(6); 39 | verticalLayout->setContentsMargins(0, 0, 0, 0); 40 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); 41 | webView = new QWebView(Widget); 42 | webView->setObjectName(QString::fromUtf8("webView")); 43 | webView->setUrl(QUrl(QString::fromUtf8("about:blank"))); 44 | 45 | verticalLayout->addWidget(webView); 46 | 47 | QHBoxLayout *hlay = new QHBoxLayout(); 48 | pushButton = new QPushButton(Widget); 49 | returnButton = new QPushButton(Widget); 50 | hlay->addStretch(); 51 | hlay->addWidget(pushButton); 52 | hlay->addWidget(returnButton); 53 | hlay->addStretch(); 54 | 55 | pushButton->setObjectName(QString::fromUtf8("pushButton")); 56 | 57 | verticalLayout->addItem(hlay); 58 | 59 | retranslateUi(Widget); 60 | 61 | QMetaObject::connectSlotsByName(Widget); 62 | } // setupUi 63 | 64 | void retranslateUi(QWidget *Widget) 65 | { 66 | Widget->setWindowTitle(QApplication::translate("Widget", "Widget", 0, QApplication::UnicodeUTF8)); 67 | pushButton->setText(QApplication::translate("Widget", "\344\270\212\344\274\240", 0, QApplication::UnicodeUTF8)); 68 | } // retranslateUi 69 | 70 | }; 71 | 72 | namespace Ui { 73 | class Widget: public Ui_Widget {}; 74 | } // namespace Ui 75 | 76 | QT_END_NAMESPACE 77 | 78 | #endif // UI_WIDGET_H 79 | -------------------------------------------------------------------------------- /vc100.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ycsoft/QtQQ/a298efc9978fc5e7fa5afa760804d7e90228662d/vc100.pdb -------------------------------------------------------------------------------- /widget.cpp: -------------------------------------------------------------------------------- 1 | #include "widget.h" 2 | #include "ui_widget.h" 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #define LOCAL(x) QString::fromLocal8Bit(x) 11 | 12 | Downloader::Downloader(QObject *parent, QString filename) 13 | :QObject(parent) 14 | ,m_fname(filename),m_file(NULL) 15 | { 16 | 17 | } 18 | 19 | Downloader::~Downloader() 20 | { 21 | 22 | } 23 | 24 | void Downloader::finished() 25 | { 26 | if ( m_file ) 27 | { 28 | m_file->flush(); 29 | m_file->close(); 30 | m_reply->deleteLater(); 31 | QMessageBox::information(0,LOCAL("提示"),LOCAL("文件:") + QFileInfo(m_fname).fileName() + LOCAL("下载完成"),0); 32 | } 33 | } 34 | 35 | void Downloader::readyRead() 36 | { 37 | if( m_file ) 38 | m_file->write(m_reply->readAll()); 39 | } 40 | 41 | void Downloader::start() 42 | { 43 | QFileInfo info(m_fname); 44 | QString fname = info.fileName(); 45 | 46 | if (QFile::exists(fname)) 47 | QFile::remove(fname); 48 | m_file = new QFile(fname); 49 | if ( !m_file->open(QIODevice::WriteOnly) ) 50 | { 51 | QMessageBox::warning(0,LOCAL("警告"),LOCAL("无法保存文件"),QMessageBox::Ok,QMessageBox::NoButton); 52 | return; 53 | } 54 | m_reply = m_nam.get(QNetworkRequest(QUrl(m_fname))); 55 | 56 | connect( m_reply,SIGNAL(finished()),this,SLOT(finished())); 57 | connect( m_reply,SIGNAL(readyRead()),this,SLOT(readyRead())); 58 | } 59 | 60 | 61 | 62 | Widget::Widget(QWidget *parent) : 63 | QWidget(parent), 64 | ui(new Ui::Widget) 65 | { 66 | QUrl url("http://127.0.0.1:8000/file"/*"http://www.hao123.com"*/); 67 | ui->setupUi(this); 68 | ui->returnButton->setText(LOCAL("返回文件列表")); 69 | 70 | ui->webView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); 71 | 72 | connect(ui->webView,SIGNAL(linkClicked(QUrl)),this,SLOT(urlChange(QUrl))); 73 | //connect(ui->webView,SIGNAL(urlChanged(QUrl)),this,SLOT(urlChange(QUrl))); 74 | } 75 | 76 | void Widget::urlChange(const QUrl &url) 77 | { 78 | qDebug()<webView->load(url); 80 | download(url.toString()); 81 | } 82 | 83 | void Widget::finished() 84 | { 85 | 86 | } 87 | void Widget::readyRead() 88 | { 89 | 90 | } 91 | 92 | Widget::~Widget() 93 | { 94 | delete ui; 95 | } 96 | 97 | void Widget::download(QString file) 98 | { 99 | Downloader *down = new Downloader(this,file); 100 | down->start(); 101 | } 102 | void Widget::loadURL(QUrl &url) 103 | { 104 | ui->webView->load(url); 105 | } 106 | -------------------------------------------------------------------------------- /widget.h: -------------------------------------------------------------------------------- 1 | #ifndef WIDGET_H 2 | #define WIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | namespace Ui { 14 | class Widget; 15 | } 16 | 17 | 18 | 19 | class Downloader:public QObject 20 | { 21 | Q_OBJECT 22 | public: 23 | explicit Downloader(QObject *parent = 0,QString filename = ""); 24 | ~Downloader(); 25 | 26 | void start(); 27 | public slots: 28 | void finished(); 29 | void readyRead(); 30 | private: 31 | QNetworkAccessManager m_nam; 32 | QString m_fname; 33 | QFile *m_file; 34 | QNetworkReply *m_reply; 35 | }; 36 | 37 | class Widget : public QWidget 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | explicit Widget(QWidget *parent = 0); 43 | ~Widget(); 44 | 45 | void download(QString file); 46 | void loadURL(QUrl &url); 47 | 48 | void setGroup(QString group) 49 | { 50 | m_groupname = group; 51 | } 52 | 53 | Ui::Widget *ui; 54 | public slots: 55 | void urlChange(const QUrl&); 56 | 57 | void finished(); 58 | void readyRead(); 59 | 60 | 61 | private: 62 | 63 | 64 | QMap m_filemap; 65 | QNetworkAccessManager m_nam; 66 | 67 | QString m_groupname; 68 | }; 69 | 70 | #endif // WIDGET_H 71 | --------------------------------------------------------------------------------