mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
19d5dd8ec7
Source files are no longer separated by UI and non-UI and similar, but only by their build target. * ui/ -> part/ * Move all source files from conf/ to part/ * Keep config skeleton definitions in conf/, needed for the mobile target too * Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/ * ui/data/icons/ -> icons/ * Move /part.cpp, /part.rc and similar files to part/ * Adapt include paths in source files * Adapt CMakeLists.txt files (in / and in subdirectories) * Adapt /Messages.sh
57 lines
1.6 KiB
C++
57 lines
1.6 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
* *
|
|
* 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 of the License, or *
|
|
* (at your option) any later version. *
|
|
***************************************************************************/
|
|
|
|
#ifndef _SIDEBAR_H_
|
|
#define _SIDEBAR_H_
|
|
|
|
#include "okularpart_export.h"
|
|
#include <qwidget.h>
|
|
|
|
class QIcon;
|
|
class QListWidgetItem;
|
|
|
|
class OKULARPART_EXPORT Sidebar : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit Sidebar(QWidget *parent = nullptr);
|
|
~Sidebar() override;
|
|
|
|
int addItem(QWidget *widget, const QIcon &icon, const QString &text);
|
|
|
|
void setMainWidget(QWidget *widget);
|
|
void setBottomWidget(QWidget *widget);
|
|
|
|
void setCurrentItem(QWidget *widget);
|
|
QWidget *currentItem() const;
|
|
|
|
void setSidebarVisibility(bool visible);
|
|
bool isSidebarVisible() const;
|
|
|
|
void moveSplitter(int sideWidgetSize);
|
|
|
|
Q_SIGNALS:
|
|
void urlsDropped(const QList<QUrl> &urls);
|
|
|
|
protected:
|
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
|
void dropEvent(QDropEvent *event) override;
|
|
|
|
private Q_SLOTS:
|
|
void splitterMoved(int pos, int index);
|
|
|
|
private:
|
|
void saveSplitterSize() const;
|
|
|
|
// private storage
|
|
class Private;
|
|
Private *d;
|
|
};
|
|
|
|
#endif
|