diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
commit | 5de3dd4762ca33a0f92e79ffa4fe2ff67069d531 (patch) | |
tree | bad482b7afa4cdf47422d60a5dd2c61c7e333b09 /src/languages/processchain.h | |
download | ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.tar.gz ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.zip |
Added KDE3 version of ktechlab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1095338 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/languages/processchain.h')
-rw-r--r-- | src/languages/processchain.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/src/languages/processchain.h b/src/languages/processchain.h new file mode 100644 index 0000000..90b871e --- /dev/null +++ b/src/languages/processchain.h @@ -0,0 +1,127 @@ +/*************************************************************************** + * Copyright (C) 2005 by David Saxton * + * david@bluehaze.org * + * * + * 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 PROCESSCHAIN_H +#define PROCESSCHAIN_H + +#include "language.h" +#include <qobject.h> +#include <qvaluelist.h> + +class FlowCode; +class Gpasm; +class Gpdasm; +class Gplib; +class Gplink; +class KTechlab; +class Microbe; +class PicProgrammer; +class ProcesOptions; +class SDCC; + +typedef QValueList<ProcessOptions> ProcessOptionsList; + +/** +@author Daniel Clarke +@author David Saxton +*/ +class ProcessChain : public QObject +{ + Q_OBJECT + public: + ProcessChain( ProcessOptions options, KTechlab *parent, const char *name = 0l ); + ~ProcessChain(); + + void setProcessOptions( ProcessOptions options ) { m_processOptions = options; } + + public slots: + /** + * Adds the output file to project if requested in the options, and opens + * the file in a code editor. Called to signal that a language in the last + * step of a compile has finished its compiling successfully. + */ + void slotFinishedCompile( Language * language ); + /** + * Call to compile a file of one type all the way to another type. This + * uses the ProcessOptions given in the constructor of this function, or + * later in setProcessOptions. + */ + void compile(); + + signals: + /** + * Emitted when compiling has successfully gone all the way through to the + * specified 'typeTo' + * @param options The ProcessOptions holding the output filename + * @see compile + */ + void successful(ProcessOptions options); + /** + * Convenience signal + */ + void successful(); + /** + * Emitted if not successful + */ + void failed(); + + protected: + FlowCode * flowCode(); + Gpasm * gpasm(); + Gpdasm * gpdasm(); + Gplib * gplib(); + Gplink * gplink(); + Microbe * microbe(); + PicProgrammer * picProgrammer(); + SDCC * sdcc(); + + int m_errorCount; + ProcessOptions m_processOptions; + KTechlab * m_pKTechlab; + + private: + FlowCode * m_pFlowCode; + Microbe * m_pMicrobe; + Gpasm * m_pGpasm; + Gpdasm * m_pGpdasm; + Gplib * m_pGplib; + Gplink * m_pGplink; + PicProgrammer * m_pPicProgrammer; + SDCC * m_pSDCC; +}; + + +class ProcessListChain : public QObject +{ + Q_OBJECT + + public: + ProcessListChain( ProcessOptionsList pol, KTechlab *parent, const char *name = 0l ); + + signals: + /** + * Emitted if successful + */ + void successful(); + /** + * Emitted if not successful + */ + void failed(); + + protected slots: + void slotProcessChainSuccessful(); + void slotProcessChainFailed(); + + protected: + ProcessOptionsList m_processOptionsList; + KTechlab * m_pKTechlab; +}; + +#endif |