| 1 | /*
|
|---|
| 2 | * psitoolbar.h - the Psi toolbar class
|
|---|
| 3 | * Copyright (C) 2003 Michail Pishchagin
|
|---|
| 4 | *
|
|---|
| 5 | * This program is free software; you can redistribute it and/or
|
|---|
| 6 | * modify it under the terms of the GNU General Public License
|
|---|
| 7 | * as published by the Free Software Foundation; either version 2
|
|---|
| 8 | * of the License, or (at your option) any later version.
|
|---|
| 9 | *
|
|---|
| 10 | * This program is distributed in the hope that it will be useful,
|
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 13 | * GNU General Public License for more details.
|
|---|
| 14 | *
|
|---|
| 15 | * You should have received a copy of the GNU General Public License
|
|---|
| 16 | * along with this library; if not, write to the Free Software
|
|---|
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 18 | *
|
|---|
| 19 | */
|
|---|
| 20 |
|
|---|
| 21 | #ifndef PSITOOLBAR_H
|
|---|
| 22 | #define PSITOOLBAR_H
|
|---|
| 23 |
|
|---|
| 24 | #include <qtoolbar.h>
|
|---|
| 25 |
|
|---|
| 26 | #include "common.h"
|
|---|
| 27 | #include "psiactionlist.h"
|
|---|
| 28 |
|
|---|
| 29 | class PsiCon;
|
|---|
| 30 |
|
|---|
| 31 | class PsiToolBar : public QToolBar
|
|---|
| 32 | {
|
|---|
| 33 | Q_OBJECT
|
|---|
| 34 |
|
|---|
| 35 | public:
|
|---|
| 36 | PsiToolBar(const QString &label, QMainWindow *mainWindow, QWidget *parent, bool newLine = FALSE, const char *name = 0, WFlags f = 0);
|
|---|
| 37 | PsiToolBar(QMainWindow *parent = 0, const char *name = 0);
|
|---|
| 38 | ~PsiToolBar();
|
|---|
| 39 |
|
|---|
| 40 | void setPsiCon( PsiCon *psi );
|
|---|
| 41 |
|
|---|
| 42 | PsiActionList::ActionsType type() const;
|
|---|
| 43 | void setType( PsiActionList::ActionsType );
|
|---|
| 44 | void initialize( Options::ToolbarPrefs &, bool createUniqueActions );
|
|---|
| 45 |
|
|---|
| 46 | QString group() const;
|
|---|
| 47 | int groupIndex() const;
|
|---|
| 48 | void setGroup( QString group, int index );
|
|---|
| 49 |
|
|---|
| 50 | bool isCustomizeable() const;
|
|---|
| 51 | void setCustomizeable( bool );
|
|---|
| 52 |
|
|---|
| 53 | bool isMoveable() const;
|
|---|
| 54 | void setMoveable( bool );
|
|---|
| 55 |
|
|---|
| 56 | signals:
|
|---|
| 57 | void registerAction( IconAction * );
|
|---|
| 58 |
|
|---|
| 59 | protected:
|
|---|
| 60 | void contextMenuEvent(QContextMenuEvent *e);
|
|---|
| 61 |
|
|---|
| 62 | private:
|
|---|
| 63 | class Private;
|
|---|
| 64 | Private *d;
|
|---|
| 65 | };
|
|---|
| 66 |
|
|---|
| 67 | #endif
|
|---|