Changeset 10790
- Timestamp:
- Jun 17, 2010, 5:56:48 AM (13 years ago)
- Location:
- trunk/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/mainwin.cc
r10770 r10790 91 91 myStatsDialog( new StatsDialog( session, this ) ), 92 92 myDetailsDialog( 0 ), 93 myFileDialog( 0 ),94 93 myFilterModel( prefs ), 95 94 myTorrentDelegate( new TorrentDelegate( this ) ), … … 1113 1112 TrMainWindow :: openTorrent( ) 1114 1113 { 1115 if( myFileDialog == 0 ) 1116 { 1117 myFileDialog = new QFileDialog( this, 1118 tr( "Add Torrent" ), 1119 myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ), 1120 tr( "Torrent Files (*.torrent);;All Files (*.*)" ) ); 1121 myFileDialog->setFileMode( QFileDialog::ExistingFiles ); 1122 1123 1124 QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) ); 1125 button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) ); 1126 QGridLayout * layout = dynamic_cast<QGridLayout*>(myFileDialog->layout()); 1127 layout->addWidget( button, layout->rowCount( ), 0, 1, -1, Qt::AlignLeft ); 1128 myFileDialogOptionsCheck = button; 1129 1130 connect( myFileDialog, SIGNAL(filesSelected(const QStringList&)), 1131 this, SLOT(addTorrents(const QStringList&))); 1132 } 1114 QFileDialog * myFileDialog; 1115 myFileDialog = new QFileDialog( this, 1116 tr( "Add Torrent" ), 1117 myPrefs.getString( Prefs::OPEN_DIALOG_FOLDER ), 1118 tr( "Torrent Files (*.torrent);;All Files (*.*)" ) ); 1119 myFileDialog->setFileMode( QFileDialog::ExistingFiles ); 1120 1121 QCheckBox * button = new QCheckBox( tr( "Show &options dialog" ) ); 1122 button->setChecked( myPrefs.getBool( Prefs::OPTIONS_PROMPT ) ); 1123 QGridLayout * layout = dynamic_cast<QGridLayout*>(myFileDialog->layout()); 1124 layout->addWidget( button, layout->rowCount( ), 0, 1, -1, Qt::AlignLeft ); 1125 myFileDialogOptionsCheck = button; 1126 1127 connect( myFileDialog, SIGNAL(filesSelected(const QStringList&)), 1128 this, SLOT(addTorrents(const QStringList&))); 1133 1129 1134 1130 myFileDialog->show( ); -
trunk/qt/mainwin.h
r10630 r10790 16 16 #include <ctime> 17 17 #include <QCheckBox> 18 #include <QFileDialog>19 18 #include <QLineEdit> 20 19 #include <QIcon> 21 20 #include <QMainWindow> 22 21 #include <QMap> 22 #include <QPushButton> 23 23 #include <QSet> 24 24 #include <QSystemTrayIcon> … … 61 61 QDialog * myStatsDialog; 62 62 Details * myDetailsDialog; 63 QFileDialog * myFileDialog;64 63 QCheckBox * myFileDialogOptionsCheck; 65 64 QSystemTrayIcon myTrayIcon;
Note: See TracChangeset
for help on using the changeset viewer.