15 #include <q3textbrowser.h> 16 #include <qlineedit.h> 17 #include <q3listbox.h> 19 #include <qstringlist.h> 21 #include <qpushbutton.h> 22 #include <q3filedialog.h> 25 #include <Q3GridLayout> 30 #include "../clickableLabel.h" 31 #include "../../config.h" 42 setCaption( actionMessage );
53 boldFont.setWeight(QFont::Bold);
62 QToolTip::add(
browseButton, tr(
"Browse to save destination") );
76 QToolTip::add(
themesList, tr(
"Select theme for saving album") );
78 QStringList list = localDir.entryList( QDir::Dirs );
79 bool itemsAdded =
false;
80 QStringList::Iterator file;
81 for ( file = list.begin(); file != list.end(); ++file )
83 if(localDir.exists( QString(*file) +
"/theme.xsl" ))
91 bool themeFound =
false;
102 if(!themeFound && itemsAdded )
123 QToolTip::add(
themeScreenPrev, tr(
"View previous theme screenshot") );
132 themeFeatures->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
154 QPixmap(QString(
IMAGE_PATH)+
"buttonIcons/save.png"),
157 saveButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
163 QPixmap(QString(
IMAGE_PATH)+
"buttonIcons/button_cancel.png"),
167 cancelButton->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
177 mainGrid =
new Q3GridLayout(
this, 3, 2, 0);
191 setFixedSize(size());
199 while( localDir.exists( QString(
themesList->currentText() +
"/preview%1.png").arg(i) ) ) { i++; }
203 if(localDir.exists(
themesList->currentText() +
"/description.html" ))
209 if(localDir.exists(
themesList->currentText() +
"/preview1.png") )
259 QString dirName = Q3FileDialog::getSaveFileName(
locationVal->text(),
260 NULL,
this, NULL, QString(tr(
"Save as")) );
262 if(!dirName.isNull())
282 if( dlg->exec() == QDialog::Accepted )
302 QStringList list = localDir.entryList( QDir::Dirs );
303 QStringList::Iterator file;
304 for ( file = list.begin(); file != list.end(); ++file )
306 if(localDir.exists( QString(*file) +
"/theme.xsl") &&
307 QString(*file) == theme)
Q3TextBrowser * themeFeatures
Q3Frame * themePreviewFrame
void setPixmap(const QPixmap &p)
QPushButton * cancelButton
static bool selectThemeAndPath(QString titleMessage, QString defaultPath, QString &theme, QString &path)
static bool themeAvailable(QString theme)
Q3Frame * themeSelectionFrame
Q3GridLayout * locationGrid
ClickableLabel * themeScreenPrev
Q3GridLayout * themeSelectionGrid
Q3GridLayout * buttonsGrid
ClickableLabel * browseButton
QLabel * themePreviewLabel
SaveDialog(QString actionMessage, QString defaultPath, QString defaultTheme, QWidget *parent=0, const char *name=0)
void setInvisible(bool val)
Q3GridLayout * themePreviewGrid
ClickableLabel * themeScreenNext