author | groucho <groucho> | 2003-04-13 10:29:05 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-13 10:29:05 (UTC) |
commit | 8cc217bed9c122a7c7448e2cd59bfde330dfcfad (patch) (side-by-side diff) | |
tree | f802c03bbddf54ecc541ce23bdc43da0fc8b390b /noncore/unsupported/mailit/addatt.cpp | |
parent | 64d6b3e723b9b2fc3b1f3eea6da6344c5f26ce1e (diff) | |
download | opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.zip opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.tar.gz opie-8cc217bed9c122a7c7448e2cd59bfde330dfcfad.tar.bz2 |
- Uses mime types for attachment reading
- Addresses are read from ocontactacess
Diffstat (limited to 'noncore/unsupported/mailit/addatt.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/addatt.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/noncore/unsupported/mailit/addatt.cpp b/noncore/unsupported/mailit/addatt.cpp index f279f52..c8be865 100644 --- a/noncore/unsupported/mailit/addatt.cpp +++ b/noncore/unsupported/mailit/addatt.cpp @@ -15,12 +15,13 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qlayout.h> +#include <qhbox.h> #include <qdir.h> #include <qstringlist.h> #include "resource.h" #include "addatt.h" FileItem::FileItem(QListView *parent, DocLnk* dl) @@ -54,38 +55,37 @@ FileItem::~FileItem() AddAtt::AddAtt(QWidget *parent, const char *name, WFlags f) : QDialog(parent, name, f) { setCaption("Adding attatchments"); - QGridLayout *top = new QGridLayout(this, 3,1 ); + QGridLayout *top = new QGridLayout(this, 1,1 ); - + QHBox *buttons=new QHBox(this); /*fileCategoryButton = new QPushButton(this);*/ - attatchButton = new QPushButton("Attatch ->", this); - removeButton = new QPushButton("Remove", this); + attatchButton = new QPushButton("Attatch ->", buttons); + removeButton = new QPushButton("Remove", buttons); /*fileCategories = new QPopupMenu(fileCategoryButton); fileCategoryButton->setPopup(fileCategories); fileCategories->insertItem("Document"); fileCategories->insertItem("Picture"); fileCategories->insertItem("Sound"); fileCategories->insertItem("Movie"); fileCategories->insertItem("File"); fileCategoryButton->setText("Document"); top->addWidget(fileCategoryButton, 0, 0);*/ - //ofs=new OFileSelector(this,2,0,"/root/Documents"); - - - top->addWidget(attatchButton,1,0); - top->addWidget(removeButton,2,0); - /*connect(fileCategories, SIGNAL(activated(int)), this, - SLOT(fileCategorySelected(int)) );*/ + top->addWidget(buttons,1,0); + //buttons->addWidget(attatchButton,0,0); + //buttons->addWidget(removeButton,0,1); + + //connect(fileCategories, SIGNAL(activated(int)), this, + // SLOT(fileCategorySelected(int)) );*/ connect(attatchButton, SIGNAL(clicked()), this, SLOT(addAttatchment()) ); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeAttatchment()) ); /*listView = new QListView(this, "AttView"); @@ -120,23 +120,17 @@ void AddAtt::clear() fileCategoryButton->setText(fileCategories->text(id)); getFiles(); }*/ void AddAtt::addAttatchment() { - QDialog qd(this,tr("Select attachment"),true); - - QGridLayout top(&qd,1,1); - - OFileSelector ofs(&qd,1,0,"/root/Documents"); - - top.addWidget(&ofs,0,0); + OFileDialog ofs("Attachments",this,0,0,"/root/Documents"); - qd.showMaximized(); + ofs.showMaximized(); - if (qd.exec()==QDialog::Accepted) + if (ofs.exec()==QDialog::Accepted) { DocLnk* dl=new DocLnk(ofs.selectedDocument()); FileItem* fi=new FileItem(attView,dl); fi->setPixmap(0,dl->pixmap()); fi->setText(1,dl->type()); attView->insertItem(fi); |