20 #include "gschecker.h"
21 #include "kpipeprocess.h"
24 #include <tqtextstream.h>
26 GsChecker::GsChecker(TQObject *parent,
const char *name)
27 : TQObject(parent,name)
31 bool GsChecker::checkGsDriver(
const TQString& name)
33 if (m_driverlist.count() == 0)
35 return m_driverlist.contains(name);
38 void GsChecker::loadDriverList()
41 if (proc.open(
"gs -h",IO_ReadOnly))
44 TQString buffer, line;
48 line = t.readLine().stripWhiteSpace();
51 if (line.find(
':') != -1)
54 buffer.append(line).append(
" ");
56 else if (line.startsWith(TQString::fromLatin1(
"Available devices:")))
59 m_driverlist = TQStringList::split(
' ',buffer,
false);