[go: up one dir, main page]

Menu

[r303]: / messages.h  Maximize  Restore  History

Download this file

99 lines (80 with data), 2.7 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
/* Marcion
Copyright (C) 2009 - 2011 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; version 2 of the License.
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 */
#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 "ui_messages.h"
#include <mysql.h>
#include "outstr.h"
#include "cmysql.h"
class CSettings;
class CLibBase;
class CLibSearchBase;
//
class CMessages : public QWidget, public Ui::frmMessages
{
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, Qt::WFlags f = 0 );
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;
private slots:
private:
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