Changeset - b4d71a5e7825
[Not reviewed]
portlist
0 2 2
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-09-05 12:40:29
hy@ozderya.net
added usb icon for usb devices
4 files changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -51,8 +51,9 @@ endif (QWT_USE_STATIC)
 
# includes
 
include_directories(${QWT_INCLUDE_DIR})
 

	
 
# wrap UI files
 
# wrap UI and resource files
 
qt5_wrap_ui(UI_FILES mainwindow.ui portcontrol.ui about_dialog.ui)
 
qt5_add_resources(RES_FILES misc/icons.qrc)
 

	
 
add_executable(${PROGRAM_NAME} WIN32
 
  main.cpp
 
@@ -64,6 +65,7 @@ add_executable(${PROGRAM_NAME} WIN32
 
  framebuffer.cpp
 
  portlist.cpp
 
  ${UI_FILES}
 
  ${RES_FILES}
 
  misc/windows_icon.rc
 
  )
 

	
misc/icons.qrc
Show inline comments
 
new file 100644
 
<RCC>
 
    <qresource prefix="/">
 
        <file>usb_icon.png</file>
 
    </qresource>
 
</RCC>
misc/usb_icon.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
portlist.cpp
Show inline comments
 
@@ -18,6 +18,7 @@
 
*/
 

	
 
#include <QVariant>
 
#include <QIcon>
 
#include <QtDebug>
 

	
 
#include "portlist.h"
 
@@ -53,6 +54,7 @@ void PortListItem::construct(QString nam
 
    {
 
        text += QString("[%1:").arg(vid, 4, 16, QChar('0'));
 
        text += QString("%1]").arg(pid, 4, 16, QChar('0'));
 
        setIcon(QIcon(":/usb_icon.png"));
 
    }
 
    setText(text);
 
    setData(name, PortNameRole);
0 comments (0 inline, 0 general)