• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

positioningruler.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2008 Marco Martin <notmart@gmail.com>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #ifndef POSITIONINGRULER_H
00021 #define POSITIONINGRULER_H 
00022 
00023 #include <QWidget>
00024 
00025 #include <plasma/plasma.h>
00026 
00027 
00028 
00029 namespace Plasma
00030 {
00031     class Containment;
00032 }
00033 
00034 class PositioningRuler : public QWidget
00035 {
00036 Q_OBJECT
00037 public:
00038     PositioningRuler(QWidget* parent = 0);
00039     ~PositioningRuler();
00040 
00041     QSize sizeHint() const;
00042 
00043     void setLocation(const Plasma::Location &loc);
00044     Plasma::Location location() const;
00045 
00046     void setAlignment(const Qt::Alignment &align);
00047     Qt::Alignment alignment() const;
00048 
00049     void setOffset(int newOffset);
00050     int offset() const;
00051 
00052     void setMaxLength(int newMax);
00053     int maxLength() const;
00054 
00055     void setMinLength(int newMin);
00056     int minLength() const;
00057 
00058     void setAvailableLength(int newAvailable);
00059     int availableLength() const;
00060 
00061 protected:
00062     bool event(QEvent *ev);
00063     void paintEvent(QPaintEvent *event);
00064     void wheelEvent(QWheelEvent *event);
00065     void mousePressEvent(QMouseEvent *event);
00066     void mouseReleaseEvent(QMouseEvent *event);
00067     void mouseMoveEvent(QMouseEvent *event);
00068     void resizeEvent(QResizeEvent *event);
00069 
00070 Q_SIGNALS:
00071      void rulersMoved(int offset, int minLength, int maxLength);
00072 
00073 private:
00074     class Private;
00075     Private *d;
00076 };
00077 
00078 
00079 #endif // multiple inclusion guard
00080 

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal