00001 /**************************************************************************** 00002 ** $Id: aextte.h,v 1.2 2006/07/12 10:38:05 app Exp $ 00003 ** 00004 ** Extension object header file of 00005 ** Ananas application library 00006 ** 00007 ** Created : 20031201 00008 ** 00009 ** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved. 00010 ** Copyright (C) 2003-2005 Grigory Panov, Yoshkar-Ola. 00011 ** 00012 ** This file is part of the Designer application of the Ananas 00013 ** automation accounting system. 00014 ** 00015 ** This file may be distributed and/or modified under the terms of the 00016 ** GNU General Public License version 2 as published by the Free Software 00017 ** Foundation and appearing in the file LICENSE.GPL included in the 00018 ** packaging of this file. 00019 ** 00020 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00021 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00022 ** 00023 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru 00024 ** See http://www.leaderit.ru/gpl/ for GPL licensing information. 00025 ** 00026 ** Contact org@leaderit.ru if any conditions of this licensing are 00027 ** not clear to you. 00028 ** 00029 **********************************************************************/ 00030 00031 #ifndef AEXTTE_H 00032 #define AEXTTE_H 00033 00034 #include "aextension.h" 00035 class TEBase; 00036 class QLibrary; 00037 00038 typedef QStringList (*p_te_drivers)( const QString & ); 00039 typedef bool (*p_te_driverExists)( const QString &, const QString & ); 00040 typedef TEBase *(*p_te_createDriverObject)( const QString &className ); 00041 00049 class ANANAS_EXPORT AExtTE : public AExtension 00050 { 00051 Q_OBJECT 00052 00053 public: 00054 00055 AExtTE(); 00056 ~AExtTE(); 00057 00058 public slots: 00059 QStringList drivers( const QString &baseclass ); 00060 bool driverExists( const QString &name ); 00061 QObject *newDriver( const QString &name ); 00062 protected slots: 00063 void deviceEvent( int eventCode ); 00064 private: 00065 QLibrary *telib; 00066 p_te_drivers te_drivers; 00067 p_te_driverExists te_driverExists; 00068 p_te_createDriverObject te_createDriverObject; 00069 }; 00070 00071 #endif //AEXTTE_H