File: bookpalette.cpp

package info (click to toggle)
scribus 1.2.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 29,928 kB
  • ctags: 8,814
  • sloc: cpp: 98,550; sh: 16,484; ansic: 10,295; perl: 2,818; makefile: 1,340; python: 1,177; xml: 83
file content (67 lines) | stat: -rw-r--r-- 2,148 bytes parent folder | download | duplicates (2)
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
/***************************************************************************
                          bookpalette.cpp  -  description
                             -------------------
    begin                : Son Jan 19 2003
    copyright            : (C) 2003 by Franz Schmid
    email                : Franz.Schmid@altmuehlnet.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#include "bookpalette.h"
#include "bookpalette.moc"
extern QPixmap loadIcon(QString nam);

/*!
 \fn BookPalette::BookPalette(QWidget* parent)
 \author Franz Schmid
 \date
 \brief Constructor for Bookmark Palette
 \param parent Parent Window
 \retval None
 */

BookPalette::BookPalette(QWidget* parent) : QDialog( parent, "Books", false, 0 )
{
	setIcon(loadIcon("AppIcon.png"));
	setCaption( tr( "Bookmarks" ) );
	PaletteLayout = new QVBoxLayout( this, 0, 0, "PaletteLayout");
	BView = new BookMView(this);
	BView->setMinimumSize(QSize(100,150));
	PaletteLayout->addWidget( BView );
}

/*!
 \fn void BookPalette::closeEvent(QCloseEvent *ce)
 \author Franz Schmid
 \date
 \brief Emits the Signal Schliessen and accepts close event. The Signal is used in ScribusApp to adjust the Menues.
 \param ce Close Event
 \retval None
 */

void BookPalette::keyPressEvent(QKeyEvent *k)
{
	if (k->key() == Key_F10)
		emit ToggleAllPalettes();
	QDialog::keyPressEvent(k);
}

void BookPalette::closeEvent(QCloseEvent *ce)
{
	emit Schliessen();
	ce->accept();
}

void BookPalette::reject()
{
	emit Schliessen();
	QDialog::reject();
}