/** * @RDE_HEADER@ * ScopedConnection * $Id$ * $HeadURL$ * $Author$ * Created by Christian Fröbel, SLSE, 2017-07-24 */ #pragma once #include #include namespace LtsUtils { class IConnection; /** * A small janitor that connects the given IConnection in the constructor * and disconnects it in the destructor. * @author Christian Fröbel */ class LTSUTILSCORE_EXPORT ScopedConnection { public: explicit ScopedConnection(IConnection *connection, Qt::ConnectionType = Qt::AutoConnection); ~ScopedConnection(); private: IConnection *m_conn; }; } // namespace LtsUtils