Fixes: coreplugin: small fixes

Details:  comments & codestyle
This commit is contained in:
hjk
2009-01-26 15:27:04 +01:00
parent a438a853f3
commit 64f2d9f3d6
10 changed files with 82 additions and 68 deletions

View File

@@ -44,41 +44,51 @@ namespace Core {
class IMode;
class RightPaneWidget;
// TODO: The right pane works only for the help plugin atm.
// It can't cope with more than one plugin publishing objects they want in the right pane
// For that the API would need to be different. (Might be that instead of adding objects
// to the pool, there should be a method RightPaneWidget::setWidget(QWidget *w)
// Anyway if a second plugin wants to show something there, redesign this API
// TODO: The right pane works only for the help plugin atm. It can't cope
// with more than one plugin publishing objects they want in the right pane
// For that the API would need to be different. (Might be that instead of
// adding objects to the pool, there should be a method
// RightPaneWidget::setWidget(QWidget *w) Anyway if a second plugin wants to
// show something there, redesign this API
class CORE_EXPORT RightPanePlaceHolder : public QWidget
{
friend class Core::RightPaneWidget;
Q_OBJECT
public:
RightPanePlaceHolder(Core::IMode *mode, QWidget *parent = 0);
~RightPanePlaceHolder();
static RightPanePlaceHolder *current();
private slots:
void currentModeChanged(Core::IMode *);
private:
void applyStoredSize(int width);
Core::IMode *m_mode;
static RightPanePlaceHolder* m_current;
};
class CORE_EXPORT BaseRightPaneWidget : public QObject
{
Q_OBJECT
public:
BaseRightPaneWidget(QWidget *widget);
~BaseRightPaneWidget();
QWidget *widget() const;
private:
QWidget *m_widget;
};
class CORE_EXPORT RightPaneWidget : public QWidget
{
Q_OBJECT
public:
RightPaneWidget();
~RightPaneWidget();
@@ -89,11 +99,13 @@ public:
bool isShown();
void setShown(bool b);
static RightPaneWidget* instance();
static RightPaneWidget *instance();
int storedWidth();
protected:
void resizeEvent(QResizeEvent *);
private slots:
void objectAdded(QObject *obj);
void aboutToRemoveObject(QObject *obj);