mainwindow.h

00001 /***************************************************************************
00002  *
00003  *   ::::_audioeditor_::::
00004  *   a simple multitrack audio editor
00005  *
00006  *   mainwindow
00007  *   header file
00008  *
00009  *   begin                : Jan 2006
00010  *   copyright            : (C) 2006 by Georg Holzmann
00011  *   email                : grh@mur.at
00012  *
00013  *   This program is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License as published by
00015  *   the Free Software Foundation; either version 2 of the License, or
00016  *   (at your option) any later version.
00017  *
00018  ***************************************************************************/
00019 
00020 #ifndef MAINWINDOW_H__
00021 #define MAINWINDOW_H__
00022 
00023 #include <QMainWindow>
00024 #include "globaldefines.h"
00025 
00026 class QAction;
00027 class QMenu;
00028 class AudioCtl;
00029 class TrackManager;
00030 
00037 class MainWindow : public QMainWindow
00038 {
00039     Q_OBJECT
00040 
00041   public:
00042     MainWindow();
00043     virtual ~MainWindow();
00044 
00045   protected:
00046     void closeEvent(QCloseEvent *event);
00047 
00048   private slots:
00049     void newFile();
00050     void open();
00051     bool save();
00052     bool saveAs();
00053     void about();
00054     void documentWasModified();
00055     void playSlot();
00056     void stopSlot();
00057 
00058   private:
00059     
00070     void readSettings();
00071     
00082     void writeSettings();
00083 
00088     bool maybeSave();
00089     
00090     void createActions();
00091     void createMenus();
00092     void createToolBars();
00093     void createStatusBar();
00094     
00095     void loadFile(const QString &fileName);
00096     bool saveFile(const QString &fileName);
00097     void setCurrentFile(const QString &fileName);
00098     QString strippedName(const QString &fullFileName);
00099 
00101     TrackManager *m_trackmanager;
00102     
00104     AudioCtl *m_audioctl;
00105     
00107     QString m_curFile;
00108 
00109     QMenu *fileMenu;
00110     QMenu *editMenu;
00111     QMenu *playbackMenu;
00112     QMenu *helpMenu;
00113     QToolBar *fileToolBar;
00114     QToolBar *editToolBar;
00115     QToolBar *playbackToolBar;
00116     QAction *newAct;
00117     QAction *openAct;
00118     QAction *saveAct;
00119     QAction *saveAsAct;
00120     QAction *exitAct;
00121     QAction *cutAct;
00122     QAction *copyAct;
00123     QAction *pasteAct;
00124     QAction *playAct;
00125     QAction *stopAct;
00126     QAction *aboutAct;
00127     
00129     bool m_stopped;
00130 };
00131 
00132 #endif // MAINWINDOW_H__

Generated on Fri Jul 6 12:38:40 2007 for audioeditor.kdevelop by  doxygen 1.5.2