00001 /* This file is part of Rocs, 00002 Copyright (C) 2008 by: 00003 Tomaz Canabrava <tomaz.canabrava@gmail.com> 00004 Ugo Sangiori <ugorox@gmail.com> 00005 00006 Rocs is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 Rocs is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Step; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 #ifndef ALIGNACTION_H 00021 #define ALIGNACTION_H 00022 00023 #include <KAction> 00024 #include "NodeItem.h" 00025 #include "node.h" 00026 00027 00028 class AlignAction : public KAction 00029 { 00030 Q_OBJECT 00031 public: 00033 enum Orientation {Left, Right, Top, Bottom, HCenter, VCenter}; 00034 00041 AlignAction( const QString& tooltip, AlignAction::Orientation o, QWidget* parent ); 00042 00043 private slots: 00045 void align(); 00046 00047 private: 00051 void allignY( QList<NodeItem*>& l ); 00052 00056 void allignX( QList<NodeItem*>& l ); 00057 00059 Orientation m_orientation; 00060 00061 }; 00062 00063 #endif