PDA

View Full Version : Configuration on txt files



baray98
22nd January 2008, 07:47
I am planning to put all neccessary/configurable information to run my app in a text file

eg



################################################## ############################
#
# Information File #
################################################## ############################
# Information File Version
.INFORMATION_FILE_VERSION: 15

# PROJECT INFO
.JOB
# Job Id is used as the file name header and project name
JOBID: Sample 1
DESCRIPTION:
{
Wow this is really the best Job
}
.END

################################################## ############################
.TOOL
# Paper =1 ,Pen =2, Both = 3
TYPE: 3
# tool size in inches for diameter
SIZE: 10.75
.END
################################################## ############################
# Sensor Map
################################################## ############################
.SENSORCFG
# number of sensors per sensor tool
SENSORS: 10
# You must tell how many physical pen
NUMPEN: 20
# Sensor heads are configured using the following format:
# location #, Id #,
{
1 75
2 130
3 131
4 133
5 134
6 136
}
.END


Now, my question is , is there any Qt class that i can take advantage of , which will make my life easier in terms of reading, decoding, and saving files? (with my objective in mind)

Any suggestions will be appreciated

baray98

jpn
22nd January 2008, 08:48
Why not QSettings with built in support for INI-format?