/usr/include/qgis/qgsmessagebaritem.h is in libqgis-dev 2.8.6+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | /***************************************************************************
qgsmessagebaritem.h - description
-------------------
begin : August 2013
copyright : (C) 2013 by Denis Rouzaud
email : denis.rouzaud@gmail.com
***************************************************************************/
/***************************************************************************
* *
* 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 qgsmessagebaritem_H
#define qgsmessagebaritem_H
#include <qgsmessagebaritem.h>
#include <qgsmessagebar.h>
#include <QWidget>
#include <QIcon>
#include <QTextEdit>
#include <QHBoxLayout>
class GUI_EXPORT QgsMessageBarItem : public QWidget
{
Q_OBJECT
public:
//! make out a widget containing a message to be displayed on the bar
QgsMessageBarItem( const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = 0 );
//! make out a widget containing title and message to be displayed on the bar
QgsMessageBarItem( const QString &title, const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = 0 );
//! make out a widget containing title, message and widget to be displayed on the bar
QgsMessageBarItem( const QString &title, const QString &text, QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = 0 );
//! make out a widget containing a widget to be displayed on the bar
QgsMessageBarItem( QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent = 0 );
~QgsMessageBarItem();
QgsMessageBarItem *setText( QString text );
QgsMessageBarItem *setTitle( QString title );
QgsMessageBarItem *setLevel( QgsMessageBar::MessageLevel level );
QgsMessageBarItem *setWidget( QWidget *widget );
QgsMessageBarItem *setIcon( const QIcon &icon );
QgsMessageBarItem *setDuration( int duration );
//! returns the duration in second of the message
int duration() const { return mDuration; }
//! returns the level
QgsMessageBar::MessageLevel level() { return mLevel; }
//! returns the styleSheet
QString getStyleSheet() { return mStyleSheet; }
signals:
//! emitted when the message level has changed
void styleChanged( QString styleSheet );
private:
void writeContent();
QString mTitle;
QString mText;
QgsMessageBar::MessageLevel mLevel;
int mDuration;
QWidget *mWidget;
QIcon mUserIcon;
QHBoxLayout *mLayout;
QLabel *mLblIcon;
QString mStyleSheet;
QTextEdit *mTextEdit;
};
#endif // qgsmessagebaritem_H
|