Skip to content

Commit

Permalink
Radix Sorter algortihm added
Browse files Browse the repository at this point in the history
  • Loading branch information
lopespt committed Mar 17, 2015
1 parent f34e106 commit 9dfc528
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ PROJECT(QtSortingAlgorithms)
FIND_PACKAGE(Qt5Widgets)
FIND_PACKAGE(Qt5Opengl)

IF(APPLE)
INCLUDE_DIRECTORIES("/Applications/Xcode.app/Contents/Developer/Toolchains//XcodeDefault.xctoolchain/usr/include/c++/v1/")
ENDIF(APPLE)

INCLUDE_DIRECTORIES("${Qt5Widgets_INCLUDES} ${Qt5Opengl_INCLUDES}")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
SET(CMAKE_AUTOMOC ON)
ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS})

set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

Expand Down
1 change: 1 addition & 0 deletions VectorSorter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ VectorSorter::VectorSorter(QObject *parent) :
QThread(parent)
{
interval = 250;

}


Expand Down
2 changes: 2 additions & 0 deletions mainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ JanelaPrincipal::JanelaPrincipal (QWidget* parent):QMainWindow(parent)
sorters[1] = new InsertionSorter();
sorters[2] = new MergeSorter();
sorters[3] = new QuickSorter();
sorters[4] = new RadixSorter();
for(int i=0;i<N_SORTERS;i++){
QVBoxLayout *vboxInt = new QVBoxLayout();
sortViews[i] = new SortViewWidget();
Expand Down Expand Up @@ -100,6 +101,7 @@ JanelaPrincipal::JanelaPrincipal (QWidget* parent):QMainWindow(parent)
sortViews[1]->setUpperText("Insertion Sort");
sortViews[2]->setUpperText("Merge Sort");
sortViews[3]->setUpperText("Quick Sort");
sortViews[4]->setUpperText("Radix Sort");

vbox->addLayout(hbox);
updateTimer.start();
Expand Down
3 changes: 2 additions & 1 deletion mainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
#include <QApplication>
#include <InsertionSorter.h>
#include <QuickSorter.h>
#include <RadixSorter.h>
#include <TimerWidget.h>
#include <QPluginLoader>
#include <QScrollArea>
#include <QTimer>

#define N_SORTERS 4
#define N_SORTERS 5

class JanelaPrincipal:public QMainWindow
{
Expand Down

0 comments on commit 9dfc528

Please sign in to comment.