source: projects/punch-card-project/trunk/punch-card-editor/src/qpunchcard/format.cc @ 59

Last change on this file since 59 was 59, checked in by sven-win, 14 years ago

Umfangreiche Weiterentwicklung (letzte Entwicklung am Netbook). Driver fuer M200 erstmals testweise implementiert; funktioniert(e mit Netbook).

-- Sven @ netboo

File size: 889 bytes
Line 
1#include <QDebug>
2
3#include "format.h"
4
5// formats
6#include "qpunchcard/jones.h"
7
8using namespace QPunchCard;
9
10QList<QString> FileFormatFactory::availableFormats() {
11        QList<QString> ret;
12        ret << "Jones Emulated Card Deck File" << "Punch Card Markup Language File";
13        return ret;
14}
15
16FileFormat FileFormatFactory::createFormat(const QString& name) {
17        if(name == "Jones Emulated Card Deck File") {
18                JonesFileFormat f;
19                f.name = "Jones Emulated Card Deck File";
20                return f;
21        } if(name == "Punch Card Markup Language File") {
22                PunchCardMarkupLanguageFormat f;
23                f.name = "Punch Card Markup Language File";
24                return f;
25        } else {
26                qDebug() << "FileFormatFactory: Invalid createFormat name: " << name;
27                FileFormat f;
28                return f;
29        }
30}
31
32QString FileFormatFactory::autoDetectFormat(const QFile&) {
33        // spaeter per magic bytes-Erkennung machen
34        return QString("Jones Emulated Card Deck File");
35}
36
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License