[go: up one dir, main page]

Menu

[r734]: / messages.h  Maximize  Restore  History

Download this file

108 lines (88 with data), 3.0 kB

  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
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
/* Marcion
Copyright (C) 2009-2016 Milan Konvicka
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifndef MESSAGES_H
#define MESSAGES_H
//
#include <QMainWindow>
#include <QStatusBar>
#include <QLabel>
#include <QTabWidget>
#include <QDockWidget>
#include <QMessageBox>
#include <QComboBox>
#include <QTextStream>
#include <QSystemTrayIcon>
#include <mysql.h>
#include "outstr.h"
#include "cmysql.h"
class CSettings;
class CLibBase;
class CLibSearchBase;
namespace Ui {
class frmMessages;
}
//
class CMessages : public QWidget
{
Q_OBJECT
public:
CMessages( QLabel *const label,
//QLabel *const libLabel,
QLabel *const iLabel,
QMainWindow * const mainw,
CSettings const * const settings,
/*QComboBox ** const crumpg,*/
QSystemTrayIcon * const tri,
CLibSearchBase & libsearch,
CLibBase & libwdg,
QWidget * parent = 0);
~CMessages();
void goToTop(),goToBottom(),appendHtml(QString const & html);
void MsgOk(), MsgErr(QString const & Msg), MsgMsg(QString const & Msg, bool sbar=false);
void MsgWarn(QString const & Msg) const;
void MsgInf(QString const & Msg,QWidget * parent=0) const;
void setMsgDisabled(bool disabled){msg_disabled=disabled;}
CSettings const & settings() const;
QSystemTrayIcon * trayIcon()
{return tri;}
//void setLibraryInfo(QString const & text)
//{libLabel->setText(text);}
//void repaintMainW();
/*QComboBox * const* crumPg()
{return _crumpg;}*/
QMainWindow * mainwindow() const {return mainw;}
QString lastError() const
{return last_error;}
QString version() const;
CLibSearchBase & libSearchWidget() const;
CLibBase & libWidget() const;
void clear() const;
void printHelp() const,printVersion() const;
void activateMessages();
private slots:
private:
Ui::frmMessages *ui;
QLabel *const label/*,* const libLabel*/,* const iLabel;
QMainWindow * const mainw;
CSettings const * const _settings;
//QComboBox ** const _crumpg;
QSystemTrayIcon * const tri;
CLibSearchBase & libsearch;
CLibBase & libwdg;
bool msg_disabled;
QString last_error;
};
void set_m_msg(CMessages *);
CMessages * m_msg();
#endif