Home · All Namespaces · All Classes |
00001 /*************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of mhome. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 00020 #ifndef LAYOUTVISUALIZATIONWRAPPER_H 00021 #define LAYOUTVISUALIZATIONWRAPPER_H 00022 00023 #include <QtGlobal> 00024 00025 class QGraphicsLinearLayout; 00026 00041 class LayoutVisualizationWrapper 00042 { 00043 public: 00048 LayoutVisualizationWrapper(QGraphicsLinearLayout &layout); 00049 00053 virtual ~LayoutVisualizationWrapper(); 00054 00058 enum WrappingMode { 00059 NoWrap, 00060 WrapRightEdgeToLeft, 00061 WrapLeftEdgeToRight 00062 }; 00063 00068 void setWrappingMode(WrappingMode mode); 00069 00070 private: 00072 const QGraphicsLinearLayout &layout; 00073 00075 WrappingMode wrappingMode; 00076 00078 qreal previousParentLayoutWidth; 00079 00081 enum Direction { 00082 Left, 00083 Right 00084 }; 00085 00090 void resetTransformation(int layoutIndex) const; 00091 00098 void setTransformation(int layoutIndex, Direction direction); 00099 00103 qreal parentLayoutWidth() const; 00104 }; 00105 00106 #endif // LAYOUTVISUALIZATIONWRAPPER_H
Copyright © 2011 Nokia Corporation | Generated on Thu Jul 7 2011 22:14:50 Doxygen 1.7.1 |
MeeGo Touch |