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
 
@@ -51,25 +51,30 @@ endif (QWT_USE_STATIC)
 
# includes
 
include_directories(${QWT_INCLUDE_DIR})
 

	
 
# wrap UI and resource files
 
qt5_wrap_ui(UI_FILES
 
  mainwindow.ui
 
  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
 
  zoomer.cpp
 
  hidabletabwidget.cpp
 
  framebuffer.cpp
 
  scalepicker.cpp
 
  scalezoomer.cpp
 
  portlist.cpp
commandpanel.cpp
Show inline comments
 
@@ -23,24 +23,28 @@
 
#include <QByteArray>
 
#include <QtDebug>
 

	
 
CommandPanel::CommandPanel(QSerialPort* port, QWidget *parent) :
 
    QWidget(parent),
 
    ui(new Ui::CommandPanel)
 
{
 
    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()
 
{
 
    delete ui;
 
}
 

	
 
void CommandPanel::newCommand()
 
{
commandwidget.cpp
Show inline comments
 
@@ -13,33 +13,37 @@
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  GNU General Public License for more details.
 

	
 
  You should have received a copy of the GNU General Public License
 
  along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#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()
 
{
 
    delete ui;
 
}
 

	
 
void CommandWidget::onDeleteClicked()
 
{
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
 
@@ -72,14 +72,17 @@ HEADERS  += mainwindow.h \
 

	
 
FORMS    += mainwindow.ui \
 
    about_dialog.ui \
 
    portcontrol.ui \
 
    snapshotview.ui \
 
    commandpanel.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)