Skip to content

Commit

Permalink
调整项目结构
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril committed Feb 15, 2019
1 parent aeb0d86 commit 87367ce
Show file tree
Hide file tree
Showing 78 changed files with 676 additions and 129 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.pro.user*
.git*
.git.*/

21 changes: 21 additions & 0 deletions .qmake.stash
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS = \
C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ \
C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \
C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward \
C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include \
C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed \
C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include
QMAKE_CXX.LIBDIRS = \
C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0 \
C:/Qt/Tools/mingw730_64/lib/gcc \
C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/lib \
C:/Qt/Tools/mingw730_64/lib
453 changes: 453 additions & 0 deletions Makefile

Large diffs are not rendered by default.

38 changes: 0 additions & 38 deletions default.qrc

This file was deleted.

99 changes: 52 additions & 47 deletions imViewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,74 @@
#
#-------------------------------------------------

QT += core gui concurrent
TEMPLATE = subdirs

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
SUBDIRS += src

TARGET = imViewer
TEMPLATE = app
CONFIG += C++11

#QT += core gui concurrent

#greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport

#TARGET = imViewer
#TEMPLATE = app
#CONFIG += C++11

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0


SOURCES += main.cpp\
mainwindow.cpp \
tools.cpp \
dialog_gaussianblur.cpp \
histogram.cpp \
dialog_linear_gray.cpp \
qcustomplot.cpp \
dialog_log_grey.cpp \
dialog_power_grey.cpp \
dialog_exp_transform.cpp \
dialog_two_threshold_transform.cpp \
dialog_stretch_transform.cpp \
gaussianblur.cpp \
medianfilter.cpp \
graphicsview.cpp
#SOURCES += main.cpp\
# mainwindow.cpp \
# tools.cpp \
# dialog_gaussianblur.cpp \
# histogram.cpp \
# dialog_linear_gray.cpp \
# qcustomplot.cpp \
# dialog_log_grey.cpp \
# dialog_power_grey.cpp \
# dialog_exp_transform.cpp \
# dialog_two_threshold_transform.cpp \
# dialog_stretch_transform.cpp \
# gaussianblur.cpp \
# medianfilter.cpp \
# graphicsview.cpp

HEADERS += mainwindow.h \
tools.h \
dialog_gaussianblur.h \
histogram.h \
dialog_linear_gray.h \
qcustomplot.h \
dialog_log_grey.h \
dialog_power_grey.h \
dialog_exp_transform.h \
dialog_two_threshold_transform.h \
dialog_stretch_transform.h \
gaussianblur.h \
medianfilter.h \
graphicsview.h
#HEADERS += mainwindow.h \
# tools.h \
# dialog_gaussianblur.h \
# histogram.h \
# dialog_linear_gray.h \
# qcustomplot.h \
# dialog_log_grey.h \
# dialog_power_grey.h \
# dialog_exp_transform.h \
# dialog_two_threshold_transform.h \
# dialog_stretch_transform.h \
# gaussianblur.h \
# medianfilter.h \
# graphicsview.h

FORMS += mainwindow.ui \
gaussianblurdialog.ui \
dialog_linear_gray.ui \
dialog_log_grey.ui \
dialog_power_grey.ui \
dialog_exp_transform.ui \
dialog_two_threshold_transform.ui \
dialog_stretch_transform.ui
#FORMS += mainwindow.ui \
# gaussianblurdialog.ui \
# dialog_linear_gray.ui \
# dialog_log_grey.ui \
# dialog_power_grey.ui \
# dialog_exp_transform.ui \
# dialog_two_threshold_transform.ui \
# dialog_stretch_transform.ui

RESOURCES += \
default.qrc
#RESOURCES += \
# default.qrc

TRANSLATIONS += cn.ts
#TRANSLATIONS += cn.ts

DISTFILES +=
#DISTFILES +=
1 change: 1 addition & 0 deletions dialog_exp_transform.cpp → src/dialog/dialog_exp_transform.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ DialogExpTransform::~DialogExpTransform()
void DialogExpTransform::on_buttonBox_accepted()
{
emit sendData(ui->bDoubleSpinBox->value(), ui->cDoubleSpinBox->value(), ui->aDoubleSpinBox->value());

}

void DialogExpTransform::paintFunctionImage(double b, double c, double a)
Expand Down
2 changes: 1 addition & 1 deletion dialog_exp_transform.h → src/dialog/dialog_exp_transform.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DialogExpTransform : public QDialog
Q_OBJECT

public:
explicit DialogExpTransform(QWidget *parent = 0);
explicit DialogExpTransform(QWidget *parent = nullptr);
~DialogExpTransform();

private:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dialog_linear_gray.h → src/dialog/dialog_linear_gray.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LinearGrayDialog : public QDialog
Q_OBJECT

public:
explicit LinearGrayDialog(QWidget *parent = 0);
explicit LinearGrayDialog(QWidget *parent = nullptr);
~LinearGrayDialog();

private:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 main.cpp → src/main.cpp
100755 → 100644
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion graphicsview.h → src/mainwindow/graphicsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GraphicsView : public QGraphicsView
int factor;

public:
GraphicsView(QWidget* parent = 0);
GraphicsView(QWidget* parent = nullptr);
~GraphicsView();

int getFactor();
Expand Down
14 changes: 9 additions & 5 deletions mainwindow.cpp → src/mainwindow/mainwindow.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);


leftScene = new QGraphicsScene;
rightScene = new QGraphicsScene;

leftPixmapItem = new QGraphicsPixmapItem();
rightPixmapItem = new QGraphicsPixmapItem();


size = new QLabel;



info = NULL;
info = nullptr;

leftScene->setBackgroundBrush(QColor::fromRgb(224,224,224));
ui->leftGraphicsView->setScene(leftScene);
Expand Down Expand Up @@ -64,21 +68,21 @@ MainWindow::~MainWindow()
if (leftScene)
{
delete leftScene;
leftScene = NULL;
leftScene = nullptr;
}

if (size)
{
delete size;
size = NULL;
size = nullptr;
}


//add
if (rightScene)
{
delete leftScene;
leftScene = NULL;
leftScene = nullptr;
}

}
Expand Down Expand Up @@ -499,7 +503,7 @@ void MainWindow::on_actionHistogram_triggered()
Histogram * hstgrm = new Histogram(scrollArea);
hstgrm->computeHstgrm(rightPixmapItem->pixmap().toImage());

if (hstgrm == NULL)
if (hstgrm == nullptr)
return;


Expand Down
25 changes: 13 additions & 12 deletions mainwindow.h → src/mainwindow/mainwindow.h
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <QMainWindow>
#include <QProcess>
#include <QGraphicsPixmapItem>
#include <QFileDialog>
#include <QMessageBox>
#include <QInputDialog>
Expand All @@ -11,17 +12,17 @@
#include <QStandardPaths>
#include <QTranslator>
#include "graphicsview.h"
#include "dialog_gaussianblur.h"
#include "tools.h"
#include "histogram.h"
#include "medianfilter.h"
#include "gaussianblur.h"
#include "dialog_linear_gray.h"
#include "dialog_log_grey.h"
#include "dialog_power_grey.h"
#include "dialog_exp_transform.h"
#include "dialog_two_threshold_transform.h"
#include "dialog_stretch_transform.h"
#include "../dialog/dialog_gaussianblur.h"
#include "../utils/tools.h"
#include "../utils/histogram.h"
#include "../utils/gaussianblur.h"
#include "../utils/medianfilter.h"
#include "../dialog/dialog_linear_gray.h"
#include "../dialog/dialog_log_grey.h"
#include "../dialog/dialog_power_grey.h"
#include "../dialog/dialog_exp_transform.h"
#include "../dialog/dialog_two_threshold_transform.h"
#include "../dialog/dialog_stretch_transform.h"

#define WINDOW_TITLE "ImageQt"
#define WINDOW_CRITICAL "Error - ImageQt"
Expand All @@ -37,7 +38,7 @@ class MainWindow : public QMainWindow
Q_OBJECT

public:
explicit MainWindow(QWidget *parent = 0);
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();

void updateRightImage(QPixmap &pixmap);
Expand Down
Loading

0 comments on commit 87367ce

Please sign in to comment.