~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to src/tomodeleditor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes
  • Date: 2009-09-11 12:37:52 UTC
  • mfrom: (1.2.8 upstream) (3.3.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090911123752-qhu322xlclo2hpqu
Tags: 2.1.0-1
* New upstream version, the rebuild closes: #540046.
* Bumped Standards-Version to 3.8.3, no changes needed.
* New project homepage.
* Removed no longer needed 01_missing_includes.dpatch.
* Removed no longer used dh_desktop call.
* Added README.source file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
56
56
#include <QKeyEvent>
57
57
#include <QVBoxLayout>
58
 
#include <QDesktopWidget>
 
58
#include <QDialogButtonBox>
59
59
#include <QSettings>
60
60
#include <QAbstractItemModel>
61
61
 
 
62
#include <cstdio>
 
63
 
62
64
#include "icons/commit.xpm"
63
65
#include "icons/copy.xpm"
 
66
#include "icons/wordwrap.xpm"
64
67
#include "icons/cut.xpm"
65
68
#include "icons/fileopen.xpm"
66
69
#include "icons/filesave.xpm"
136
139
                                           Model(model)
137
140
{
138
141
    setModal(modal);
139
 
    setMinimumSize(400, 300);
140
 
    QDesktopWidget *paramDesktop = new QDesktopWidget;
141
 
    setMaximumWidth(paramDesktop->availableGeometry(this).width()*2 / 3);
142
142
 
143
143
    setWindowTitle("Memo Editor");
144
144
 
160
160
    Editor->setReadOnly(!Editable);
161
161
    Editor->setFocus();
162
162
 
 
163
    QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, Qt::Horizontal, this);
 
164
    vbox->addWidget(buttonBox);
 
165
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
 
166
 
163
167
    if (Editable)
164
168
    {
165
169
        Toolbar->addAction(QIcon(QPixmap(const_cast<const char**>(commit_xpm))),
213
217
            SLOT(setEnabled(bool)));
214
218
    act->setEnabled(false);
215
219
 
 
220
    QAction * WordWrapAct = new QAction(QIcon(QPixmap(const_cast<const char**>(wordwrap_xpm))),
 
221
                                         tr("Word Wrap"), Toolbar);
 
222
    WordWrapAct->setCheckable(true);
 
223
    connect(WordWrapAct, SIGNAL(toggled(bool)),
 
224
             Editor, SLOT(setWordWrap(bool)));
 
225
             Toolbar->addAction(WordWrapAct);
 
226
 
216
227
    if (Editable)
217
228
    {
218
229
        Toolbar->addAction(QIcon(QPixmap(const_cast<const char**>(paste_xpm))),