您好,欢迎光临本网站![请登录][注册会员]  
文件名称: qt 滑屏翻页效果C++程序
  所属分类: C++
  开发工具:
  文件大小: 12kb
  下载次数: 0
  上传时间: 2011-08-05
  提 供 者: deng****
 详细说明: qt 滑屏翻页效果C++程序 #ifndef PICTUREFLOW_H #define PICTUREFLOW_H #include class PictureFlowPrivate; /*! Class PictureFlow implements an image show widget with animation effect like Apple's CoverFlow (in iTunes and iPod). Images are arranged in form of slides, one main slide is shown at the center with few slides on the left and right sides of the center slide. When the next or previous slide is brought to the front, the whole slides flow to the right or the right with smooth animation effect; unti l the new slide is finally placed at the center. */ class PictureFlow : public QWidget { Q_OBJECT Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) Q_PROPERTY(QSize slideSize READ slideSize WRITE setSlideSize) Q_PROPERTY(int slideCount READ slideCount) Q_PROPERTY(int centerIndex READ centerIndex WRITE setCenterIndex) public: enum ReflectionEffect { NoReflection, PlainReflection, BlurredReflection }; /*! Creates a new PictureFlow widget. */ PictureFlow(QWidget* parent = 0); /*! Destroys the widget. */ ~PictureFlow(); /*! Returns the background color. */ QColor backgroundColor() const; /*! Sets the background color. By default it is black. */ void setBackgroundColor(const QColor& c); /*! Returns the dimension of each slide (in pixels). */ QSize slideSize() const; /*! Sets the dimension of each slide (in pixels). */ void setSlideSize(QSize size); /*! Returns the total number of slides. */ int slideCount() const; /*! Returns QImage of specified slide. */ QImage slide(int index) const; /*! Returns the index of slide currently shown in the middle of the viewport. */ int centerIndex() const; /*! Returns the effect applied to the reflection. */ ReflectionEffect reflectionEffect() const; /*! Sets the effect applied to the reflection. The default is PlainReflection. */ void setReflectionEffect(ReflectionEffect effect); public slots: /*! Adds a new slide. */ void addSlide(const QImage& image); /*! Adds a new slide. */ void addSlide(const QPixmap& pixmap); /*! Sets an image for specified slide. If the slide already exists, it will be replaced. */ void setSlide(int index, const QImage& image); /*! Sets a pixmap for specified slide. If the slide already exists, it will be replaced. */ void setSlide(int index, const QPixmap& pixmap); /*! Sets slide to be shown in the middle of the viewport. No animation effect will be produced, unlike using showSlide. */ void setCenterIndex(int index); /*! Clears all slides. */ void clear(); /*! Shows previous slide using animation effect. */ void showPrevious(); /*! Shows next slide using animation effect. */ void showNext(); /*! Go to specified slide using animation effect. */ void showSlide(int index); /*! Rerender the widget. Normally this function will be automatically invoked whenever necessary, e.g. during the transition animation. */ void render(); /*! Schedules a rendering update. Unlike render(), this function does not cause immediate rendering. */ void triggerRender(); signals: void centerIndexChanged(int index); protected: void paintEvent(QPaintEvent *event); void keyPressEvent(QKeyEvent* event); void mousePressEvent(QMouseEvent* event); void resizeEvent(QResizeEvent* event); private slots: void updateAnimation(); private: PictureFlowPrivate* d; }; #endif // PICTUREFLOW_H ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: qt 滑屏 翻页
 输入关键字,在本站1000多万海量源码库中尽情搜索: