Changeset - d9497a51e102
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 10 years ago 2015-10-18 05:25:50
hy@ozderya.net
added list-add and list-remove icons (from Tango icon project) for windows
8 files changed with 28 insertions and 3 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -57,13 +57,18 @@ qt5_wrap_ui(UI_FILES
 
  portcontrol.ui
 
  about_dialog.ui
 
  snapshotview.ui
 
  commandpanel.ui
 
  commandwidget.ui
 
  )
 

	
 
if (WIN32)
 
  qt5_add_resources(RES_FILES misc/icons.qrc misc/winicons.qrc)
 
else (WIN32)
 
qt5_add_resources(RES_FILES misc/icons.qrc)
 
endif (WIN32)
 

	
 
add_executable(${PROGRAM_NAME} WIN32
 
  main.cpp
 
  mainwindow.cpp
 
  portcontrol.cpp
 
  plot.cpp
commandpanel.cpp
Show inline comments
 
@@ -29,12 +29,16 @@ CommandPanel::CommandPanel(QSerialPort* 
 
{
 
    serialPort = port;
 

	
 
    ui->setupUi(this);
 
    ui->scrollAreaWidgetContents->setLayout(new QVBoxLayout);
 

	
 
#ifdef Q_OS_WIN
 
    ui->pbNew->setIcon(QIcon(":/icons/list-add"));
 
#endif // Q_OS_WIN
 

	
 
    connect(ui->pbNew, &QPushButton::clicked, this, &CommandPanel::newCommand);
 

	
 
    newCommand(); // add an empty slot by default
 
}
 

	
 
CommandPanel::~CommandPanel()
commandwidget.cpp
Show inline comments
 
@@ -19,21 +19,25 @@
 

	
 
#include "commandwidget.h"
 
#include "ui_commandwidget.h"
 

	
 
#include <QRegExp>
 
#include <QRegExpValidator>
 

	
 
#include <QtDebug>
 
#include <QIcon>
 

	
 
CommandWidget::CommandWidget(QWidget *parent) :
 
    QWidget(parent),
 
    ui(new Ui::CommandWidget)
 
{
 
    ui->setupUi(this);
 

	
 
#ifdef Q_OS_WIN
 
    ui->pbDelete->setIcon(QIcon(":/icons/list-remove"));
 
#endif // Q_OS_WIN
 

	
 
    connect(ui->pbDelete, &QPushButton::clicked, this, &CommandWidget::onDeleteClicked);
 
    connect(ui->pbSend, &QPushButton::clicked, this, &CommandWidget::onSendClicked);
 
    connect(ui->pbASCII, &QPushButton::toggled, this, &CommandWidget::onASCIIToggled);
 
}
 

	
 
CommandWidget::~CommandWidget()
misc/tango/license_notice
Show inline comments
 
new file 100644
 
Icon files in this directory are taken from Tango project
 
(http://tango.freedesktop.org/). Please see referenced web page for
 
more information.
 
\ No newline at end of file
misc/tango/list-add.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
misc/tango/list-remove.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
misc/winicons.qrc
Show inline comments
 
new file 100644
 
<RCC>
 
    <qresource prefix="/icons">
 
        <file alias="list-add">tango/list-add.png</file>
 
        <file alias="list-remove">tango/list-remove.png</file>
 
    </qresource>
 
</RCC>
serialplot.pro
Show inline comments
 
@@ -78,8 +78,11 @@ FORMS    += mainwindow.ui \
 
    commandwidget.ui
 

	
 
INCLUDEPATH += qmake/
 

	
 
CONFIG += c++11
 

	
 
RESOURCES += \
 
    misc/icons.qrc
 
RESOURCES += misc/icons.qrc
 

	
 
win32 {
 
    RESOURCES += misc/winicons.qrc
 
}
0 comments (0 inline, 0 general)