File indexing completed on 2024-04-28 04:55:39

0001 /*
0002     This file is part of Choqok, the KDE micro-blogging client
0003 
0004     SPDX-FileCopyrightText: 2008-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0007 */
0008 
0009 #ifndef UI_CHOQOK_MAINWINDOW_H
0010 #define UI_CHOQOK_MAINWINDOW_H
0011 
0012 #include <QHideEvent>
0013 
0014 #include <KXmlGuiWindow>
0015 
0016 #include "choqok_export.h"
0017 
0018 class QTimer;
0019 class QTabWidget;
0020 
0021 namespace Choqok
0022 {
0023 namespace UI
0024 {
0025 class MicroBlogWidget;
0026 
0027 class CHOQOK_EXPORT MainWindow : public KXmlGuiWindow
0028 {
0029     Q_OBJECT
0030 public:
0031     MainWindow();
0032     ~MainWindow();
0033 
0034     /**
0035     @return current active microblog widget
0036     */
0037     Choqok::UI::MicroBlogWidget *currentMicroBlog();
0038     QList<Choqok::UI::MicroBlogWidget *> microBlogsWidgetsList();
0039     void activateTab(int k);
0040 
0041 public Q_SLOTS:
0042     void showStatusMessage(const QString &message, bool isPermanent = false);
0043     void activateChoqok();
0044 
0045 Q_SIGNALS:
0046     void updateTimelines();
0047     void markAllAsRead();
0048     void removeOldPosts();
0049     void quickPostCreated();
0050     void currentMicroBlogWidgetChanged(Choqok::UI::MicroBlogWidget *widget);
0051 
0052 protected:
0053     virtual void hideEvent(QHideEvent *event) override;
0054     virtual QSize sizeHint() const override;
0055 
0056     QTabWidget *mainWidget;
0057     QTimer *timelineTimer;
0058 };
0059 
0060 }
0061 
0062 }
0063 
0064 #endif // UI_CHOQOK_MAINWINDOW_H