summaryrefslogtreecommitdiffstats
path: root/konquest/int_validator.cc
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-12-11 16:15:55 +0900
committerMichele Calgaro <[email protected]>2020-12-11 16:19:06 +0900
commit5a413fcfb0c67a3f8173216352c5c87dbe3097e5 (patch)
tree2c4110256a0faa017d803c802f2e3011c2f095e4 /konquest/int_validator.cc
parent5f8a7a3105f27c7b45d98a7a6063ef561a45dd29 (diff)
downloadtdegames-5a413fcfb0c67a3f8173216352c5c87dbe3097e5.tar.gz
tdegames-5a413fcfb0c67a3f8173216352c5c87dbe3097e5.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 931f81f9fe49f3fe339bb3cb23501393bfbb2d0a)
Diffstat (limited to 'konquest/int_validator.cc')
-rw-r--r--konquest/int_validator.cc53
1 files changed, 0 insertions, 53 deletions
diff --git a/konquest/int_validator.cc b/konquest/int_validator.cc
deleted file mode 100644
index dd96ca82..00000000
--- a/konquest/int_validator.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <limits.h>
-
-#include "int_validator.h"
-#include "int_validator.moc"
-
-IntValidator::IntValidator( TQWidget *parent, const char *name ) :
- TQValidator( TQT_TQOBJECT(parent), name )
-{
-#ifdef INT_MIN
- v_bottom = INT_MIN;
-#else
- v_bottom = ~INT_MAX;
-#endif
- v_top = INT_MIN;
-}
-
-IntValidator::IntValidator( int bottom, int top, TQWidget *parent, const char *name ) :
-TQValidator( TQT_TQOBJECT(parent), name )
-{
- v_bottom = bottom;
- v_top = top;
-}
-
-IntValidator::~IntValidator() {}
-
-TQValidator::State
-IntValidator::validate( TQString &input, int & ) const
-{
- if( input.isEmpty() ) {
- return TQValidator::Valid;
- } else {
- bool ok;
-
- int value = input.toInt( &ok );
-
- if( !ok )
- return TQValidator::Invalid;
-
- if( value < v_bottom || value > v_top )
- return TQValidator::Valid;
-
- return TQValidator::Acceptable;
- }
-}
-
-void
-IntValidator::setRange( int b, int t )
-{
- v_bottom = b;
- v_top = t;
-}
-
-