summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/calendar/monthwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'kipi-plugins/calendar/monthwidget.h')
-rw-r--r--kipi-plugins/calendar/monthwidget.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/kipi-plugins/calendar/monthwidget.h b/kipi-plugins/calendar/monthwidget.h
new file mode 100644
index 0000000..1a79d24
--- /dev/null
+++ b/kipi-plugins/calendar/monthwidget.h
@@ -0,0 +1,77 @@
+/* ============================================================
+ * File : monthwidget.h
+ * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
+ * Date : 2003-11-03
+ * Description :
+ *
+ * Copyright 2003 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
+
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#ifndef MONTHWIDGET_H
+#define MONTHWIDGET_H
+
+// Qt includes.
+
+#include <qframe.h>
+
+// LibKipi includes
+
+#include <libkipi/interface.h>
+
+class QPainter;
+class QPixmap;
+class QDragEnterEvent;
+class QDropEvent;
+class QMouseEvent;
+
+class KURL;
+class KFileItem;
+
+namespace KIPICalendarPlugin
+{
+
+class MonthWidget : public QFrame
+{
+ Q_OBJECT
+
+public:
+
+ MonthWidget( KIPI::Interface* interface, QWidget *parent, int month);
+ ~MonthWidget();
+
+ KURL imagePath();
+ void setImage( const KURL& url );
+
+protected:
+
+ void drawContents(QPainter *p);
+ void dragEnterEvent(QDragEnterEvent* event);
+ void dropEvent(QDropEvent* event);
+ void mouseReleaseEvent(QMouseEvent* e);
+
+private:
+
+ int month_;
+ KURL imagePath_;
+ QPixmap *pixmap_;
+ KIPI::Interface* interface_;
+private slots:
+
+ void slotGotThumbnaiL(const KFileItem* url, const QPixmap& pix);
+};
+
+} // NameSpace KIPICalendarPlugin
+
+#endif /* MONTHWIDGET_H */