19#include <QApplication>
24#include <QStyleFactory>
46 layout->setHorizontalSpacing(0);
47 layout->setVerticalSpacing(0);
48 layout->setContentsMargins(0, 3, 3, 0);
50 layout->setVerticalSpacing(0);
58 mw->setFixedSize(13, 13);
89 if (
gui()->interface_locked) {
93 if (
event->button() == Qt::LeftButton) {
104 if (
y > 0 &&
y < 5) {
113 event->setAccepted(
true);
123 if (
gui()->interface_locked) {
135 gui()->qt_settings.chat_fwidth =
static_cast<float>(
width())
136 /
gui()->mapview_wdg->width();
137 gui()->qt_settings.chat_fheight =
static_cast<float>(
height())
138 /
gui()->mapview_wdg->height();
139 gui()->qt_settings.chat_fx_pos =
static_cast<float>(p.x())
140 /
gui()->mapview_wdg->width();
141 gui()->qt_settings.chat_fy_pos =
static_cast<float>(p.y())
142 /
gui()->mapview_wdg->height();
154 if (
gui()->interface_locked) {
172 move(this->
x(), to_move.y());
182 }
else if (
ey > 0 &&
ey < 5) {
184 }
else if (
resxy && (
event->buttons() & Qt::LeftButton)) {
194 move(this->
x(), to_move.y());
201 event->setAccepted(
true);
221 mesg_table->setEditTriggers(QAbstractItemView::NoEditTriggers);
222 mesg_table->verticalHeader()->setVisible(
false);
223 mesg_table->setSelectionMode(QAbstractItemView::SingleSelection);
224 mesg_table->horizontalHeader()->setStretchLastSection(
true);
225 mesg_table->horizontalHeader()->setVisible(
false);
228 layout->setContentsMargins(0, 0, 3, 3);
233 palette.setColor(QPalette::HighlightedText,
QColor(205, 206, 173));
265 if (QApplication::mouseButtons() == Qt::LeftButton
266 || QApplication::mouseButtons() == Qt::RightButton) {
273 if (QApplication::mouseButtons() == Qt::LeftButton &&
pmsg->location_ok) {
276 if (QApplication::mouseButtons() == Qt::RightButton &&
pmsg->city_ok) {
279 if (QApplication::mouseButtons() == Qt::RightButton
281 j =
gui()->gimme_index_of(
"DDI");
282 gui()->game_tab_widget->setCurrentIndex(j);
412 gui()->infotab->msgwdg->clr();
414 for (
i = 0;
i < num;
i++) {
416 gui()->infotab->msgwdg->msg(
pmsg);
418 gui()->infotab->msgwdg->msg_update();
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
int default_size(int lines)
void mouseReleaseEvent(QMouseEvent *event)
info_tab(QWidget *parent)
void mousePressEvent(QMouseEvent *event)
void mouseMoveEvent(QMouseEvent *event)
void paintEvent(QPaintEvent *event)
void leaveEvent(QEvent *event)
void resizeEvent(QResizeEvent *event)
QTableWidget * mesg_table
void item_selected(const QItemSelection &sl, const QItemSelection &ds)
void enterEvent(QEnterEvent *event)
void paint(QPainter *painter, QPaintEvent *event)
messagewdg(QWidget *parent)
void msg(const struct message *pmsg)
#define mevent_gpos(__ev__)
void meswin_dialog_popup(bool raise)
void real_meswin_dialog_update(void *unused)
bool meswin_dialog_is_open(void)
void meswin_popup_city(int message_index)
void meswin_goto(int message_index)
int meswin_get_num_messages(void)
const struct message * meswin_get_message(int message_index)
void meswin_set_visited_state(int message_index, bool state)
struct sprite * get_event_sprite(const struct tileset *t, enum event_type event)