/***************************************************************************
QValidator.h - description
-------------------
begin : Fri Apr 14 2000
copyright : (C) 2000 by Richard Dale
email : Richard_Dale@tipitina.demon.co.uk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QVALIDATOR_H
#define QVALIDATOR_H
#include <Foundation/NSObject.h>
#include <qtobjc/QObject.h>
#include <qtobjc/QWidget.h>
#define State int
#define Invalid 0
#define Valid 1
#define Acceptable 2
/**
*@author Richard Dale
*/
@interface QValidator : QObject
- initWithParent: (QWidget *) parent name: (NSString *) name;
- (void) dealloc;
- (State) validate: (NSString *) input position: (int) position;
- fixup: (NSString *) input;
@end
@interface QIntValidator: QValidator
- initWithParent: (QWidget *) parent name: (NSString *) name;
- initWithRangeMinValue: (int) bottom maxValue: (int) top parent: (QWidget *) parent name: (NSString *) name;
- (void) dealloc;
- (State) validate: (NSString *) input position: (int) position;
- setRangeMinValue: (int) bottom maxValue: (int) top;
@end
@interface QDoubleValidator: QValidator
- initWithParent: (QWidget *) parent name: (NSString *) name;
- initWithRangeMinValue: (double) bottom maxValue: (int) top decimals: (int) decimals parent: (QWidget *) parent name: (NSString *) name;
- (void) dealloc;
- (State) validate: (NSString *) input position: (int) position;
- setDoubleRangeMinValue: (double) bottom maxValue: (double) top decimals: (int) decimals;
@end
#endif
Documentation generated by duke@tipitina on Sat May 6 11:42:52 EDT 2000