Warning, file /multimedia/stopmotion/src/application/editmenuhandler.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /***************************************************************************
0002  *   Copyright (C) 2005-2014 by Linuxstopmotion contributors;              *
0003  *   see the AUTHORS file for details.                                     *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU General Public License     *
0016  *   along with this program; if not, write to the                         *
0017  *   Free Software Foundation, Inc.,                                       *
0018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
0019  ***************************************************************************/
0020 #ifndef EDITMENUHANDLER_H
0021 #define EDITMENUHANDLER_H
0022 
0023 #include <QObject>
0024 
0025 class FrameBar;
0026 class QStatusBar;
0027 class QWidget;
0028 
0029 /**
0030  * This class handles request related to the editmenu (undo, redo, copy, cut, etc)
0031  *
0032  * @author Bjoern Erik Nilsen & Fredrik Berg Kjoelstad
0033  */
0034 class EditMenuHandler : public QObject
0035 {
0036     Q_OBJECT
0037 public:
0038     /**
0039      * Creates and initializes the Soundhandler.
0040      * @param parent the parent of the soundhandler.
0041      * @param sb a statusbar for displaying status information to the user.
0042      * @param frameBar the frameBar containing thumbnails
0043      * @param name the name of the soundhandler
0044      */
0045     EditMenuHandler( QObject *parent = 0, QStatusBar *sb = 0, FrameBar *frameBar = 0, 
0046             const char *name = 0 );
0047     
0048     
0049     /**
0050      * Sets the gotoMenu property so that it can be closed.
0051      * @param gotoMenu the gotoMenu.
0052      */
0053     void setGotoMenu(QWidget *gotoMenu);
0054 
0055 public slots:
0056     
0057     /**
0058      * Goes to the frame with the number frameNumber on the framebar.
0059      * @param frameNumber the number of the frame to go to.
0060      */
0061     void gotoFrame(int frameNumber);
0062     
0063     /**
0064      * Closes the goto menu and moves the focus to the mainwindowgui.
0065      */
0066     void closeGotoMenu();
0067     
0068     /**
0069      * Undoes the last undoable operation the user have done.
0070      */
0071     void undo();
0072     
0073     /**
0074      * Redoes the last undo the user have done.
0075      */
0076     void redo();
0077 
0078     /**
0079      * Copies and deletes the section.
0080      */
0081     void cut();
0082 
0083     /**
0084      * Copies a selection to the global clipboard.
0085      */
0086     void copy();
0087     
0088     /**
0089      * Pastes a selection from the global clipboard to the program.
0090      */
0091     void paste();
0092     
0093 private:
0094     QStatusBar *statusBar;
0095     FrameBar *frameBar;
0096     QWidget *gotoMenu;
0097     
0098 signals:
0099     /**
0100      * Adds the frames pointed to by a list.
0101      * @param l the list containing pointers to the frames
0102      */
0103     void addFrames(const QStringList &l);
0104     /**
0105      * Removes the frames in the selection.
0106      */
0107     void removeFrames();
0108     /**
0109      * Undo or redo has happened
0110      */
0111     void undoOrRedo();
0112 };
0113 
0114 #endif