Skip to content

Commit

Permalink
camel case classes and sources
Browse files Browse the repository at this point in the history
- camel case all classes
- camel case all source files
- ignore KDevelop settings file and directory
  • Loading branch information
steinsag committed Feb 28, 2014
1 parent d931bc0 commit f13ca17
Show file tree
Hide file tree
Showing 48 changed files with 324 additions and 322 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.swp
build
.kdev4
kbruch.kdev4
2 changes: 1 addition & 1 deletion src/AppMenuWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include <QHBoxLayout>

#include "mainqtwidget.h"
#include "MainQtWidget.h"
#include "FractionRingWidget.h"

class QHBoxLayout;
Expand Down
36 changes: 18 additions & 18 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} )

set(kbruch_SRCS
PrimeFactorsLineEdit.cpp
exercisebase.cpp
task.cpp
ratio.cpp
taskview.cpp
statisticsview.cpp
primenumber.cpp
kbruch.cpp
mainqtwidget.cpp
taskwidget.cpp
fractionbasewidget.cpp
resultwidget.cpp
exercisecompare.cpp
exercisepercentage.cpp
ExerciseBase.cpp
Task.cpp
Ratio.cpp
TaskView.cpp
StatisticsView.cpp
PrimeNumber.cpp
KBruch.cpp
MainQtWidget.cpp
TaskWidget.cpp
FractionBaseWidget.cpp
ResultWidget.cpp
ExerciseCompare.cpp
ExercisePercentage.cpp
ExerciseMixedNumbers.cpp
ratiowidget.cpp
rationalwidget.cpp
exerciseconvert.cpp
statisticsbarwidget.cpp
exercisefactorize.cpp
RatioWidget.cpp
RationalWidget.cpp
ExerciseConvert.cpp
StatisticsBarWidget.cpp
ExerciseFactorize.cpp
AppMenuWidget.cpp
FractionPainter.cpp
FractionRingWidget.cpp )
Expand Down
6 changes: 3 additions & 3 deletions src/exercisebase.cpp → src/ExerciseBase.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exercisebase.cpp
ExerciseBase.cpp
-------------------
begin : 2004/06/03
copyright : (C) 2004 by Sebastian Stein
Expand All @@ -15,8 +15,8 @@
* *
***************************************************************************/

#include "exercisebase.h"
#include "exercisebase.moc"
#include "ExerciseBase.h"
#include "ExerciseBase.moc"

/* these includes are needed for KDE support */
#include <klocale.h>
Expand Down
2 changes: 1 addition & 1 deletion src/exercisebase.h → src/ExerciseBase.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exercisebase.h
ExerciseBase.h
-------------------
begin : 2004/06/03
copyright : (C) 2004 by Sebastian Stein
Expand Down
10 changes: 5 additions & 5 deletions src/exercisecompare.cpp → src/ExerciseCompare.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exercisecompare.cpp
ExerciseCompare.cpp
-------------------
begin : 2004/06/03
copyright : (C) 2004 by Sebastian Stein
Expand All @@ -18,8 +18,8 @@
* *
***************************************************************************/

#include "exercisecompare.h"
#include "exercisecompare.moc"
#include "ExerciseCompare.h"
#include "ExerciseCompare.moc"

/* these includes are needed for KDE support */
#include <klocale.h>
Expand Down Expand Up @@ -204,12 +204,12 @@ void ExerciseCompare::update()
void ExerciseCompare::createTask()
{
// generate the first ratio
m_firstRatio = ratio(int ((double(rand()) / RAND_MAX) * 10 + 1), int ((double(rand()) / RAND_MAX) * 10 + 1));
m_firstRatio = Ratio(int ((double(rand()) / RAND_MAX) * 10 + 1), int ((double(rand()) / RAND_MAX) * 10 + 1));

// now the second ratio, but make sure, the second ratio is different from
// the first one
do {
m_secondRatio = ratio(int ((double(rand()) / RAND_MAX) * 10 + 1), int ((double(rand()) / RAND_MAX) * 10 + 1));
m_secondRatio = Ratio(int ((double(rand()) / RAND_MAX) * 10 + 1), int ((double(rand()) / RAND_MAX) * 10 + 1));
} while (m_firstRatio == m_secondRatio);

return;
Expand Down
14 changes: 7 additions & 7 deletions src/exercisecompare.h → src/ExerciseCompare.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exercisecompare.h
ExerciseCompare.h
-------------------
begin : 2004/06/03
copyright : (C) 2004 by Sebastian Stein
Expand Down Expand Up @@ -27,10 +27,10 @@
#include <kdebug.h>
#endif

#include "exercisebase.h"
#include "ratio.h"
#include "ratiowidget.h"
#include "resultwidget.h"
#include "ExerciseBase.h"
#include "Ratio.h"
#include "RatioWidget.h"
#include "ResultWidget.h"
//Added by qt3to4:
#include <QLabel>
#include <QVBoxLayout>
Expand Down Expand Up @@ -94,8 +94,8 @@ public slots:
QPushButton * m_minorButton;
QPushButton * m_equalButton;

ratio m_firstRatio;
ratio m_secondRatio;
Ratio m_firstRatio;
Ratio m_secondRatio;

// Layout Structures
QGridLayout * checkLayout;
Expand Down
50 changes: 25 additions & 25 deletions src/exerciseconvert.cpp → src/ExerciseConvert.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exerciseconvert.cpp
ExerciseConvert.cpp
-------------------
begin : 2004/06/04
copyright : (C) 2004 by Sebastian Stein
Expand All @@ -18,8 +18,8 @@
* *
***************************************************************************/

#include "exerciseconvert.h"
#include "exerciseconvert.moc"
#include "ExerciseConvert.h"
#include "ExerciseConvert.moc"

/* these includes are needed for KDE support */
#include <kglobal.h>
Expand All @@ -40,8 +40,8 @@
/* standard C++ library includes */
#include <stdlib.h>

#include "rationalwidget.h"
#include "resultwidget.h"
#include "RationalWidget.h"
#include "ResultWidget.h"
#include "settingsclass.h"

/* ----- public member functions ----- */
Expand Down Expand Up @@ -215,98 +215,98 @@ void ExerciseConvert::createTask()
case 0 : m_number = KGlobal::locale()->formatNumber(0.5, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 2);
m_result = Ratio(1, 2);
break;
case 1 : m_number = KGlobal::locale()->formatNumber(0.3, 1);
m_periodStart = 2;
m_periodLength = 1;
m_result = ratio(1, 3);
m_result = Ratio(1, 3);
break;
case 2 : m_number = KGlobal::locale()->formatNumber(0.6, 1);
m_periodStart = 2;
m_periodLength = 1;
m_result = ratio(2, 3);
m_result = Ratio(2, 3);
break;
case 3 : m_number = KGlobal::locale()->formatNumber(0.25, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 4);
m_result = Ratio(1, 4);
break;
case 4 : m_number = KGlobal::locale()->formatNumber(0.75, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(3, 4);
m_result = Ratio(3, 4);
break;
case 5 : m_number = KGlobal::locale()->formatNumber(0.2, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 5);
m_result = Ratio(1, 5);
break;
case 6 : m_number = KGlobal::locale()->formatNumber(0.4, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(2, 5);
m_result = Ratio(2, 5);
break;
case 7 : m_number = KGlobal::locale()->formatNumber(0.6, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(3, 5);
m_result = Ratio(3, 5);
break;
case 8 : m_number = KGlobal::locale()->formatNumber(0.8, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(4, 5);
m_result = Ratio(4, 5);
break;
case 9 : m_number = KGlobal::locale()->formatNumber(0.16, 2);
m_periodStart = 3;
m_periodLength = 1;
m_result = ratio(1, 6);
m_result = Ratio(1, 6);
break;
case 10 : m_number = KGlobal::locale()->formatNumber(0.142857, 6);
m_periodStart = 2;
m_periodLength = 6;
m_result = ratio(1, 7);
m_result = Ratio(1, 7);
break;
case 11 : m_number = KGlobal::locale()->formatNumber(0.125, 3);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 8);
m_result = Ratio(1, 8);
break;
case 12 : m_number = KGlobal::locale()->formatNumber(0.375, 3);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(3, 8);
m_result = Ratio(3, 8);
break;
case 13 : m_number = KGlobal::locale()->formatNumber(0.1, 1);
m_periodStart = 2;
m_periodLength = 1;
m_result = ratio(1, 9);
m_result = Ratio(1, 9);
break;
case 14 : m_number = KGlobal::locale()->formatNumber(0.1, 1);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 10);
m_result = Ratio(1, 10);
break;
case 15 : m_number = KGlobal::locale()->formatNumber(0.05, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 20);
m_result = Ratio(1, 20);
break;
case 16 : m_number = KGlobal::locale()->formatNumber(0.01, 2);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 100);
m_result = Ratio(1, 100);
break;
case 17 : m_number = KGlobal::locale()->formatNumber(0.83, 2);
m_periodStart = 3;
m_periodLength = 1;
m_result = ratio(5, 6);
m_result = Ratio(5, 6);
break;
default :
case 18 : m_number = KGlobal::locale()->formatNumber(0.001, 3);
m_periodStart = 2;
m_periodLength = 0;
m_result = ratio(1, 1000);
m_result = Ratio(1, 1000);
break;
}

Expand All @@ -319,7 +319,7 @@ void ExerciseConvert::showResult()
{
QString tmp_str; /* to build a string for a label */
QPalette pal;
ratio entered_result;
Ratio entered_result;

// change the tooltip of the check button
m_checkButton->setToolTip(i18n("Click on this button to get to the next question."));
Expand Down
8 changes: 4 additions & 4 deletions src/exerciseconvert.h → src/ExerciseConvert.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exerciseconvert.h
ExerciseConvert.h
-------------------
begin : 2004/06/04
copyright : (C) 2004 by Sebastian Stein
Expand All @@ -25,8 +25,8 @@
#include <kdebug.h>
#endif

#include "exercisebase.h"
#include "ratio.h"
#include "ExerciseBase.h"
#include "Ratio.h"
//Added by qt3to4:
#include <QLabel>
#include <QVBoxLayout>
Expand Down Expand Up @@ -81,7 +81,7 @@ public slots:
QString m_number;
uint m_periodStart;
uint m_periodLength;
ratio m_result;
Ratio m_result;

// Visible components
RationalWidget * m_rationalWidget;
Expand Down
20 changes: 10 additions & 10 deletions src/exercisefactorize.cpp → src/ExerciseFactorize.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
exercisefactorize.cpp
ExerciseFactorize.cpp
-------------------
begin : 2004/06/04
copyright : (C) 2004 by Sebastian Stein
Expand All @@ -18,8 +18,8 @@
* *
***************************************************************************/

#include "exercisefactorize.h"
#include "exercisefactorize.moc"
#include "ExerciseFactorize.h"
#include "ExerciseFactorize.moc"

/* these includes are needed for KDE support */
#include <klocale.h>
Expand All @@ -40,9 +40,9 @@
#include <stdlib.h>

#include "PrimeFactorsLineEdit.h"
#include "primenumber.h"
#include "rationalwidget.h"
#include "resultwidget.h"
#include "PrimeNumber.h"
#include "RationalWidget.h"
#include "ResultWidget.h"
#include "settingsclass.h"

/* ----- public member functions ----- */
Expand Down Expand Up @@ -333,7 +333,7 @@ void ExerciseFactorize::update()
void ExerciseFactorize::createTask()
{
uint uint_number;
primenumber tmp_primenumber;
PrimeNumber tmp_primenumber;

// just pick one number out of the possible numbers to factorize
m_taskNumber = possibleTasks[uint((double(rand()) / RAND_MAX) * numberPossibleTasks)];
Expand Down Expand Up @@ -399,13 +399,13 @@ void ExerciseFactorize::showResult()
signalExerciseSolvedCorrect();

/* yes, the user entered the correct result */
m_resultWidget->setResult(ratio(), 1);
m_resultWidget->setResult(Ratio(), 1);
} else {
// emit the signal for wrong
signalExerciseSolvedWrong();

/* no, the user entered the wrong result */
m_resultWidget->setResult(ratio(), 0);
m_resultWidget->setResult(Ratio(), 0);
} /* if (entered_result == result) */

m_edit = false;
Expand Down Expand Up @@ -433,7 +433,7 @@ void ExerciseFactorize::nextTask()
// disable the factor removal button, there are no factors to be removed yet
m_removeLastFactorButton->setEnabled(false);

m_resultWidget->setResult(ratio(), -1);
m_resultWidget->setResult(Ratio(), -1);

/* clear user input */
m_factorsEntered.clear();
Expand Down
Loading

0 comments on commit f13ca17

Please sign in to comment.