/* Copyright 2003 Rikard Björklind, Mikael Gransell, Arsenij Vodjanov This file is part of dc-qt. dc-qt 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. dc-qt 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 dc-qt; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include "preview_widget.h" #include "preview_dialog.h" #include "dc_settings.h" #include "util.h" using namespace std; preview_dialog::preview_dialog( QWidget* parent, const char* name ) : QDialog( parent, name ) { QGridLayout *layout = new QGridLayout(this, 1,1); // Create the preview widget preview = new preview_widget( this, "Preview widget" ); layout->addWidget(preview, 0,0); // load window pos and size wnd_setting wndset(settings.get_setting("wndset_preview")); if (wndset.isValid()) { move(QPoint(wndset.x(), wndset.y())); resize(wndset.w(), wndset.h()); } else resize(600,400); } void preview_dialog::closeEvent(QCloseEvent * e) { // save window position and size wnd_setting wndset(x(), y(), width(), height()); if (wndset.isValid()) { settings.set_setting("common","wndset_preview", wndset.toString()); } e->accept(); } void preview_dialog::moveEvent(QMoveEvent *) { preview->slot_hide_mrls(); } void preview_dialog::slot_add_history_file(const QString&title, const QString &file) { preview->slot_add_history_file(title, file); } void preview_dialog::slot_play_file(const QString&title, const QString&file) { preview->slot_play_file(title, file); } /* * * $Log: preview_dialog.cc,v $ * Revision 1.5 2004/08/23 08:49:05 estrato * docs path honors prefix, corrected fullscreen bug in preview * * Revision 1.4 2004/03/17 16:43:02 olof * connection profiles * * Revision 1.3 2004/03/10 03:16:18 estrato * working on preview widget * * Revision 1.2 2004/03/06 13:34:40 estrato * working on preview widget * * Revision 1.1 2004/03/05 15:40:02 estrato * working on preview widget * * */